#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 | #64918202 | Utilizator | |
| Fișier | ordonat_neordonat.cpp | Dimensiune | 795 B |
| Data încărcării | 13 Iunie 2026, 10:12 | Scor/rezultat | Eroare de compilare |
ordonat_neordonat.cpp:27:13: warning: character constant too long for its type 27 | cout << 'sir constant' ; | ^~~~~~~~~~~~~~ ordonat_neordonat.cpp:30:13: warning: character constant too long for its type 30 | cout << 'sir strict descrescator' ; | ^~~~~~~~~~~~~~~~~~~~~~~~~ ordonat_neordonat.cpp:33:13: warning: character constant too long for its type 33 | cout << 'sir strict crescator' ; | ^~~~~~~~~~~~~~~~~~~~~~ ordonat_neordonat.cpp:36:14: warning: character constant too long for its type 36 | cout << 'sir descrescator' ; | ^~~~~~~~~~~~~~~~~~ ordonat_neordonat.cpp:39:14: warning: character constant too long for its type 39 | cout << 'sir crescator' ; | ^~~~~~~~~~~~~~~ ordonat_neordonat.cpp:42:13: warning: character constant too long for its type 42 | cout << 'sir neordonat' ; | ^~~~~~~~~~~~~~~ ordonat_neordonat.cpp: In function ‘int main()’: ordonat_neordonat.cpp:5:22: error: expected unqualified-id before ‘const’ 5 | int v[1000] , i,n,const=0, strdesc=0, strcresc=0, cresc=0, desc=0; | ^~~~~ ordonat_neordonat.cpp:9:4: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | for(i=0; i<n; i++) | ^~~ ordonat_neordonat.cpp:11:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | for(i=1; i<n; i++){ | ^~~ ordonat_neordonat.cpp:14:10: error: expected unqualified-id before ‘=’ token 14 | const=0; | ^ ordonat_neordonat.cpp:16:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 16 | if(v[i] = v[i+1]) | ~~~~~^~~~~~~~ ordonat_neordonat.cpp:17:5: error: ‘strdesc’ was not declared in this scope 17 | strdesc=0; | ^~~~~~~ ordonat_neordonat.cpp:18:5: error: ‘strcresc’ was not declared in this scope 18 | strcresc=0; | ^~~~~~~~ ordonat_neordonat.cpp:21:5: error: ‘cresc’ was not declared in this scope 21 | cresc=1; | ^~~~~ ordonat_neordonat.cpp:24:5: error: ‘desc’ was not declared in this scope 24 | desc=1; | ^~~~ ordonat_neordonat.cpp:26:13: error: expected unqualified-id before ‘=’ token 26 | if(const=1) | ^ ordonat_neordonat.cpp:29:13: error: ‘strdesc’ was not declared in this scope 29 | else if(strdesc=1) | ^~~~~~~ ordonat_neordonat.cpp:32:13: error: ‘strcresc’ was not declared in this scope 32 | else if(strcresc=1) | ^~~~~~~~ ordonat_neordonat.cpp:35:13: error: ‘cresc’ was not declared in this scope 35 | else if(cresc=0) | ^~~~~ ordonat_neordonat.cpp:38:14: error: ‘desc’ was not declared in this scope 38 | else if(desc=0) | ^~~~
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ă.