#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 | #39507432 | Utilizator | |
| Fișier | fata_morgana.cpp | Dimensiune | 907 B |
| Data încărcării | 10 Noiembrie 2022, 11:43 | Scor/rezultat | 0 puncte |
fata_morgana.cpp: In function 'long unsigned int suma(std::vector<long unsigned int>)': fata_morgana.cpp:10:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < v.size()-1; i+=2) { ^ fata_morgana.cpp: In function 'void aranjare(std::vector<long unsigned int>&)': fata_morgana.cpp:23:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < v.size()/2; i++) { ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | Raspuns gresit. | 1 | 0 | ||
| 2 | 0 secunde | Raspuns gresit. | 9 | 0 | ||
| 3 | 0.172 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.172 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.172 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | 0.172 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0.172 secunde | Raspuns gresit. | 10 | 0 | ||
| 8 | 0.176 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0.172 secunde | Raspuns gresit. | 10 | 0 | ||
| 10 | 0.12 secunde | Raspuns gresit. | 10 | 0 | ||
| 11 | 0.172 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 0 | |||||
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ă.