#1329
Sa se verifice dacă un şir dat este şir zigzag.
| Problema | sir_zigzag | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64473092 | Utilizator | |
| Fișier | sir_zigzag.cpp | Dimensiune | 462 B |
| Data încărcării | 09 Mai 2026, 10:12 | Scor/rezultat | 65 puncte |
sir_zigzag.cpp: In function ‘int main()’: sir_zigzag.cpp:15:18: warning: comparisons like ‘X<=Y<=Z’ do not have their mathematical meaning [-Wparentheses] 15 | if(!(v[i]<v[i+1]>v[i+2]) && !(v[i]>v[i+1]<v[i+2])) | ~~~~^~~~~~~ sir_zigzag.cpp:15:43: warning: comparisons like ‘X<=Y<=Z’ do not have their mathematical meaning [-Wparentheses] 15 | if(!(v[i]<v[i+1]>v[i+2]) && !(v[i]>v[i+1]<v[i+2])) | ~~~~^~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 3 | 0.001 secunde | OK. | 5 | 5 | Exemplu | |
| 4 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0.001 secunde | OK. | 10 | 10 | ||
| 8 | 0.001 secunde | OK. | 10 | 10 | ||
| 9 | 0.001 secunde | OK. | 10 | 10 | ||
| 10 | 0.002 secunde | OK. | 10 | 10 | ||
| 11 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| Punctaj total | 65 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sir_zigzag 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ă.