#1326
Sa se verifice dacă un şir dat este şir vale.
| Problema | sir_vale | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64254749 | Utilizator | |
| Fișier | sir_vale.cpp | Dimensiune | 442 B |
| Data încărcării | 26 Aprilie 2026, 14:14 | Scor/rezultat | 100 puncte |
sir_vale.cpp: In function ‘int main()’: sir_vale.cpp:13:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 13 | for(int i=0;i<n;i++) | ^~~ sir_vale.cpp:15:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 15 | int i=0; | ^~~ sir_vale.cpp:16:2: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] 16 | while(i<n-1 && v[i]> v[i+1]) | ^~~~~ sir_vale.cpp:18:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ 18 | if(i == 0 || i == n-1){ | ^~ sir_vale.cpp:26:2: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation] 26 | else | ^~~~ sir_vale.cpp:29:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ 29 | return 0; | ^~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.002 secunde | OK. | 10 | 10 | Exemplu | |
| 3 | 0.002 secunde | OK. | 10 | 10 | ||
| 4 | 0.002 secunde | OK. | 10 | 10 | ||
| 5 | 0.002 secunde | OK. | 10 | 10 | ||
| 6 | 0.002 secunde | OK. | 10 | 10 | ||
| 7 | 0.002 secunde | OK. | 10 | 10 | ||
| 8 | 0.001 secunde | OK. | 10 | 10 | ||
| 9 | 0.001 secunde | OK. | 10 | 10 | ||
| 10 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sir_vale 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ă.