#4282
NrCompConexe1
Dându-se un graf neorientat cu n
noduri și m
muchii, să se determine numărul componentelor conexe.
Problema | NrCompConexe1 | Operații I/O |
nrcompconexe.in /nrcompconexe.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #46794596 | Utilizator | |
Fișier | nrcompconexe1.cpp | Dimensiune | 879 B |
Data încărcării | 23 Noiembrie 2023, 08:06 | Scor / rezultat | Eroare de compilare |
nrcompconexe1.cpp:3:1: error: 'ifstream' does not name a type ifstream fin="nrcompconexe.in"; ^ nrcompconexe1.cpp:4:1: error: 'ofstream' does not name a type ofstream fout="nrcompconexe.out"; ^ nrcompconexe1.cpp: In function 'void Citire()': nrcompconexe1.cpp:13:11: error: 'inFile' was not declared in this scope fin(inFile); ^ nrcompconexe1.cpp:13:17: error: 'fin' was not declared in this scope fin(inFile); ^ nrcompconexe1.cpp:18:14: error: request for member 'push_back' in 'L[x]', which is of non-class type 'int' L[x].push_back(y); ^ nrcompconexe1.cpp:19:14: error: request for member 'push_back' in 'L[y]', which is of non-class type 'int' L[y].push_back(x); ^ nrcompconexe1.cpp: In function 'void DFS(int)': nrcompconexe1.cpp:29:26: error: request for member 'size' in 'L[k]', which is of non-class type 'int' for (i = 0; i < L[k].size(); i++) ^ nrcompconexe1.cpp:31:19: error: invalid types 'int[unsigned int]' for array subscript j = L[k][i]; ^ nrcompconexe1.cpp: In function 'void NrCompCon()': nrcompconexe1.cpp:45:12: error: 'outFile' was not declared in this scope fout(outFile); ^ nrcompconexe1.cpp:45:19: error: 'fout' was not declared in this scope fout(outFile); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrCompConexe1 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ă.