#180
Să se ordoneze crescător elementele dintr-un şir dat cuprinse între elementul de valoare maximă şi cel de valoare minimă.
| Problema | sortMinMax | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64535055 | Utilizator | |
| Fișier | sortminmax.cpp | Dimensiune | 828 B |
| Data încărcării | 13 Mai 2026, 00:30 | Scor/rezultat | Eroare de compilare |
sortminmax.cpp: In function ‘int main()’: sortminmax.cpp:21:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 21 | if(v[i]>v[max]) | ^~ sortminmax.cpp:23:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 23 | if(v[i]<v[min]) | ^~ sortminmax.cpp:27:13: error: cannot resolve overloaded function ‘min’ based on conversion to type ‘int’ 27 | int st=min; | ^~~ sortminmax.cpp:28:13: error: cannot resolve overloaded function ‘max’ based on conversion to type ‘int’ 28 | int dr=max; | ^~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sortMinMax 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ă.