#1871
Într-o zi telefonul lui Max s-a stricat.Văzând o reclamă la noul telefon cu sistemul de operare Ubuntu, s-a gândit să achiziționeze și el unul.
Drumul de la casa lui la magazin poate fi reprezentat ca o matrice cu n
linii și m
coloane. În fiecare element al matricei este o barieră; pentru a trece de bariere trebuie plătită o sumă de bani, care nu este aceeași pentru fiecare barieră și poate fi chiar 0
.
Casa lui se află pe coordonatele (ic,jc)
, iar magazinul la coordonatele (im,jm)
.
Pentru că trebuie să cumpere telefonul, este nevoie ca drumul lui sa fie cât mai puțin costisitor, plătind la bariere o sumă totală minimă.
Problema | UbuPH | Operații I/O |
![]() ubuph.in /ubuph.out
|
---|---|---|---|
Limita timp | 1.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57586725 | Utilizator | |
Fișier | ubuph.cpp | Dimensiune | 1.18 KB |
Data încărcării | 06 Aprilie 2025, 15:44 | Scor / rezultat | Eroare de compilare |
ubuph.cpp:8:1: error: stray '\302' in program struct date { int x,y; }C,M; queue<date>q; ^ ubuph.cpp:8:1: error: stray '\240' in program ubuph.cpp:8:1: error: stray '\302' in program ubuph.cpp:8:1: error: stray '\240' in program ubuph.cpp:8:1: error: stray '\302' in program ubuph.cpp:8:1: error: stray '\240' in program ubuph.cpp:8:1: error: stray '\302' in program ubuph.cpp:8:1: error: stray '\240' in program ubuph.cpp:11:1: error: stray '\302' in program { int i,j; ^ ubuph.cpp:11:1: error: stray '\240' in program ubuph.cpp:11:1: error: stray '\302' in program ubuph.cpp:11:1: error: stray '\240' in program ubuph.cpp:11:1: error: stray '\302' in program ubuph.cpp:11:1: error: stray '\240' in program ubuph.cpp:11:1: error: stray '\302' in program ubuph.cpp:11:1: error: stray '\240' in program ubuph.cpp:11:1: error: stray '\302' in program ubuph.cpp:11:1: error: stray '\240' in program ubuph.cpp:11:1: error: stray '\302' in program ubuph.cpp:11:1: error: stray '\240' in program ubuph.cpp:11:1: error: stray '\302' in program ubuph.cpp:11:1: error: stray '\240' in program ubuph.cpp:12:6: error: stray '\302' in program cin>>n>>m; ^ ubuph.cpp:12:6: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program for(i=1;i<=n;i++) for(j=1;j<=m;j++) { cin>>a[i][j]; b[i][j]=Max; } cin>>M.x>>M.y>>C.x>>C.y; } ^ ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:13:7: error: stray '\302' in program ubuph.cpp:13:7: error: stray '\240' in program ubuph.cpp:14:1: error: stray '\302' in program bool interior(date s) { return s.x>=1 && s.x<=n && s.y>=1 && s.y<=m; } ^ ubuph.cpp:14:1: error: stray '\240' in program ubuph.cpp:14:1: error: stray '\302' in program ubuph.cpp:14:1: error: stray '\240' in program ubuph.cpp:14:1: error: stray '\302' in program ubuph.cpp:14:1: error: stray '\240' in program ubuph.cpp:14:1: error: stray '\302' in program ubuph.cpp:14:1: error: stray '\240' in program ubuph.cpp:17:2: error: stray '\302' in program { date vi,vf; ^ ubuph.cpp:17:2: error: stray '\240' in program ubuph.cpp:17:2: error: stray '\302' in program ubuph.cpp:17:2: error: stray '\240' in program ubuph.cpp:17:2: error: stray '\302' in program ubuph.cpp:17:2: error: stray '\240' in program ubuph.cpp:17:2: error: stray '\302' in program ubuph.cpp:17:2: error: stray '\240' in program ubuph.cpp:17:2: error: stray '\302' in program ubuph.cpp:17:2: error: stray '\240' in program ubuph.cpp:18:8: error: stray '\302' in program q.push(C); ^ ubuph.cpp:18:8: error: stray '\240' in program ubuph.cpp:18:8: error: stray '\302' in program ubuph.cpp:18:8: error: stray '\240' in program ubuph.cpp:18:8: error: stray '\302' in program ubuph.cpp:18:8: error: stray '\240' in program ubuph.cpp:18:8: error: stray '\302' in program ubuph.cpp:18:8: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program b[C.x][C.y]=a[C.x][C.y]; while(!q.empty()) { vi=q.front(); ^ ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:19:7: error: stray '\302' in program ubuph.cpp:19:7: error: stray '\240' in program ubuph.cpp:20:15: error: stray '\302' in program q.pop(); ^ ubuph.cpp:20:15: error: stray '\240' in program ubuph.cpp:20:15: error: stray '\302' in program ubuph.cpp:20:15: error: stray '\240' in program ubuph.cpp:20:15: error: stray '\302' in program ubuph.cpp:20:15: error: stray '\240' in program ubuph.cpp:20:15: error: stray '\302' in program ubuph.cpp:20:15: error: stray '\240' in program ubuph.cpp:20:15: error: stray '\302' in program ubuph.cpp:20:15: error: stray '\240' in program ubuph.cpp:20:15: error: stray '\302' in program ubuph.cpp:20:15: error: stray '\240' in program ubuph.cpp:20:15: error: stray '\302' in program ubuph.cpp:20:15: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program for(int i=0;i<4;i++) { vf.x=vi.x+dx[i]; vf.y=vi.y+dy[i]; if(interior(vf)&&b[vf.x][vf.y]>b[vi.x][vi.y]+a[vf.x][vf.y]) { q.push(vf); ^ ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:21:7: error: stray '\302' in program ubuph.cpp:21:7: error: stray '\240' in program ubuph.cpp:22:1: error: stray '\302' in program b[vf.x][vf.y]=b[vi.x][vi.y]+a[vf.x[vf.y]; ^ ubuph.cpp:22:1: error: stray '\240' in program ubuph.cpp: In function 'void lee()': ubuph.cpp:22:42: error: invalid types 'int[int]' for array subscript b[vf.x][vf.y]=b[vi.x][vi.y]+a[vf.x[vf.y]; ^ ubuph.cpp:22:43: error: expected ']' before ';' token b[vf.x][vf.y]=b[vi.x][vi.y]+a[vf.x[vf.y]; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema UbuPH face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.