#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 | #54103113 | Utilizator | |
Fișier | nrcompconexe.cpp | Dimensiune | 555 B |
Data încărcării | 19 Noiembrie 2024, 19:56 | Scor / rezultat | Eroare de compilare |
nrcompconexe.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream cout("nrcompconexe.out") ^ nrcompconexe.cpp:6:17: error: expected unqualified-id before ',' token int viz[101]={0},a[101][101], n,m; ^ nrcompconexe.cpp:6:29: error: expected constructor, destructor, or type conversion before ',' token int viz[101]={0},a[101][101], n,m; ^ nrcompconexe.cpp:6:32: error: expected constructor, destructor, or type conversion before ',' token int viz[101]={0},a[101][101], n,m; ^ nrcompconexe.cpp:6:34: error: expected constructor, destructor, or type conversion before ';' token int viz[101]={0},a[101][101], n,m; ^ nrcompconexe.cpp: In function 'void DF(int)': nrcompconexe.cpp:9:5: error: 'viz' was not declared in this scope viz[vf]=1; ^ nrcompconexe.cpp:10:20: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ nrcompconexe.cpp:11:12: error: 'a' was not declared in this scope if(a[vf][i]==1 && viz[i]==0) ^ nrcompconexe.cpp: In function 'int main()': nrcompconexe.cpp:17:10: error: 'n' was not declared in this scope cin>>n; ^ nrcompconexe.cpp:18:9: error: 'm' was not declared in this scope cin>>m; ^ nrcompconexe.cpp:22:9: error: 'a' was not declared in this scope a[x][y]=a[y][x]=1; ^ nrcompconexe.cpp:27:12: error: 'viz' was not declared in this scope if(viz[i]==0) ^ nrcompconexe.cpp:32:5: error: 'cout' was not declared in this scope cout<<ok; ^
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ă.