#438
ComponenteConexe
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 | #40575041 | Utilizator | |
Fișier | componenteconexe.cpp | Dimensiune | 916 B |
Data încărcării | 13 Decembrie 2022, 09:50 | Scor / rezultat | Eroare de compilare |
componenteconexe.cpp:5:12: error: variable 'std::ifstream in' has initializer but incomplete type ifstream in("componenteconexe.in"); ^ componenteconexe.cpp:6:13: error: variable 'std::ofstream out' has initializer but incomplete type ofstream out("componenteconexe.out"); ^ componenteconexe.cpp: In function 'void bfs(int, int)': componenteconexe.cpp:9:12: error: 'p' was not declared in this scope c[1]=x;p=1;f=1;v[x]=nr; ^ componenteconexe.cpp:9:16: error: 'f' was not declared in this scope c[1]=x;p=1;f=1;v[x]=nr; ^ componenteconexe.cpp:11:13: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ componenteconexe.cpp:14:16: error: 'mat' was not declared in this scope if(mat[x][i]==1 && v[i]==0) ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:35:13: error: 'nr' was not declared in this scope nr++; ^ componenteconexe.cpp:39:11: error: 'nr' was not declared in this scope cout<<nr<<'\n'; ^
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ă.