#512
Se dă un vector cu n elemente, numere naturale distincte. Ordonați crescător elementele situate înaintea valorii maxime din vector și descrescător elementele situate după această valoare.
| Problema | SortMax | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64767667 | Utilizator | |
| Fișier | sortmax.cpp | Dimensiune | 832 B |
| Data încărcării | 28 Mai 2026, 19:29 | Scor/rezultat | 0 puncte |
sortmax.cpp: In function ‘int main()’: sortmax.cpp:35:19: warning: array subscript -1 is below array bounds of ‘int [1001]’ [-Warray-bounds=] 35 | if(v[i]<v[j]) | ~~~^ sortmax.cpp:5:9: note: while referencing ‘v’ 5 | int v[1001],i,j,n,aux,maxi,poz; | ^ sortmax.cpp:38:20: warning: array subscript -1 is below array bounds of ‘int [1001]’ [-Warray-bounds=] 38 | v[i]=v[j]; | ~~~^ sortmax.cpp:5:9: note: while referencing ‘v’ 5 | int v[1001],i,j,n,aux,maxi,poz; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | Depășit | Limita de timp depășită | 20 | 0 | Exemplu | |
| 2 | Depășit | Limita de timp depășită | 40 | 0 | ||
| 3 | Depășit | Limita de timp depășită | 40 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SortMax 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ă.