#4276
NrCompConexe
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 | #48970212 | Utilizator | |
Fișier | nrcompconexe.cpp | Dimensiune | 1.41 KB |
Data încărcării | 11 Februarie 2024, 14:54 | Scor / rezultat | Eroare de compilare |
nrcompconexe.cpp:49:13: error: redefinition of 'std::ifstream fin' ifstream fin("nrcompconexe.in"); ^ nrcompconexe.cpp:5:10: error: 'std::ifstream fin' previously declared here ifstream fin("nrcompconexe.in"); ^ nrcompconexe.cpp:50:14: error: redefinition of 'std::ofstream fout' ofstream fout("nrcompconexe.out"); ^ nrcompconexe.cpp:6:10: error: 'std::ofstream fout' previously declared here ofstream fout("nrcompconexe.out"); ^ nrcompconexe.cpp:52:5: error: redefinition of 'int n' int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:8:5: error: 'int n' previously declared here int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:52:8: error: redefinition of 'int m' int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:8:8: error: 'int m' previously declared here int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:52:11: error: redefinition of 'int x' int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:8:11: error: 'int x' previously declared here int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:52:14: error: redefinition of 'int y' int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:8:14: error: 'int y' previously declared here int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:52:27: error: redefinition of 'int a [101][101]' int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:8:17: error: 'int a [101][101]' previously declared here int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:52:35: error: redefinition of 'int c [101]' int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:8:30: error: 'int c [101]' previously declared here int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:52:45: error: redefinition of 'int viz [101]' int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:8:38: error: 'int viz [101]' previously declared here int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:52:48: error: redefinition of 'int l' int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp:8:48: error: 'int l' previously defined here int n, m, x, y, a[101][101], c[101], viz[101], l=0; ^ nrcompconexe.cpp: In function 'void bfs(int, int)': nrcompconexe.cpp:54:6: error: redefinition of 'void bfs(int, int)' void bfs(int x, int l) ^ nrcompconexe.cpp:10:6: error: 'void bfs(int, int)' previously defined here void bfs(int x, int l) ^ nrcompconexe.cpp: In function 'int main()': nrcompconexe.cpp:71:5: error: redefinition of 'int main()' int main() ^ nrcompconexe.cpp:27:5: error: 'int main()' previously defined here int main() ^
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ă.