#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 | #64907788 | Utilizator | |
| Fișier | afiscicluri.cpp | Dimensiune | 719 B |
| Data încărcării | 11 Iunie 2026, 15:28 | 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:40:14: error: expected unqualified-id before numeric constant 40 | for (int 1=1; 1<=n; 1++) | ^ afiscicluri.cpp:40:13: error: expected ‘;’ before numeric constant 40 | for (int 1=1; 1<=n; 1++) | ^~ | ; afiscicluri.cpp:40:14: error: lvalue required as left operand of assignment 40 | for (int 1=1; 1<=n; 1++) | ^ afiscicluri.cpp:40:20: warning: for increment expression has no effect [-Wunused-value] 40 | for (int 1=1; 1<=n; 1++) | ~^~~ afiscicluri.cpp:40:23: error: expected ‘)’ before ‘;’ token 40 | for (int 1=1; 1<=n; 1++) | ~ ^ | ) afiscicluri.cpp:40:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 40 | for (int 1=1; 1<=n; 1++) | ^~~ afiscicluri.cpp:40:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 40 | for (int 1=1; 1<=n; 1++) | ^ afiscicluri.cpp:40:25: error: lvalue required as increment operand afiscicluri.cpp:46:18: error: ‘i’ was not declared in this scope 46 | viz[i]=0; | ^ afiscicluri.cpp:50:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 50 | int main() | ^~ afiscicluri.cpp:50:9: note: remove parentheses to default-initialize a variable 50 | int main() | ^~ | -- afiscicluri.cpp:50:9: note: or replace parentheses with braces to value-initialize a variable afiscicluri.cpp:51:1: error: expected initializer before ‘citire’ 51 | citire(); | ^~~~~~ afiscicluri.cpp:52:11: error: expected ‘;’ before ‘-’ token 52 | for (int i-1;i<=n;i++) | ^ | ; afiscicluri.cpp:52:15: warning: for increment expression has no effect [-Wunused-value] 52 | for (int i-1;i<=n;i++) | ~^~~ afiscicluri.cpp:52:18: error: expected ‘)’ before ‘;’ token 52 | for (int i-1;i<=n;i++) | ~ ^ | ) afiscicluri.cpp:52:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 52 | for (int i-1;i<=n;i++) | ^~~ afiscicluri.cpp:52:19: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 52 | for (int i-1;i<=n;i++) | ^ afiscicluri.cpp:52:19: error: ‘i’ was not declared in this scope afiscicluri.cpp:54:13: error: return-statement with a value, in function returning ‘void’ [-fpermissive] 54 | 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ă.