#4809
Se dă un număr n și apoi un șir cu n elemente, numere naturale nenule. Să se determine câte dintre numerele din șir sunt strict mai mari decât precedentele lor.
adhoc
| Problema | nota10 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 1 MB
/
Stivă 1 MB
|
| Id soluție | #64633938 | Utilizator | |
| Fișier | nota10.cpp | Dimensiune | 267 B |
| Data încărcării | 19 Mai 2026, 16:02 | Scor/rezultat | Eroare de compilare |
nota10.cpp:12:24: warning: missing terminating ' character 12 | } if(OK==1) nr++' | ^ nota10.cpp:12:24: error: missing terminating ' character nota10.cpp: In function ‘int main()’: nota10.cpp:5:11: error: ‘i’ was not declared in this scope 5 | int v[i],nr | ^ nota10.cpp:6:5: error: expected initializer before ‘nr’ 6 | nr=1; | ^~ nota10.cpp:7:10: error: ‘v’ was not declared in this scope 7 | cin>>v[i]; | ^ nota10.cpp:8:16: error: ‘n’ was not declared in this scope 8 | for(i=2;i<=n,i++) | ^ nota10.cpp:8:21: error: expected ‘;’ before ‘)’ token 8 | for(i=2;i<=n,i++) | ^ | ; nota10.cpp:9:3: error: ‘OK’ was not declared in this scope 9 | OK=1; | ^~ nota10.cpp:11:8: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 11 | if(v[j]>=v[i] OK=0; | ^ nota10.cpp:12:8: error: expected primary-expression before ‘}’ token 12 | } if(OK==1) nr++' | ^ nota10.cpp:11:24: error: expected ‘)’ before ‘}’ token 11 | if(v[j]>=v[i] OK=0; | ~ ^ | ) 12 | } if(OK==1) nr++' | ~ nota10.cpp:12:8: error: expected primary-expression before ‘}’ token 12 | } if(OK==1) nr++' | ^ nota10.cpp: At global scope: nota10.cpp:12:10: error: expected unqualified-id before ‘if’ 12 | } if(OK==1) nr++' | ^~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema nota10 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ă.