#548
Hamilton
Se dă un graf neorientat cu n
vârfuri. Determinați, dacă există, un ciclu hamiltonian.
Problema | Hamilton | Operații I/O |
hamilton.in /hamilton.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49031937 | Utilizator | |
Fișier | hamilton.cpp | Dimensiune | 1.02 KB |
Data încărcării | 13 Februarie 2024, 11:13 | Scor / rezultat | Eroare de compilare |
hamilton.cpp:13:13: warning: missing terminating " character [enabled by default] fout << "1 ^ hamilton.cpp:13:5: error: missing terminating " character fout << "1 ^ hamilton.cpp:14:1: warning: missing terminating " character [enabled by default] "; ^ hamilton.cpp:14:1: error: missing terminating " character hamilton.cpp:17:21: warning: missing terminating " character [enabled by default] fout << x[1] << " ^ hamilton.cpp:17:5: error: missing terminating " character fout << x[1] << " ^ hamilton.cpp:18:1: warning: missing terminating " character [enabled by default] "; ^ hamilton.cpp:18:1: error: missing terminating " character hamilton.cpp: In function 'void afis(int)': hamilton.cpp:15:5: error: expected primary-expression before 'for' for(int i = 1 ; i <= k ; ++ i) ^ hamilton.cpp:15:5: error: expected ';' before 'for' hamilton.cpp:15:22: error: 'i' was not declared in this scope for(int i = 1 ; i <= k ; ++ i) ^ hamilton.cpp:15:35: error: expected ';' before ')' token for(int i = 1 ; i <= k ; ++ i) ^ hamilton.cpp:19:11: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>' and 'int') gasit = 1; ^ hamilton.cpp:19:11: note: candidate is: In file included from /usr/include/c++/4.8/iostream:39:0, from hamilton.cpp:1: /usr/include/c++/4.8/ostream:58:11: note: std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&) <deleted> class basic_ostream : virtual public basic_ios<_CharT, _Traits> ^ /usr/include/c++/4.8/ostream:58:11: note: no known conversion for argument 1 from 'int' to 'const std::basic_ostream<char>&'
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Hamilton 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ă.