#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 | #28699044 | Utilizator | |
Fișier | componenteconexe.cpp | Dimensiune | 781 B |
Data încărcării | 15 Martie 2021, 15:41 | Scor / rezultat | Eroare de compilare |
componenteconexe.cpp:2:1: error: 'ifstream' does not name a type ifstream fin("componenteconexe.in"); ^ componenteconexe.cpp:3:1: error: 'ofstream' does not name a type ofstream fout("componenteconexe.out"); ^ componenteconexe.cpp: In function 'void dfs(int, int)': componenteconexe.cpp:12:12: error: expected ')' before '{' token { ^ componenteconexe.cpp:15:1: error: expected primary-expression before '}' token } ^ componenteconexe.cpp:15:1: error: expected ';' before '}' token componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:19:5: error: 'fin' was not declared in this scope fin>>n; ^ componenteconexe.cpp:22:11: error: expected initializer before '==' token int nr==0; ^ componenteconexe.cpp:23:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ componenteconexe.cpp:26:9: error: 'nr' was not declared in this scope nr++; ^ componenteconexe.cpp:29:5: error: 'fout' was not declared in this scope fout<<nr<<'\n'; ^ componenteconexe.cpp:29:11: error: 'nr' was not declared in this scope fout<<nr<<'\n'; ^ componenteconexe.cpp:31:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ componenteconexe.cpp:33:13: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^
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ă.