#577
Se dă lista arcelor unui graf orientat. Să se afișeze, în ordine lexicografică, toate circuitele de lungime trei.
| Problema | AfisCircuite | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #62810094 | Utilizator | |
| Fișier | afiscircuite.cpp | Dimensiune | 698 B |
| Data încărcării | 03 Februarie 2026, 09:33 | Scor/rezultat | Eroare de compilare |
afiscircuite.cpp: In function 'void bkt(int)': afiscircuite.cpp:6:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ afiscircuite.cpp:6:16: error: 'n' was not declared in this scope for(i=1;i<=n;i++) ^ afiscircuite.cpp:8:9: error: 'x' was not declared in this scope x[k]=i; ^ afiscircuite.cpp:9:19: error: 'valid' was not declared in this scope if(valid(k)) ^ afiscircuite.cpp:10:25: error: 'solutie' was not declared in this scope if(solutie(k)) ^ afiscircuite.cpp:11:20: error: 'tipar' was not declared in this scope tipar(k); ^ afiscircuite.cpp:14:5: error: expected ';' before '}' token } ^ afiscircuite.cpp:9:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(valid(k)) ^ afiscircuite.cpp: In function 'int valid(int)': afiscircuite.cpp:19:12: error: 'a' was not declared in this scope if(a[x[k-1]][x[k]]==0) ^ afiscircuite.cpp:19:14: error: 'x' was not declared in this scope if(a[x[k-1]][x[k]]==0) ^ afiscircuite.cpp:21:9: error: 'i' was not declared in this scope for(i=1;i<=k-1;i++) ^ afiscircuite.cpp:22:12: error: 'x' was not declared in this scope if(x[k]==x[i]) ^ afiscircuite.cpp:25:12: error: 'a' was not declared in this scope if(a[x[3]][x[1]]==0) ^ afiscircuite.cpp:25:14: error: 'x' was not declared in this scope if(a[x[3]][x[1]]==0) ^ afiscircuite.cpp: In function 'int main()': afiscircuite.cpp:37:10: error: 'n' was not declared in this scope cin>>n>>m; ^ afiscircuite.cpp:38:9: error: 'i' was not declared in this scope for(i=1;i<=m;i++) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema AfisCircuite 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ă.