#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 | #64419779 | Utilizator | |
| Fișier | ordonat_neordonat.cpp | Dimensiune | 723 B |
| Data încărcării | 06 Mai 2026, 08:43 | Scor/rezultat | Eroare de compilare |
ordonat_neordonat.cpp: In function ‘int main()’: ordonat_neordonat.cpp:15:23: error: expected ‘]’ before ‘)’ token 15 | if(v[i!=v[i-1]) k=0; | ^ | ] ordonat_neordonat.cpp:15:25: error: ‘k’ was not declared in this scope 15 | if(v[i!=v[i-1]) k=0; | ^ ordonat_neordonat.cpp:16:23: error: expected ‘]’ before ‘)’ token 16 | if(v[i<=v[i-1]) sc=0; | ^ | ] ordonat_neordonat.cpp:16:25: error: ‘sc’ was not declared in this scope 16 | if(v[i<=v[i-1]) sc=0; | ^~ ordonat_neordonat.cpp:17:22: error: expected ‘]’ before ‘)’ token 17 | if(v[i<v[i-1]) c=0; | ^ | ] ordonat_neordonat.cpp:17:24: error: ‘c’ was not declared in this scope 17 | if(v[i<v[i-1]) c=0; | ^ ordonat_neordonat.cpp:18:22: error: expected ‘]’ before ‘)’ token 18 | if(v[i>v[i-1]) d=0; | ^ | ] ordonat_neordonat.cpp:18:24: error: ‘d’ was not declared in this scope 18 | if(v[i>v[i-1]) d=0; | ^ ordonat_neordonat.cpp:19:23: error: expected ‘]’ before ‘)’ token 19 | if(v[i>=v[i-1]) sd=0; | ^ | ] ordonat_neordonat.cpp:19:25: error: ‘sd’ was not declared in this scope; did you mean ‘std’? 19 | if(v[i>=v[i-1]) sd=0; | ^~ | std ordonat_neordonat.cpp:21:8: error: ‘k’ was not declared in this scope 21 | if(k==1){ cout<<"sir constant"; return 0;} | ^ ordonat_neordonat.cpp:22:8: error: ‘sc’ was not declared in this scope 22 | if(sc==1){ cout<<"sir strict crescator"; return 0;} | ^~ ordonat_neordonat.cpp:23:8: error: ‘sd’ was not declared in this scope; did you mean ‘std’? 23 | if(sd==1){ cout<<"sir strict descrescator"; return 0;} | ^~ | std ordonat_neordonat.cpp:24:8: error: ‘c’ was not declared in this scope 24 | if(c==1){ cout<<"sir crescator"; return 0;} | ^ ordonat_neordonat.cpp:25:8: error: ‘d’ was not declared in this scope 25 | if(d==1){ cout<<"sir descrescator"; return 0;} | ^ ordonat_neordonat.cpp:26:8: error: ‘k’ was not declared in this scope 26 | if(k==0 and sc==0 and sd==0 and c==0 and d==0) cout<<"sir neordonat"; | ^ ordonat_neordonat.cpp:26:17: error: ‘sc’ was not declared in this scope 26 | if(k==0 and sc==0 and sd==0 and c==0 and d==0) cout<<"sir neordonat"; | ^~ ordonat_neordonat.cpp:26:27: error: ‘sd’ was not declared in this scope; did you mean ‘std’? 26 | if(k==0 and sc==0 and sd==0 and c==0 and d==0) cout<<"sir neordonat"; | ^~ | std ordonat_neordonat.cpp:26:37: error: ‘c’ was not declared in this scope 26 | if(k==0 and sc==0 and sd==0 and c==0 and d==0) cout<<"sir neordonat"; | ^ ordonat_neordonat.cpp:26:46: error: ‘d’ was not declared in this scope 26 | if(k==0 and sc==0 and sd==0 and c==0 and d==0) cout<<"sir neordonat"; | ^ ordonat_neordonat.cpp:7:29: warning: unused variable ‘x’ [-Wunused-variable] 7 | long long v[501], i, n, x, j, nr=1; | ^ ordonat_neordonat.cpp:7:32: warning: unused variable ‘j’ [-Wunused-variable] 7 | long long v[501], i, n, x, j, nr=1; | ^ ordonat_neordonat.cpp:7:35: warning: unused variable ‘nr’ [-Wunused-variable] 7 | long long v[501], i, n, x, j, nr=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ă.