#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 | #28699005 | Utilizator | |
Fișier | componenteconexe.cpp | Dimensiune | 795 B |
Data încărcării | 15 Martie 2021, 15:40 | Scor / rezultat | Eroare de compilare |
componenteconexe.cpp:3:1: error: 'ifstream' does not name a type ifstream fin("componenteconexe.in"); ^ componenteconexe.cpp:4:1: error: 'ofstream' does not name a type ofstream fout("componenteconexe.out"); ^ componenteconexe.cpp: In function 'void dfs(int, int)': componenteconexe.cpp:13:12: error: expected ')' before '{' token { ^ componenteconexe.cpp:16:1: error: expected primary-expression before '}' token } ^ componenteconexe.cpp:16:1: error: expected ';' before '}' token componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:20:5: error: 'fin' was not declared in this scope fin>>n; ^ componenteconexe.cpp:23:11: error: expected initializer before '==' token int nr==0; ^ componenteconexe.cpp:24:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ componenteconexe.cpp:27:9: error: 'nr' was not declared in this scope nr++; ^ componenteconexe.cpp:30:5: error: 'fout' was not declared in this scope fout<<nr<<'\n'; ^ componenteconexe.cpp:30:11: error: 'nr' was not declared in this scope fout<<nr<<'\n'; ^ componenteconexe.cpp:32:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ componenteconexe.cpp:34: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ă.