#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 | #54950523 | Utilizator | |
Fișier | componenteconexe.cpp | Dimensiune | 897 B |
Data încărcării | 13 Decembrie 2024, 10:43 | Scor / rezultat | Eroare de compilare |
componenteconexe.cpp:6:1: error: expected ',' or ';' before 'ofstream' ofstream g("componenteconexe.out") ^ componenteconexe.cpp: In function 'void bf(int)': componenteconexe.cpp:17:2: error: 'c' was not declared in this scope c[1]=x; ^ componenteconexe.cpp:18:2: error: 'viz' was not declared in this scope viz[x]=nr; ^ componenteconexe.cpp:18:9: error: 'nr' was not declared in this scope viz[x]=nr; ^ componenteconexe.cpp:22:15: error: 'n' was not declared in this scope for(i=1; i<=n; i++) ^ componenteconexe.cpp:24:7: error: 'a' was not declared in this scope if(a[x][i]==1 && viz[i]==0) ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:37:6: error: 'n' was not declared in this scope f>>n; ^ componenteconexe.cpp:39:4: error: 'a' was not declared in this scope a[i][j]=a[j][i]=1; ^ componenteconexe.cpp:42:7: error: 'viz' was not declared in this scope if(viz[i]==0) ^ componenteconexe.cpp:44:5: error: 'nr' was not declared in this scope nr++; ^ componenteconexe.cpp:46:5: error: 'g' was not declared in this scope }g<<nr<<endl; ^ componenteconexe.cpp:46:8: error: 'nr' was not declared in this scope }g<<nr<<endl; ^ componenteconexe.cpp:49:6: error: 'viz' was not declared in this scope if(viz[j]==i) ^ componenteconexe.cpp:51:3: error: expected ';' before 'g' g<<endl;} ^ componenteconexe.cpp:36:8: warning: unused variable 'x' [-Wunused-variable] { int x,i,j,z; ^ componenteconexe.cpp:36:14: warning: unused variable 'z' [-Wunused-variable] { int x,i,j,z; ^
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ă.