#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 | #64263882 | Utilizator | |
| Fișier | nota10.cpp | Dimensiune | 272 B |
| Data încărcării | 27 Aprilie 2026, 09:30 | Scor/rezultat | Eroare de compilare |
nota10.cpp: In function ‘int main()’: nota10.cpp:6:9: error: ‘sync’ was not declared in this scope 6 | ios:sync-with-stdio(false) | ^~~~ nota10.cpp:6:14: error: ‘with’ was not declared in this scope 6 | ios:sync-with-stdio(false) | ^~~~ nota10.cpp:6:19: error: ‘stdio’ was not declared in this scope; did you mean ‘stdin’? 6 | ios:sync-with-stdio(false) | ^~~~~ | stdin nota10.cpp:9:10: error: ‘n’ was not declared in this scope 9 | cin>>n; | ^ nota10.cpp:10:18: error: expected ‘;’ before ‘<=’ token 10 | for(int i=1,i<=n,i++) | ^~ | ; nota10.cpp:10:18: error: expected primary-expression before ‘<=’ token 10 | for(int i=1,i<=n,i++) | ^~ nota10.cpp:10:25: error: expected ‘;’ before ‘)’ token 10 | for(int i=1,i<=n,i++) | ^ | ; nota10.cpp:11:14: error: ‘nr’ was not declared in this scope 11 | cin>>nr; | ^~ nota10.cpp:12:8: error: ‘nr’ was not declared in this scope 12 | if(nr>maxinr): | ^~ nota10.cpp:12:11: error: ‘maxinr’ was not declared in this scope; did you mean ‘main’? 12 | if(nr>maxinr): | ^~~~~~ | main nota10.cpp:12:18: error: expected primary-expression before ‘:’ token 12 | if(nr>maxinr): | ^ nota10.cpp:14:5: error: ‘r’ was not declared in this scope 14 | r++ | ^ nota10.cpp:16:2: error: expected ‘}’ at end of input 16 | { | ^ nota10.cpp:5:1: note: to match this ‘{’ 5 | { | ^ nota10.cpp:6:5: warning: label ‘ios’ defined but not used [-Wunused-label] 6 | ios:sync-with-stdio(false) | ^~~
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ă.