#3688
Dându-se un vector de n numere, trebuie rearanjate valorile din vector astfel încât (v[1] - v[2]) * (v[3] - v[4]) * …. * (v[n-1] * v[n]) sa fie maxim.
IOIT 2020-21, Runda 3
| Problema | Fata Morgana | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 32 MB
/
Stivă 32 MB
|
| Id soluție | #63339109 | Utilizator | |
| Fișier | fata_morgana.cpp | Dimensiune | 655 B |
| Data încărcării | 26 Februarie 2026, 18:55 | Scor/rezultat | 1 puncte |
fata_morgana.cpp: In function 'int main()': fata_morgana.cpp:13:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=1; i<=k; i++){ ^ fata_morgana.cpp:19:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=1; i<=k/2; i++){ ^ fata_morgana.cpp:22:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=1; i<=k/2; i++){ ^ fata_morgana.cpp:29:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=1; i<=k/2; i++){ ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 1 | 1 | ||
| 2 | 0 secunde | Raspuns gresit. | 9 | 0 | ||
| 3 | 0.288 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.288 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.292 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | 0.284 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0.284 secunde | Raspuns gresit. | 10 | 0 | ||
| 8 | 0.284 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0.284 secunde | Raspuns gresit. | 10 | 0 | ||
| 10 | 0.22 secunde | Raspuns gresit. | 10 | 0 | ||
| 11 | 0.288 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 1 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Fata Morgana 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ă.