#4282
Dându-se un graf neorientat cu n noduri și m muchii, să se determine numărul componentelor conexe.
| Problema | NrCompConexe1 | Operații I/O |
nrcompconexe.in/nrcompconexe.out
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 32 MB
|
| Id soluție | #64384930 | Utilizator | |
| Fișier | nrcompconexe1.cpp | Dimensiune | 783 B |
| Data încărcării | 04 Mai 2026, 16:54 | Scor/rezultat | 20 puncte |
nrcompconexe1.cpp: In function ‘void componente_conexe()’: nrcompconexe1.cpp:26:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 26 | for(int i=1; i<=n; ++i) | ^~~ nrcompconexe1.cpp:28:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 28 | int cnt=0; | ^~~ nrcompconexe1.cpp:29:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 29 | for(int i=1; i<=n; ++i) | ^~~ nrcompconexe1.cpp:35:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 35 | fout<<cnt; | ^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0.001 secunde | OK. | 10 | 10 | ||
| 1 | 0.001 secunde | OK. | 10 | 10 | ||
| 2 | 0.001 secunde | Caught fatal signal 11 | 10 | 0 | ||
| 3 | 0.002 secunde | Caught fatal signal 11 | 10 | 0 | ||
| 4 | 0.001 secunde | Caught fatal signal 11 | 10 | 0 | ||
| 5 | 0.002 secunde | Caught fatal signal 11 | 10 | 0 | ||
| 6 | 0.001 secunde | Caught fatal signal 11 | 10 | 0 | ||
| 7 | 0.001 secunde | Caught fatal signal 11 | 10 | 0 | ||
| 8 | 0.001 secunde | Caught fatal signal 11 | 10 | 0 | ||
| 9 | 0.001 secunde | Caught fatal signal 11 | 10 | 0 | ||
| Punctaj total | 20 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrCompConexe1 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ă.