#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 | #63882260 | Utilizator | |
| Fișier | componenteconexe.cpp | Dimensiune | 1001 B |
| Data încărcării | 24 Martie 2026, 13:51 | Scor/rezultat | Eroare de compilare |
componenteconexe.cpp:5:48: error: conflicting declaration 'int c' int c[101],viz[101],v[101][101],n,vc[101][101],c=1; ^ componenteconexe.cpp:5:5: error: 'c' has a previous declaration as 'int c [101]' int c[101],viz[101],v[101][101],n,vc[101][101],c=1; ^ componenteconexe.cpp: In function 'void bfs(int)': componenteconexe.cpp:27:10: error: invalid types 'int [101][101][int [101]]' for array subscript vc[c][i]=c[i]; ^ componenteconexe.cpp:29:7: error: lvalue required as increment operand ++c; ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:43:17: error: 'viz' cannot be used as a function if(viz(i)==0) ^ componenteconexe.cpp:47:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for(i=1;i<=c;++i) ^
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ă.