#4356
Se dă un vector cu n
elemente numere naturale. Folosind metoda Divide et Impera să se verifice dacă are elementele ordonate strict crescător sau strict descrescător.
Problema | OrdonatDivImp | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57514944 | Utilizator | |
Fișier | ordonatdivimp.cpp | Dimensiune | 694 B |
Data încărcării | 03 Aprilie 2025, 05:55 | Scor / rezultat | Eroare de compilare |
ordonatdivimp.cpp: In function 'bool Cresc(int, int, int)': ordonatdivimp.cpp:11:18: warning: left operand of comma operator has no effect [-Wunused-value] return(st, mij, a[mij - 1]) && (mij + 1, dr, a[dr - 1]); ^ ordonatdivimp.cpp:11:32: warning: right operand of comma operator has no effect [-Wunused-value] return(st, mij, a[mij - 1]) && (mij + 1, dr, a[dr - 1]); ^ ordonatdivimp.cpp:11:43: warning: left operand of comma operator has no effect [-Wunused-value] return(st, mij, a[mij - 1]) && (mij + 1, dr, a[dr - 1]); ^ ordonatdivimp.cpp:11:60: warning: right operand of comma operator has no effect [-Wunused-value] return(st, mij, a[mij - 1]) && (mij + 1, dr, a[dr - 1]); ^ ordonatdivimp.cpp: In function 'bool Descresc(int, int, int)': ordonatdivimp.cpp:19:18: warning: left operand of comma operator has no effect [-Wunused-value] return(st, mij, a[mij - 1]) && (mij + 1, dr, a[dr - 1]); ^ ordonatdivimp.cpp:19:32: warning: right operand of comma operator has no effect [-Wunused-value] return(st, mij, a[mij - 1]) && (mij + 1, dr, a[dr - 1]); ^ ordonatdivimp.cpp:19:43: warning: left operand of comma operator has no effect [-Wunused-value] return(st, mij, a[mij - 1]) && (mij + 1, dr, a[dr - 1]); ^ ordonatdivimp.cpp:19:60: warning: right operand of comma operator has no effect [-Wunused-value] return(st, mij, a[mij - 1]) && (mij + 1, dr, a[dr - 1]); ^ ordonatdivimp.cpp: In function 'int main()': ordonatdivimp.cpp:28:16: error: 'v' was not declared in this scope cin >> v[i]; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema OrdonatDivImp 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ă.