Detalii evaluare #57586571

Rezumat problemă

UbuPH

#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ă.

Detalii

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 #57586571 Utilizator erdei ilinca (Erdei_Ilinca)
Fișier ubuph.cpp Dimensiune 1.23 KB
Data încărcării 06 Aprilie 2025, 15:35 Scor / rezultat Eroare de compilare

Evaluare

Mesaj compilare

ubuph.cpp:4:1: error: stray '\302' in program
 ifstream cin("ubuph.in"); ofstream cout("ubuph.out");  int a[1005][1005],n,m,b[1005][1005]; int dx[]={-1,1,0,0}; int dy[]={0,0,1,-1};  struct date {     int x,y; }C,M;  queue<date>q;  void citire() {     int i,j;     cin>>n>>m;     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; }  bool interior(date s) {     return s.x>=1 && s.x<=n && s.y>=1 && s.y<=m; }  void lee() {     date vi,vf;     q.push(C);     b[C.x][C.y]=a[C.x][C.y];     while(!q.empty())     {         vi=q.front();         q.pop();         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);                 b[vf.x][vf.y]=b[vi.x][vi.y]+a[vf.x][vf.y];             }         }     } }  int main() {     citire();     lee();     cout<<b[M.x][M.y];     return 0; }
 ^
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: stray '\302' in program
ubuph.cpp:4:1: error: stray '\240' in program
ubuph.cpp:4:1: error: 'ifstream' does not name a type
ubuph.cpp:4:27: error: 'ofstream' does not name a type
 ifstream cin("ubuph.in"); ofstream cout("ubuph.out");  int a[1005][1005],n,m,b[1005][1005]; int dx[]={-1,1,0,0}; int dy[]={0,0,1,-1};  struct date {     int x,y; }C,M;  queue<date>q;  void citire() {     int i,j;     cin>>n>>m;     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; }  bool interior(date s) {     return s.x>=1 && s.x<=n && s.y>=1 && s.y<=m; }  void lee() {     date vi,vf;     q.push(C);     b[C.x][C.y]=a[C.x][C.y];     while(!q.empty())     {         vi=q.front();         q.pop();         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);                 b[vf.x][vf.y]=b[vi.x][vi.y]+a[vf.x][vf.y];             }         }     } }  int main() {     citire();     lee();     cout<<b[M.x][M.y];     return 0; }
                           ^
ubuph.cpp:4:174: error: 'queue' does not name a type
 ifstream cin("ubuph.in"); ofstream cout("ubuph.out");  int a[1005][1005],n,m,b[1005][1005]; int dx[]={-1,1,0,0}; int dy[]={0,0,1,-1};  struct date {     int x,y; }C,M;  queue<date>q;  void citire() {     int i,j;     cin>>n>>m;     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; }  bool interior(date s) {     return s.x>=1 && s.x<=n && s.y>=1 && s.y<=m; }  void lee() {     date vi,vf;     q.push(C);     b[C.x][C.y]=a[C.x][C.y];     while(!q.empty())     {         vi=q.front();         q.pop();         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);                 b[vf.x][vf.y]=b[vi.x][vi.y]+a[vf.x][vf.y];             }         }     } }  int main() {     citire();     lee();     cout<<b[M.x][M.y];     return 0; }
                                                                                                                                                                              ^
ubuph.cpp: In function 'void citire()':
ubuph.cpp:4:230: error: 'cin' was not declared in this scope
 ifstream cin("ubuph.in"); ofstream cout("ubuph.out");  int a[1005][1005],n,m,b[1005][1005]; int dx[]={-1,1,0,0}; int dy[]={0,0,1,-1};  struct date {     int x,y; }C,M;  queue<date>q;  void citire() {     int i,j;     cin>>n>>m;     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; }  bool interior(date s) {     return s.x>=1 && s.x<=n && s.y>=1 && s.y<=m; }  void lee() {     date vi,vf;     q.push(C);     b[C.x][C.y]=a[C.x][C.y];     while(!q.empty())     {         vi=q.front();         q.pop();         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);                 b[vf.x][vf.y]=b[vi.x][vi.y]+a[vf.x][vf.y];             }         }     } }  int main() {     citire();     lee();     cout<<b[M.x][M.y];     return 0; }
                                                                                                                                                                                                                                      ^
