#1320
Să se verifice dacă in șir este: șir constant, șir strict crescător, șir crescător, șir strict descrescător, șir descrescător, șir neordonat.
| Problema | ordonat_neordonat | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64461212 | Utilizator | |
| Fișier | ordonat_neordonat.cpp | Dimensiune | 627 B |
| Data încărcării | 08 Mai 2026, 09:19 | Scor/rezultat | Eroare de compilare |
ordonat_neordonat.cpp: In function ‘int main()’: ordonat_neordonat.cpp:13:25: error: ‘ok1’ was not declared in this scope 13 | if(v[i-1]!=v[i])ok1=0; | ^~~ ordonat_neordonat.cpp:14:25: error: ‘ok2’ was not declared in this scope 14 | if(v[i-1]>=v[i])ok2=0; | ^~~ ordonat_neordonat.cpp:15:24: error: ‘ok3’ was not declared in this scope 15 | if(v[i-1]>v[i])ok3=0; | ^~~ ordonat_neordonat.cpp:16:25: error: ‘ok4’ was not declared in this scope 16 | if(v[i-1]<=v[i])ok4=0; | ^~~ ordonat_neordonat.cpp:17:24: error: ‘ok5’ was not declared in this scope 17 | if(v[i-1]<v[i])ok5=0; | ^~~ ordonat_neordonat.cpp:19:8: error: ‘ok1’ was not declared in this scope 19 | if(ok1)cout<<"sir constant"; | ^~~ ordonat_neordonat.cpp:20:13: error: ‘ok2’ was not declared in this scope 20 | else if(ok2)cout<<"sir strict crescator"; | ^~~ ordonat_neordonat.cpp:21:13: error: ‘ok3’ was not declared in this scope 21 | else if(ok3)cout<<"sir crescator"; | ^~~ ordonat_neordonat.cpp:22:13: error: ‘ok4’ was not declared in this scope 22 | else if(ok4)cout<<"sir strict descrescator"; | ^~~ ordonat_neordonat.cpp:23:13: error: ‘ok5’ was not declared in this scope 23 | else if(ok5)cout<<"sir descrescator"; | ^~~ ordonat_neordonat.cpp:7:21: warning: unused variable ‘egal’ [-Wunused-variable] 7 | int n,i,v[1001],egal=1,cresc=1,scresc=1,descr=1,sdescr=1; | ^~~~ ordonat_neordonat.cpp:7:28: warning: unused variable ‘cresc’ [-Wunused-variable] 7 | int n,i,v[1001],egal=1,cresc=1,scresc=1,descr=1,sdescr=1; | ^~~~~ ordonat_neordonat.cpp:7:36: warning: unused variable ‘scresc’ [-Wunused-variable] 7 | int n,i,v[1001],egal=1,cresc=1,scresc=1,descr=1,sdescr=1; | ^~~~~~ ordonat_neordonat.cpp:7:45: warning: unused variable ‘descr’ [-Wunused-variable] 7 | int n,i,v[1001],egal=1,cresc=1,scresc=1,descr=1,sdescr=1; | ^~~~~ ordonat_neordonat.cpp:7:53: warning: unused variable ‘sdescr’ [-Wunused-variable] 7 | int n,i,v[1001],egal=1,cresc=1,scresc=1,descr=1,sdescr=1; | ^~~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ordonat_neordonat 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ă.