#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 | #9484688 | Utilizator | |
Fișier | hamilton.cpp | Dimensiune | 1.05 KB |
Data încărcării | 07 Mai 2018, 20:18 | Scor / rezultat | 0 puncte |
hamilton.cpp: In function 'void citire()': hamilton.cpp:7:9: warning: unused variable 'i' [-Wunused-variable] int i,n1,n2; ^ hamilton.cpp: In function 'void dfs(int)': hamilton.cpp:17:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=0;i<v[nod].size();i++) ^ hamilton.cpp: In function 'void dfs2(int)': hamilton.cpp:27:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=0;i<v[nod].size();i++) ^ hamilton.cpp: In function 'int main()': hamilton.cpp:37:11: warning: unused variable 'max' [-Wunused-variable] int i,max=-1,maxnod; ^ hamilton.cpp:37:18: warning: unused variable 'maxnod' [-Wunused-variable] int i,max=-1,maxnod; ^ hamilton.cpp:38:37: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("hamilton.in","r",stdin); ^ hamilton.cpp:39:39: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("hamilton.out","w",stdout); ^ hamilton.cpp:40:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Gresit ! | 20 | 0 | Exemplu | |
2 | 0 secunde | Gresit ! | 20 | 0 | ||
3 | 0 secunde | Gresit ! | 60 | 0 | ||
Punctaj total | 0 |
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ă.