#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 | #64662936 | Utilizator | |
| Fișier | componenteconexe.cpp | Dimensiune | 1.37 KB |
| Data încărcării | 21 Mai 2026, 10:23 | Scor/rezultat | Eroare de compilare |
componenteconexe.cpp: In function ‘int main()’: componenteconexe.cpp:52:1: error: a function-definition is not allowed here before ‘{’ token 52 | { | ^ componenteconexe.cpp:61:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 61 | int main() | ^~ componenteconexe.cpp:61:9: note: remove parentheses to default-initialize a variable 61 | int main() | ^~ | -- componenteconexe.cpp:61:9: note: or replace parentheses with braces to value-initialize a variable componenteconexe.cpp:62:1: error: a function-definition is not allowed here before ‘{’ token 62 | { | ^ componenteconexe.cpp:48:5: warning: unused variable ‘n’ [-Wunused-variable] 48 | int n; | ^ componenteconexe.cpp:49:5: warning: unused variable ‘a’ [-Wunused-variable] 49 | int a[101][101], viz[101]; | ^ componenteconexe.cpp:49:18: warning: unused variable ‘viz’ [-Wunused-variable] 49 | int a[101][101], viz[101]; | ^~~
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ă.