#396
Se dă un șir cu n elemente, numere naturale. Determinați un cel mai lung subșir crescător al șirului.
| Problema | SCLM | Operații I/O |
sclm.in/sclm.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64627048 | Utilizator | |
| Fișier | sclm.cpp | Dimensiune | 740 B |
| Data încărcării | 19 Mai 2026, 11:41 | Scor/rezultat | 100 puncte |
sclm.cpp: In function ‘int main()’: sclm.cpp:10:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 10 | for(int i=1;i<=n;i++) | ^~~ sclm.cpp:12:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | f[1]=1; | ^ sclm.cpp:28:9: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] 28 | while(j>=1 && f[j]!=cnt ) | ^~~~~ sclm.cpp:30:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ 30 | s[cnt]=j; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | Corect! | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | Corect! | 20 | 20 | ||
| 3 | 0.001 secunde | Corect! | 20 | 20 | ||
| 4 | 0.001 secunde | Corect! | 20 | 20 | ||
| 5 | 0.014 secunde | Corect! | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SCLM 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ă.