#4962
Se dă lista muchiilor unui graf neorientat. Să se determine muchiile care pot fi adăugate în graf astfel încât numărul de componente conexe ale grafului să nu se modifice.
| Problema | ComponenteConexe12 | Operații I/O |
componenteconexe12.in/componenteconexe12.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #65017072 | Utilizator | |
| Fișier | componenteconexe12.cpp | Dimensiune | 1003 B |
| Data încărcării | 15 Iulie 2026, 16:03 | Scor/rezultat | 100 puncte |
componenteconexe12.cpp: In function ‘int main()’: componenteconexe12.cpp:44:56: warning: array subscript 2 is above array bounds of ‘int [2]’ [-Warray-bounds=] 44 | cout << muchii[i][1] << " " << muchii[i][2] << '\n'; | ^~~~ componenteconexe12.cpp:9:22: note: while referencing ‘muchii’ 9 | int viz[101], k, nr, muchii[5001][2], n, m; | ^~~~~~ componenteconexe12.cpp:37:28: warning: array subscript 2 is above array bounds of ‘int [2]’ [-Warray-bounds=] 37 | muchii[k][2]=j; | ~~~~~~~~~~~^ componenteconexe12.cpp:9:22: note: while referencing ‘muchii’ 9 | int viz[101], k, nr, muchii[5001][2], n, m; | ^~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.002 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe12 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ă.