#576
Se dă lista arcelor unui graf orientat. Să se afișeze, în ordine lexicografică, toate ciclurile de lungime trei.
| Problema | AfisCicluri | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64907800 | Utilizator | |
| Fișier | afiscicluri.cpp | Dimensiune | 721 B |
| Data încărcării | 11 Iunie 2026, 15:30 | Scor/rezultat | Eroare de compilare |
afiscicluri.cpp: In function ‘void afis()’: afiscicluri.cpp:19:11: error: ‘so1’ was not declared in this scope; did you mean ‘sol’? 19 | cout<<so1[1]<<" "<<so1[2]<<" "<<so1[3]<end]; | ^~~ | sol afiscicluri.cpp: In function ‘void bkt(int, int)’: afiscicluri.cpp:35:1: error: ‘}’ was not declared in this scope 35 | } | ^~ afiscicluri.cpp:41:48: error: ‘il’ was not declared in this scope; did you mean ‘i’? 41 | if ((a[k][i]==1 || a[i][k]==1) && !viz[il) | ^~ | i afiscicluri.cpp:41:50: error: expected ‘]’ before ‘)’ token 41 | if ((a[k][i]==1 || a[i][k]==1) && !viz[il) | ^ | ] afiscicluri.cpp:41:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 41 | if ((a[k][i]==1 || a[i][k]==1) && !viz[il) | ^~ afiscicluri.cpp:45:14: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 45 | viz[i]=0; | ^~~ afiscicluri.cpp:49:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 49 | int main() | ^~ afiscicluri.cpp:49:9: note: remove parentheses to default-initialize a variable 49 | int main() | ^~ | -- afiscicluri.cpp:49:9: note: or replace parentheses with braces to value-initialize a variable afiscicluri.cpp:50:1: error: expected initializer before ‘citire’ 50 | citire(); | ^~~~~~ afiscicluri.cpp:51:11: error: expected ‘;’ before ‘-’ token 51 | for (int i-1;i<=n;i++) | ^ | ; afiscicluri.cpp:51:15: warning: for increment expression has no effect [-Wunused-value] 51 | for (int i-1;i<=n;i++) | ~^~~ afiscicluri.cpp:51:18: error: expected ‘)’ before ‘;’ token 51 | for (int i-1;i<=n;i++) | ~ ^ | ) afiscicluri.cpp:51:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 51 | for (int i-1;i<=n;i++) | ^~~ afiscicluri.cpp:51:19: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 51 | for (int i-1;i<=n;i++) | ^ afiscicluri.cpp:51:19: error: ‘i’ was not declared in this scope afiscicluri.cpp:53:13: error: return-statement with a value, in function returning ‘void’ [-fpermissive] 53 | return 0; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema AfisCicluri 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ă.