#414
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 | #64195282 | Utilizator | |
| Fișier | listavecini.cpp | Dimensiune | 517 B |
| Data încărcării | 22 Aprilie 2026, 12:50 | Scor/rezultat | Eroare de compilare |
listavecini.cpp: In function ‘int main()’: listavecini.cpp:21:10: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 21 | if(a[i][j]==1)fout<<j;<<' '; | ^~ listavecini.cpp:21:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 21 | if(a[i][j]==1)fout<<j;<<' '; | ^~ listavecini.cpp:20:6: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 20 | for(int j=1;j<=n;j++) | ^~~ listavecini.cpp:21:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 21 | if(a[i][j]==1)fout<<j;<<' '; | ^~ listavecini.cpp:21:32: error: expected primary-expression before ‘<<’ token
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ă.