#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 | #35839382 | Utilizator | |
Fișier | componenteconexe.cpp | Dimensiune | 727 B |
Data încărcării | 24 Martie 2022, 09:03 | Scor / rezultat | Eroare de compilare |
componenteconexe.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream g("componenteconexe.out") ^ componenteconexe.cpp: In function 'void df(int)': componenteconexe.cpp:10:5: error: 'viz' was not declared in this scope viz[k]=1; ^ componenteconexe.cpp:11:17: error: 'n' was not declared in this scope for (i=1;i<=n;i++) ^ componenteconexe.cpp:12:26: error: 'a' was not declared in this scope if (viz[i]==0 && a[k][i]==1) ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:18:8: error: 'n' was not declared in this scope f>>n; ^ componenteconexe.cpp:19:15: error: 'p' was not declared in this scope while (f>>p>>r) ^ componenteconexe.cpp:19:18: error: 'r' was not declared in this scope while (f>>p>>r) ^ componenteconexe.cpp:21:16: error: 'a' was not declared in this scope a[p][r]=1; ^ componenteconexe.cpp:24:5: error: 'nrc' was not declared in this scope nrc=0; ^ componenteconexe.cpp:25:10: error: 'i' was not declared in this scope for (i=1;i<=n;i++) ^ componenteconexe.cpp:26:13: error: 'viz' was not declared in this scope if (viz[i]==0) ^ componenteconexe.cpp:31:10: error: 'i' was not declared in this scope for (i=1;i<=n;i++) ^ componenteconexe.cpp:32:9: error: 'viz' was not declared in this scope viz[i]=0; ^ componenteconexe.cpp:33:10: error: 'k' was not declared in this scope for (k=1;k<=n;k++) ^ componenteconexe.cpp:34:13: error: 'viz' was not declared in this scope if (viz[k]==0) ^ componenteconexe.cpp:37:13: error: 'g' was not declared in this scope g<<endl; ^
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ă.