#3972
În timpul vacanței cu familia Maria a vizitat multe obiective turistice. Ce a impresionat-o cel mai mult a fost un zid imens făcut din pietre. Zidul avea o formă dreptunghiulară și era format din pietre individuale de aceeași înălțime (cu lățimi nu neapărat egale), aranjate pe linii, una deasupra celeilalte. Numărul de pietre din zid era N, ele fiind numerotate cu numere întregi de la 1 la N. Pe fiecare piatră era scris numărul ei de ordine. Maria a constatat că pietrele de pe o linie nu sunt neapărat așezate (de la stânga la dreapta) în ordinea crescătoare a numerelor de ordine. Scrieți un program care determină dimensiunile dreptunghiului de arie minimă, care să reproducă zidul, conform cerințelor Mariei.
Turneul Internațional Shumen 2021
| Problema | wall | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.8 secunde | Limita memorie |
Total: 256 MB
/
Stivă 128 MB
|
| Id soluție | #57410291 | Utilizator | |
| Fișier | wall.cpp | Dimensiune | 4.91 KB |
| Data încărcării | 30 Martie 2025, 00:31 | Scor/rezultat | 2 puncte |
wall.cpp: In function 'int main()': wall.cpp:154:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int j = 1; j < stones.size(); ++j) { ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | The arrangement does not match wall's dimensions | 2 | 0 | ||
| 2 | 0 secunde | The arrangement does not match wall's dimensions | 2 | 0 | ||
| 3 | 0 secunde | The arrangement does not match wall's dimensions | 2 | 0 | ||
| 4 | 0 secunde | The arrangement does not match wall's dimensions | 2 | 0 | ||
| 5 | 0 secunde | Invalid arrangement of the stones | 2 | 0 | ||
| 6 | 0 secunde | The arrangement does not match wall's dimensions | 2 | 0 | ||
| 7 | 0 secunde | Correct answer | 2 | 2 | ||
| 8 | 0 secunde | The arrangement does not match wall's dimensions | 2 | 0 | ||
| 9 | 0 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 10 | 0 secunde | The area of the wall is not minimal | 3 | 0 | ||
| 11 | 0 secunde | The area of the wall is not minimal | 3 | 0 | ||
| 12 | 0 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 13 | 0.028 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 14 | 0.008 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 15 | 0.004 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 16 | 0.32 secunde | The area of the wall is not minimal | 3 | 0 | ||
| 17 | 0.068 secunde | The area of the wall is not minimal | 3 | 0 | ||
| 18 | 0.012 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 19 | 0.76 secunde | The area of the wall is not minimal | 3 | 0 | ||
| 20 | 0.224 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 21 | 0.048 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 22 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 23 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 24 | 0.14 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 25 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 26 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 27 | 0.208 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 28 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 29 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 30 | 0.304 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 31 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 32 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 33 | 0.4 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| 34 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 35 | Depășit | Limita de timp depășită | 3 | 0 | ||
| 36 | 0.316 secunde | The arrangement does not match wall's dimensions | 3 | 0 | ||
| Punctaj total | 2 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema wall 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ă.