Detalii evaluare #27736023

Rezumat problemă

#19 BFS

Se consideră un graf neorientat cu n vârfuri și m muchii și un vârf cunoscut X. Să se afişeze vârfurile vizitate în urma parcurgerii în lățime a grafului pornind din vârful X.

Detalii

Problema BFS Operații I/O BFS.in/BFS.out
Limita timp 1 secunde Limita memorie Total: 128 MB / Stivă 8 MB
Id soluție #27736023 Utilizator halmaciu delia ioana (delia_halmaciu)
Fișier bfs.cpp Dimensiune 682 B
Data încărcării 09 Februarie 2021, 11:13 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

bfs.cpp:7:1: error: stray '\302' in program
 {    int c[101],viz[101]={0},p,u,z,i;  

 ^
bfs.cpp:7:1: error: stray '\240' in program
bfs.cpp:7:1: error: stray '\302' in program
bfs.cpp:7:1: error: stray '\240' in program
bfs.cpp:7:1: error: stray '\302' in program
bfs.cpp:7:1: error: stray '\240' in program
bfs.cpp:8:1: error: stray '\302' in program
   p=u=1;   

 ^
bfs.cpp:8:1: error: stray '\240' in program
bfs.cpp:8:1: error: stray '\302' in program
bfs.cpp:8:1: error: stray '\240' in program
bfs.cpp:8:1: error: stray '\302' in program
bfs.cpp:8:1: error: stray '\240' in program
bfs.cpp:9:2: error: stray '\302' in program
  c[p]=x;    v

  ^
bfs.cpp:9:2: error: stray '\240' in program
bfs.cpp:9:2: error: stray '\302' in program
bfs.cpp:9:2: error: stray '\240' in program
bfs.cpp:10:1: error: stray '\302' in program
 iz[x]=1;    

 ^
bfs.cpp:10:1: error: stray '\240' in program
bfs.cpp:10:1: error: stray '\302' in program
bfs.cpp:10:1: error: stray '\240' in program
bfs.cpp:11:1: error: stray '\302' in program
 while(p<=u)    

 ^
bfs.cpp:11:1: error: stray '\240' in program
bfs.cpp:11:1: error: stray '\302' in program
bfs.cpp:11:1: error: stray '\240' in program
bfs.cpp:12:1: error: stray '\302' in program
 {        z=c[p];        

 ^
bfs.cpp:12:1: error: stray '\240' in program
bfs.cpp:12:1: error: stray '\302' in program
bfs.cpp:12:1: error: stray '\240' in program
bfs.cpp:12:1: error: stray '\302' in program
bfs.cpp:12:1: error: stray '\240' in program
bfs.cpp:12:1: error: stray '\302' in program
bfs.cpp:12:1: error: stray '\240' in program
bfs.cpp:12:1: error: stray '\302' in program
bfs.cpp:12:1: error: stray '\240' in program
bfs.cpp:12:1: error: stray '\302' in program
bfs.cpp:12:1: error: stray '\240' in program
bfs.cpp:12:1: error: stray '\302' in program
bfs.cpp:12:1: error: stray '\240' in program
bfs.cpp:12:1: error: stray '\302' in program
bfs.cpp:12:1: error: stray '\240' in program
bfs.cpp:13:1: error: stray '\302' in program
 for(i=1;i<=n;i++)            

 ^
bfs.cpp:13:1: error: stray '\240' in program
bfs.cpp:13:1: error: stray '\302' in program
bfs.cpp:13:1: error: stray '\240' in program
bfs.cpp:13:1: error: stray '\302' in program
bfs.cpp:13:1: error: stray '\240' in program
bfs.cpp:13:1: error: stray '\302' in program
bfs.cpp:13:1: error: stray '\240' in program
bfs.cpp:13:1: error: stray '\302' in program
bfs.cpp:13:1: error: stray '\240' in program
bfs.cpp:13:1: error: stray '\302' in program
bfs.cpp:13:1: error: stray '\240' in program
bfs.cpp:14:1: error: stray '\302' in program
 if(a[z][i]==1 && viz[i]==0)       

 ^
bfs.cpp:14:1: error: stray '\240' in program
bfs.cpp:14:1: error: stray '\302' in program
bfs.cpp:14:1: error: stray '\240' in program
bfs.cpp:14:1: error: stray '\302' in program
bfs.cpp:14:1: error: stray '\240' in program
bfs.cpp:14:1: error: stray '\302' in program
bfs.cpp:14:1: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
  {            u++;c[u]=i;viz[i]=1;        }   

  ^
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:15:2: error: stray '\302' in program
bfs.cpp:15:2: error: stray '\240' in program
bfs.cpp:16:2: error: stray '\302' in program
      p++;    }    

  ^
bfs.cpp:16:2: error: stray '\240' in program
bfs.cpp:16:2: error: stray '\302' in program
bfs.cpp:16:2: error: stray '\240' in program
bfs.cpp:16:2: error: stray '\302' in program
bfs.cpp:16:2: error: stray '\240' in program
bfs.cpp:16:2: error: stray '\302' in program
bfs.cpp:16:2: error: stray '\240' in program
bfs.cpp:16:2: error: stray '\302' in program
bfs.cpp:16:2: error: stray '\240' in program
bfs.cpp:16:2: error: stray '\302' in program
bfs.cpp:16:2: error: stray '\240' in program
bfs.cpp:17:1: error: stray '\302' in program
 for(i=1;i<=u;i++)        

 ^
bfs.cpp:17:1: error: stray '\240' in program
bfs.cpp:17:1: error: stray '\302' in program
bfs.cpp:17:1: error: stray '\240' in program
bfs.cpp:17:1: error: stray '\302' in program
bfs.cpp:17:1: error: stray '\240' in program
bfs.cpp:17:1: error: stray '\302' in program
bfs.cpp:17:1: error: stray '\240' in program
bfs.cpp:21:1: error: stray '\302' in program
 {    int i,x,y;    

 ^
bfs.cpp:21:1: error: stray '\240' in program
bfs.cpp:21:1: error: stray '\302' in program
bfs.cpp:21:1: error: stray '\240' in program
bfs.cpp:21:1: error: stray '\302' in program
bfs.cpp:21:1: error: stray '\240' in program
bfs.cpp:21:1: error: stray '\302' in program
bfs.cpp:21:1: error: stray '\240' in program
bfs.cpp:23:1: error: stray '\302' in program
 fin>>k;    

 ^
bfs.cpp:23:1: error: stray '\240' in program
bfs.cpp:23:1: error: stray '\302' in program
bfs.cpp:23:1: error: stray '\240' in program
bfs.cpp:24:1: error: stray '\302' in program
 for(i=1;i<=m;i++)    

 ^
bfs.cpp:24:1: error: stray '\240' in program
bfs.cpp:24:1: error: stray '\302' in program
bfs.cpp:24:1: error: stray '\240' in program
bfs.cpp:25:1: error: stray '\302' in program
 {        fin>>x>>y;      

 ^
bfs.cpp:25:1: error: stray '\240' in program
bfs.cpp:25:1: error: stray '\302' in program
bfs.cpp:25:1: error: stray '\240' in program
bfs.cpp:25:1: error: stray '\302' in program
bfs.cpp:25:1: error: stray '\240' in program
bfs.cpp:25:1: error: stray '\302' in program
bfs.cpp:25:1: error: stray '\240' in program
bfs.cpp:25:1: error: stray '\302' in program
bfs.cpp:25:1: error: stray '\240' in program
bfs.cpp:25:1: error: stray '\302' in program
bfs.cpp:25:1: error: stray '\240' in program
bfs.cpp:25:1: error: stray '\302' in program
bfs.cpp:25:1: error: stray '\240' in program
bfs.cpp:26:1: error: stray '\302' in program
  a[x][y]=1;

 ^
bfs.cpp:26:1: error: stray '\240' in program
bfs.cpp:27:1: error: stray '\302' in program
 a[y][x]=1;    }

 ^
bfs.cpp:27:1: error: stray '\240' in program
bfs.cpp:27:1: error: stray '\302' in program
bfs.cpp:27:1: error: stray '\240' in program
bfs.cpp:28:1: error: stray '\302' in program
     bf(k);    

 ^
bfs.cpp:28:1: error: stray '\240' in program
bfs.cpp:28:1: error: stray '\302' in program
bfs.cpp:28:1: error: stray '\240' in program
bfs.cpp:28:1: error: stray '\302' in program
bfs.cpp:28:1: error: stray '\240' in program
bfs.cpp:28:1: error: stray '\302' in program
bfs.cpp:28:1: error: stray '\240' in program
bfs.cpp: In function 'void bf(int)':
bfs.cpp:9:15: error: 'v' was not declared in this scope
  c[p]=x;    v

               ^
bfs.cpp:10:1: error: expected ';' before 'iz'
 iz[x]=1;    

 ^

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