#4276
Dându-se un graf neorientat cu n noduri și m muchii, să se determine numărul componentelor conexe.
| Problema | NrCompConexe | Operații I/O |
nrcompconexe.in/nrcompconexe.out
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64396844 | Utilizator | |
| Fișier | nrcompconexe.cpp | Dimensiune | 968 B |
| Data încărcării | 05 Mai 2026, 09:42 | Scor/rezultat | 100 puncte |
nrcompconexe.cpp: In function ‘int nod_nevizitat()’: nrcompconexe.cpp:42:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 42 | for(int i=1;i<=n;i++) | ^~~ nrcompconexe.cpp:45:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 45 | return 0; | ^~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 1 | 0.001 secunde | OK. | 10 | 10 | ||
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | 0.001 secunde | OK. | 10 | 10 | ||
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| 5 | 0.001 secunde | OK. | 10 | 10 | ||
| 6 | 0.001 secunde | OK. | 10 | 10 | ||
| 7 | 0.001 secunde | OK. | 10 | 10 | ||
| 8 | 0.001 secunde | OK. | 10 | 10 | ||
| 9 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrCompConexe 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ă.