#287
Se dau n şiruri cu elemente numere întregi. Să se verifice despre fiecare dacă este ordonat crescător.
| Problema | VerifOrd | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64817802 | Utilizator | |
| Fișier | veriford.cpp | Dimensiune | 346 B |
| Data încărcării | 03 Iunie 2026, 12:45 | Scor/rezultat | Eroare de compilare |
veriford.cpp: In function ‘int main()’: veriford.cpp:7:6: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 7 | for(j=1;j<=n;j++) | ^~~ veriford.cpp:9:10: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 9 | bool ok=1; | ^~~~ veriford.cpp:11:13: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 11 | if(v[j]>v[j+1] | ^ veriford.cpp:11:24: error: expected ‘;’ before ‘ok’ 11 | if(v[j]>v[j+1] | ^ | ; 12 | ok=0; | ~~ veriford.cpp:11:17: warning: statement has no effect [-Wunused-value] 11 | if(v[j]>v[j+1] | ~~~~^~~~~~~ veriford.cpp:13:23: error: expected ‘)’ before ‘;’ token 13 | cout<<"NU"; | ^ | ) veriford.cpp:11:12: note: to match this ‘(’ 11 | if(v[j]>v[j+1] | ^ veriford.cpp:14:13: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation] 14 | else | ^~~~ veriford.cpp:15:24: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ 15 | cout<<"DA"; | ^ veriford.cpp:15:24: error: expected ‘}’ at end of input veriford.cpp:5:5: note: to match this ‘{’ 5 | {cin>>m>>n; | ^ veriford.cpp:9:15: warning: unused variable ‘ok’ [-Wunused-variable] 9 | bool ok=1; | ^~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema VerifOrd 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ă.