#4356
OrdonatDivImp
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 | #49448284 | Utilizator | |
Fișier | ordonatdivimp.cpp | Dimensiune | 610 B |
Data încărcării | 02 Martie 2024, 10:44 | Scor / rezultat | 0 puncte |
ordonatdivimp.cpp: In function 'int main()': ordonatdivimp.cpp:23:7: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(ODI(a,1,n)==1) ^ ordonatdivimp.cpp:19:21: warning: unused variable 'max1' [-Wunused-variable] int a[1001],n,i,max1,max2,mij; ^ ordonatdivimp.cpp:19:26: warning: unused variable 'max2' [-Wunused-variable] int a[1001],n,i,max1,max2,mij; ^ ordonatdivimp.cpp:24:16: warning: 'mij' may be used uninitialized in this function [-Wmaybe-uninitialized] if(a[mij]<=a[mij+1]) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
2 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
Punctaj total | 0 |
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ă.