#414
ListaVecini
Se dă lista muchiilor unui graf neorientat. Să se afișeze, pentru fiecare vârf al grafului, lista vecinilor săi.
Problema | ListaVecini | Operații I/O |
listavecini.in /listavecini.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #20768211 | Utilizator | |
Fișier | listavecini.cpp | Dimensiune | 766 B |
Data încărcării | 10 Februarie 2020, 11:18 | Scor / rezultat | Eroare de compilare |
listavecini.cpp:11:3: error: expected initializer before '*' token }L*[50]; ^ listavecini.cpp: In function 'void df(int)': listavecini.cpp:14:5: error: 'v' was not declared in this scope v[nod]=1; ^ listavecini.cpp:16:9: error: 'p' was not declared in this scope nod*p=L[nod]; ^ listavecini.cpp:16:11: error: 'L' was not declared in this scope nod*p=L[nod]; ^ listavecini.cpp: In function 'void citire()': listavecini.cpp:26:8: error: 'n' was not declared in this scope f>>n; ^ listavecini.cpp:27:12: error: expected initializer before '*' token int nod*p; ^ listavecini.cpp:28:14: error: 'x' was not declared in this scope while(f>>x>>y) ^ listavecini.cpp:28:17: error: 'y' was not declared in this scope while(f>>x>>y) ^ listavecini.cpp:30:9: error: 'p' was not declared in this scope p=new nod; ^ listavecini.cpp:31:17: error: 'L' was not declared in this scope p->next=L[x]; ^ listavecini.cpp: In function 'void afisare()': listavecini.cpp:40:20: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ listavecini.cpp:43:15: error: 'L' was not declared in this scope while(L[i]) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ListaVecini 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ă.