#438
Se dă lista muchiilor unui graf neorientat. Să se afișeze componentele conexe ale acestui graf.
| Problema | ComponenteConexe | Operații I/O |
componenteconexe.in/componenteconexe.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #59870694 | Utilizator | |
| Fișier | componenteconexe.cpp | Dimensiune | 703 B |
| Data încărcării | 11 Octombrie 2025, 16:55 | Scor/rezultat | Eroare de compilare |
componenteconexe.cpp:10:1: error: 'cont' does not name a type cont++; ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:29:28: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(viz[i]=false){ ^ componenteconexe.cpp: At global scope: componenteconexe.cpp:34:5: error: 'out' does not name a type out<<cont; ^ componenteconexe.cpp:35:5: error: expected unqualified-id before 'for' for(int i=1;i<=n;i++) ^ componenteconexe.cpp:35:17: error: 'i' does not name a type for(int i=1;i<=n;i++) ^ componenteconexe.cpp:35:22: error: 'i' does not name a type for(int i=1;i<=n;i++) ^ componenteconexe.cpp:37:1: error: expected declaration before '}' token } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe 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ă.