#4102
Se dă un vector cu n elemente numere întregi.
Să se ordoneze crescător subșirul format din elementele pare din vector și descrescător subșirul format din elementele impare.
| Problema | HalfSort3 | Operații I/O |
halfsort3.in/halfsort3.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64596735 | Utilizator | |
| Fișier | halfsort3.cpp | Dimensiune | 550 B |
| Data încărcării | 17 Mai 2026, 20:27 | Scor/rezultat | 0 puncte |
halfsort3.cpp: In function ‘int main()’: halfsort3.cpp:18:4: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 18 | for(int j=i+1; j<=n; j++) | ^~~ halfsort3.cpp:22:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 22 | for(int i=n; i>=1; i--) | ^~~ halfsort3.cpp:23:4: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 23 | for(int j=i+1; j<=n; j++) | ^~~ halfsort3.cpp:27:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 27 | for(int i=1; i<=n; i++) | ^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.002 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.002 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema HalfSort3 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ă.