#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 | #64308438 | Utilizator | |
| Fișier | listavecini.cpp | Dimensiune | 720 B |
| Data încărcării | 29 Aprilie 2026, 07:20 | Scor/rezultat | 80 puncte |
listavecini.cpp: In function ‘int main()’: listavecini.cpp:25:26: warning: array subscript 101 is above array bounds of ‘int [101]’ [-Warray-bounds=] 25 | fout<<m[i][101]<<" "; | ^~~ listavecini.cpp:7:8: note: while referencing ‘m’ 7 | int n, m[101][101], x, y; | ^ listavecini.cpp:19:21: warning: array subscript 101 is above array bounds of ‘int [101]’ [-Warray-bounds=] 19 | m[x][101]++; | ~~~~~~~~^ listavecini.cpp:7:8: note: while referencing ‘m’ 7 | int n, m[101][101], x, y; | ^ listavecini.cpp:19:21: warning: array subscript 101 is above array bounds of ‘int [101]’ [-Warray-bounds=] 19 | m[x][101]++; | ~~~~~~~~^ listavecini.cpp:7:8: note: while referencing ‘m’ 7 | int n, m[101][101], x, y; | ^ listavecini.cpp:20:21: warning: array subscript 101 is above array bounds of ‘int [101]’ [-Warray-bounds=] 20 | m[y][101]++; | ~~~~~~~~^ listavecini.cpp:7:8: note: while referencing ‘m’ 7 | int n, m[101][101], x, y; | ^ listavecini.cpp:20:21: warning: array subscript 101 is above array bounds of ‘int [101]’ [-Warray-bounds=] 20 | m[y][101]++; | ~~~~~~~~^ listavecini.cpp:7:8: note: while referencing ‘m’ 7 | int n, m[101][101], x, y; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 60 | 60 | ||
| 3 | 0.002 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 80 | |||||
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ă.