ubuph.cpp:3:13: error: unable to find numeric literal operator 'operator"" using'
 #define Max 1000000000using namespace std; 

             ^
ubuph.cpp:4:389: note: in expansion of macro 'Max'
 ifstream cin("ubuph.in"); ofstream cout("ubuph.out");  int a[1005][1005],n,m,b[1005][1005]; int dx[]={-1,1,0,0}; int dy[]={0,0,1,-1};  struct date {     int x,y; }C,M;  queue<date>q;  void citire() {     int i,j;     cin>>n>>m;     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; }  bool interior(date s) {     return s.x>=1 && s.x<=n && s.y>=1 && s.y<=m; }  void lee() {     date vi,vf;     q.push(C);     b[C.x][C.y]=a[C.x][C.y];     while(!q.empty())     {         vi=q.front();         q.pop();         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);                 b[vf.x][vf.y]=b[vi.x][vi.y]+a[vf.x][vf.y];             }         }     } }  int main() {     citire();     lee();     cout<<b[M.x][M.y];     return 0; }
                                                                                                                                                                                                                                                                                                                                                                                                     ^
ubuph.cpp:3:29: error: expected ';' before 'namespace'
 #define Max 1000000000using namespace std; 

                             ^
ubuph.cpp:4:389: note: in expansion of macro 'Max'
 ifstream cin("ubuph.in"); ofstream cout("ubuph.out");  int a[1005][1005],n,m,b[1005][1005]; int dx[]={-1,1,0,0}; int dy[]={0,0,1,-1};  struct date {     int x,y; }C,M;  queue<date>q;  void citire() {     int i,j;     cin>>n>>m;     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; }  bool interior(date s) {     return s.x>=1 && s.x<=n && s.y>=1 && s.y<=m; }  void lee() {     date vi,vf;     q.push(C);     b[C.x][C.y]=a[C.x][C.y];     while(!q.empty())     {         vi=q.front();         q.pop();         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);                 b[vf.x][vf.y]=b[vi.x][vi.y]+a[vf.x][vf.y];             }         }     } }  int main() {     citire();     lee();     cout<<b[M.x][M.y];     return 0; }
                                                                                                                                                                                                                                                                                                                                                                                                     ^
ubuph.cpp: In function 'void lee()':
ubuph.cpp:4:569: error: 'q' was not declared in this scope
 ifstream cin("ubuph.in"); ofstream cout("ubuph.out");  int a[1005][1005],n,m,b[1005][1005]; int dx[]={-1,1,0,0}; int dy[]={0,0,1,-1};  struct date {     int x,y; }C,M;  queue<date>q;  void citire() {     int i,j;     cin>>n>>m;     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; }  bool interior(date s) {     return s.x>=1 && s.x<=n && s.y>=1 && s.y<=m; }  void lee() {     date vi,vf;     q.push(C);     b[C.x][C.y]=a[C.x][C.y];     while(!q.empty())     {         vi=q.front();         q.pop();         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);                 b[vf.x][vf.y]=b[vi.x][vi.y]+a[vf.x][vf.y];             }         }     } }  int main() {     citire();     lee();     cout<<b[M.x][M.y];     return 0; }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^
ubuph.cpp: In function 'int main()':
ubuph.cpp:4:1145: error: 'cout' was not declared in this scope
 ifstream cin("ubuph.in"); ofstream cout("ubuph.out");  int a[1005][1005],n,m,b[1005][1005]; int dx[]={-1,1,0,0}; int dy[]={0,0,1,-1};  struct date {     int x,y; }C,M;  queue<date>q;  void citire() {     int i,j;     cin>>n>>m;     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; }  bool interior(date s) {     return s.x>=1 && s.x<=n && s.y>=1 && s.y<=m; }  void lee() {     date vi,vf;     q.push(C);     b[C.x][C.y]=a[C.x][C.y];     while(!q.empty())     {         vi=q.front();         q.pop();         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);                 b[vf.x][vf.y]=b[vi.x][vi.y]+a[vf.x][vf.y];             }         }     } }  int main() {     citire();     lee();     cout<<b[M.x][M.y];     return 0; }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema UbuPH face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.

Du-te sus!