#4635
Se dă un graf orientat cu n
vârfuri și m
arce. Să se determine toate circuitele elementare formate din vârfuri care au aceeași paritate.
Problema | CircuiteParitate | Operații I/O |
![]() circuiteparitate.in /circuiteparitate.out
|
---|---|---|---|
Limita timp | 0.4 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58146448 | Utilizator | |
Fișier | circuiteparitate.cpp | Dimensiune | 713 B |
Data încărcării | 16 Mai 2025, 11:45 | Scor / rezultat | Eroare de compilare |
circuiteparitate.cpp:4:10: error: expected unqualified-id before string constant ifstream("circuiteparitate.in"); ^ circuiteparitate.cpp:4:10: error: expected ')' before string constant circuiteparitate.cpp:5:10: error: expected unqualified-id before string constant ofstream("circuiteparitate.out") ^ circuiteparitate.cpp:5:10: error: expected ')' before string constant circuiteparitate.cpp: In function 'void afis(int)': circuiteparitate.cpp:12:29: error: 'g' was not declared in this scope for (int i=1; i<=k; i++)g<<x[i]<< " "; ^ circuiteparitate.cpp:12:32: error: 'x' was not declared in this scope for (int i=1; i<=k; i++)g<<x[i]<< " "; ^ circuiteparitate.cpp:13:5: error: 'g' was not declared in this scope g<<"\n"; ^ circuiteparitate.cpp: In function 'int valid(int)': circuiteparitate.cpp:20:12: error: 'a' was not declared in this scope if(k>=2)if(a[x[k-1]][x[k]]==0)return 0; ^ circuiteparitate.cpp:20:14: error: 'x' was not declared in this scope if(k>=2)if(a[x[k-1]][x[k]]==0)return 0; ^ circuiteparitate.cpp: In function 'void bkt(int)': circuiteparitate.cpp:27:22: error: 'n' was not declared in this scope for (int i=1; i<=n &&ok==0;i++) ^ circuiteparitate.cpp:27:26: error: 'ok' was not declared in this scope for (int i=1; i<=n &&ok==0;i++) ^ circuiteparitate.cpp:28:12: error: 'fr' was not declared in this scope if(fr[i]==0) ^ circuiteparitate.cpp:29:6: error: 'x' was not declared in this scope {x[k]=1; ^ circuiteparitate.cpp:31:8: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(valid(k))if(k==n){ok=1;afis(k);} ^ circuiteparitate.cpp: In function 'int main()': circuiteparitate.cpp:40:3: error: 'f' was not declared in this scope f>>n>>m; ^ circuiteparitate.cpp:40:6: error: 'n' was not declared in this scope f>>n>>m; ^ circuiteparitate.cpp:40:9: error: 'm' was not declared in this scope f>>n>>m; ^ circuiteparitate.cpp:44:6: error: 'a' was not declared in this scope a[v1][v2]=1; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CircuiteParitate 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ă.