#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 | #27253210 | Utilizator | |
Fișier | componenteconexe.cpp | Dimensiune | 651 B |
Data încărcării | 15 Ianuarie 2021, 12:36 | Scor / rezultat | Eroare de compilare |
componenteconexe.cpp:32:17: warning: multi-character character constant [-Wmultichar] g<<nrc<<'/n'; ^ componenteconexe.cpp:37:12: warning: multi-character character constant [-Wmultichar] g<<'/n'; ^ componenteconexe.cpp:6:33: error: no matching function for call to 'std::basic_ostream<char>::basic_ostream(const char [21])' ostream g("componenteconexe.out"); ^ componenteconexe.cpp:6:33: note: candidates are: In file included from /usr/include/c++/4.8/istream:39:0, from /usr/include/c++/4.8/fstream:38, from componenteconexe.cpp:1: /usr/include/c++/4.8/ostream:384:7: note: std::basic_ostream<_CharT, _Traits>::basic_ostream() [with _CharT = char; _Traits = std::char_traits<char>] basic_ostream() ^ /usr/include/c++/4.8/ostream:384:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/4.8/ostream:84:7: note: std::basic_ostream<_CharT, _Traits>::basic_ostream(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>] basic_ostream(__streambuf_type* __sb) ^ /usr/include/c++/4.8/ostream:84:7: note: no known conversion for argument 1 from 'const char [21]' to 'std::basic_ostream<char>::__streambuf_type* {aka std::basic_streambuf<char>*}' componenteconexe.cpp: In function 'void dfs(int, int)': componenteconexe.cpp:14:22: error: invalid types 'int[int]' for array subscript if(!v[i]&&a[x][i]==1) ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:31:9: error: expected ';' before 'nrc' nrc++: ^
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ă.