#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 | #5433617 | Utilizator | |
Fișier | componenteconexe.cpp | Dimensiune | 848 B |
Data încărcării | 12 Iulie 2017, 21:20 | Scor / rezultat | Eroare de compilare |
componenteconexe.cpp: In function 'void dfs(int)': componenteconexe.cpp:10:3: error: 'viz' was not declared in this scope viz[nod] = 1; ^ componenteconexe.cpp:12:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < v[nod].size() ; ++ i) ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:27:9: error: 'viz' was not declared in this scope if (viz[i] == 0) { ^ componenteconexe.cpp:34:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int j = 0; j < mat[i].size(); ++j) { ^ componenteconexe.cpp:17:46: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen ("componenteconexe.in", "r", stdin); ^ componenteconexe.cpp:18:48: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen ("componenteconexe.out", "w", stdout); ^ componenteconexe.cpp:20:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf ("%d", &n); ^
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ă.