#545
Se dă un graf neorientat cu n vârfuri care este conex și are gradele tuturor vârfurilor pare. Determinați un ciclu eulerian.
| Problema | Euler | Operații I/O |
euler.in/euler.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63329346 | Utilizator | |
| Fișier | euler.cpp | Dimensiune | 774 B |
| Data încărcării | 26 Februarie 2026, 13:19 | Scor/rezultat | Eroare de compilare |
euler.cpp:5:1: error: 'inr' does not name a type inr n, x, y, a[205][205], st[205]; ^ euler.cpp: In function 'int valid(int)': euler.cpp:9:12: error: 'st' was not declared in this scope if(st[i-1]==st[k-1] && st[i]==st[k]) || (st[i-1]==st[k] && st[i]==st[k-1])) ^ euler.cpp:9:46: error: expected primary-expression before '||' token if(st[i-1]==st[k-1] && st[i]==st[k]) || (st[i-1]==st[k] && st[i]==st[k-1])) ^ euler.cpp:9:83: error: expected ';' before ')' token if(st[i-1]==st[k-1] && st[i]==st[k]) || (st[i-1]==st[k] && st[i]==st[k-1])) ^ euler.cpp:11:15: error: 'a' was not declared in this scope if(k>1 && a[st[k]][st[k-1]]==0) ^ euler.cpp:11:17: error: 'st' was not declared in this scope if(k>1 && a[st[k]][st[k-1]]==0) ^ euler.cpp:13:11: error: 'm' was not declared in this scope if(k==m+1 && a[st[k]][st[1]]==0) ^ euler.cpp:13:18: error: 'a' was not declared in this scope if(k==m+1 && a[st[k]][st[1]]==0) ^ euler.cpp:13:20: error: 'st' was not declared in this scope if(k==m+1 && a[st[k]][st[1]]==0) ^ euler.cpp: In function 'int solutie(int)': euler.cpp:19:14: error: 'm' was not declared in this scope return k==m+1; ^ euler.cpp: In function 'int tipar()': euler.cpp:23:21: error: 'm' was not declared in this scope for(int i=1; i<=m+1; i++) ^ euler.cpp:24:12: error: 'st' was not declared in this scope g<<st[i]<<" "; ^ euler.cpp:25:5: error: 'ok' was not declared in this scope ok=1; ^ euler.cpp:26:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ euler.cpp: In function 'void bk(int)': euler.cpp:29:21: error: 'n' was not declared in this scope for(int i=1; i<=n; i++) ^ euler.cpp:31:9: error: 'st' was not declared in this scope st[k]=i; ^ euler.cpp:32:12: error: 'ok' was not declared in this scope if(ok==0) ^ euler.cpp:33:15: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(valid(k)) ^ euler.cpp: In function 'int solutie(int)': euler.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Euler 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ă.