#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 |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64685802 | Utilizator | |
| Fișier | ordonatdivimp.cpp | Dimensiune | 497 B |
| Data încărcării | 22 Mai 2026, 19:03 | Scor/rezultat | Eroare de compilare |
ordonatdivimp.cpp: In function ‘int divide(int, int, int*)’: ordonatdivimp.cpp:19:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 19 | int main() { | ^~ ordonatdivimp.cpp:19:9: note: remove parentheses to default-initialize a variable 19 | int main() { | ^~ | -- ordonatdivimp.cpp:19:9: note: or replace parentheses with braces to value-initialize a variable ordonatdivimp.cpp:19:12: error: a function-definition is not allowed here before ‘{’ token 19 | int main() { | ^ ordonatdivimp.cpp:29:2: error: expected ‘}’ at end of input 29 | } | ^ ordonatdivimp.cpp:3:37: note: to match this ‘{’ 3 | int divide(int st, int dr, int v[]) { | ^
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ă.