#4448
Un joc de lego are P piese care sunt cuburi identice. Dorel se joacă cu ele pentru a construi diverse jucării, dar pentru aceasta are nevoie de ajutorul vostru. Cunoscându-se numărul de piese P pe care le are, Dorel vrea să știe:
1) Numărul de piese din care poate să construiască cea mai mare fundație.
2) Numărul de piese din cel mai înalt turn care se poate construi.
3) Numărul de terenuri de legoball care se pot construi folosind toate piesele de lego.
| Problema | legos | Operații I/O |
legos.in/legos.out
|
|---|---|---|---|
| Limita timp | 0.05 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63728726 | Utilizator | |
| Fișier | legos.cpp | Dimensiune | 1.77 KB |
| Data încărcării | 16 Martie 2026, 22:13 | Scor/rezultat | 88 puncte |
legos.cpp: In function 'int cerinta2()': legos.cpp:62:13: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] else if (etajecu3==etajecu4) ^ legos.cpp:67:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ legos.cpp: In function 'int cerinta3()': legos.cpp:77:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ legos.cpp: In function 'int cerinta2()': legos.cpp:58:30: warning: 'piesefolosite4' may be used uninitialized in this function [-Wmaybe-uninitialized] cout<<"piese folosite "<<piesefolosite4<<endl; ^ legos.cpp:44:30: warning: 'piesefolosite3' may be used uninitialized in this function [-Wmaybe-uninitialized] cout<<"piese folosite "<<piesefolosite3<<endl; ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 2 | 2 | ||
| 2 | 0 secunde | OK. | 1 | 1 | ||
| 3 | 0 secunde | OK. | 1 | 1 | ||
| 4 | 0 secunde | OK. | 2 | 2 | ||
| 5 | 0 secunde | OK. | 1 | 1 | ||
| 6 | 0 secunde | OK. | 1 | 1 | ||
| 7 | 0 secunde | OK. | 2 | 2 | ||
| 8 | 0 secunde | OK. | 1 | 1 | ||
| 9 | 0 secunde | OK. | 2 | 2 | ||
| 10 | 0 secunde | OK. | 1 | 1 | ||
| 11 | 0 secunde | OK. | 2 | 2 | ||
| 12 | 0 secunde | OK. | 1 | 1 | ||
| 13 | 0 secunde | OK. | 2 | 2 | ||
| 14 | 0 secunde | OK. | 1 | 1 | ||
| 15 | 0 secunde | OK. | 1 | 1 | ||
| 16 | 0 secunde | OK. | 1 | 1 | ||
| 17 | 0 secunde | OK. | 2 | 2 | ||
| 18 | 0 secunde | OK. | 1 | 1 | ||
| 19 | 0 secunde | OK. | 2 | 2 | ||
| 20 | 0 secunde | OK. | 1 | 1 | ||
| 21 | 0 secunde | OK. | 2 | 2 | ||
| 22 | 0 secunde | OK. | 1 | 1 | ||
| 23 | 0 secunde | OK. | 1 | 1 | ||
| 24 | 0 secunde | OK. | 2 | 2 | ||
| 25 | 0 secunde | OK. | 1 | 1 | ||
| 26 | 0 secunde | OK. | 2 | 2 | ||
| 27 | 0 secunde | OK. | 1 | 1 | ||
| 28 | 0 secunde | OK. | 1 | 1 | ||
| 29 | 0 secunde | OK. | 2 | 2 | ||
| 30 | 0 secunde | OK. | 1 | 1 | ||
| 31 | 0 secunde | OK. | 2 | 2 | ||
| 32 | 0 secunde | OK. | 1 | 1 | ||
| 33 | 0 secunde | OK. | 2 | 2 | ||
| 34 | 0 secunde | OK. | 1 | 1 | ||
| 35 | 0 secunde | OK. | 2 | 2 | ||
| 36 | 0 secunde | OK. | 1 | 1 | ||
| 37 | 0 secunde | OK. | 2 | 2 | ||
| 38 | 0 secunde | OK. | 2 | 2 | ||
| 39 | 0 secunde | OK. | 1 | 1 | ||
| 40 | 0 secunde | OK. | 2 | 2 | ||
| 41 | 0 secunde | OK. | 1 | 1 | ||
| 42 | 0 secunde | OK. | 2 | 2 | ||
| 43 | 0 secunde | OK. | 1 | 1 | ||
| 44 | 0 secunde | OK. | 2 | 2 | ||
| 45 | 0 secunde | OK. | 1 | 1 | ||
| 46 | 0 secunde | OK. | 2 | 2 | ||
| 47 | 0 secunde | OK. | 1 | 1 | ||
| 48 | 0 secunde | OK. | 2 | 2 | ||
| 49 | 0 secunde | OK. | 1 | 1 | ||
| 50 | 0 secunde | OK. | 2 | 2 | ||
| 51 | 0 secunde | OK. | 1 | 1 | ||
| 52 | 0 secunde | OK. | 2 | 2 | ||
| 53 | 0 secunde | OK. | 1 | 1 | ||
| 54 | 0 secunde | OK. | 2 | 2 | ||
| 55 | 0 secunde | OK. | 1 | 1 | ||
| 56 | 0 secunde | OK. | 2 | 2 | ||
| 57 | 0 secunde | OK. | 1 | 1 | ||
| 58 | 0 secunde | OK. | 2 | 2 | ||
| 59 | 0 secunde | OK. | 1 | 1 | ||
| 60 | 0 secunde | OK. | 1 | 1 | ||
| 61 | 0 secunde | OK. | 1 | 1 | ||
| 62 | Depășit | Limita de timp depășită | 2 | 0 | ||
| 63 | Depășit | Limita de timp depășită | 1 | 0 | ||
| 64 | Depășit | Limita de timp depășită | 1 | 0 | ||
| 65 | Depășit | Limita de timp depășită | 1 | 0 | ||
| 66 | Depășit | Limita de timp depășită | 2 | 0 | ||
| 67 | Depășit | Limita de timp depășită | 1 | 0 | ||
| 68 | Depășit | Limita de timp depășită | 1 | 0 | ||
| 69 | Depășit | Limita de timp depășită | 1 | 0 | ||
| 70 | Depășit | Limita de timp depășită | 2 | 0 | ||
| Punctaj total | 88 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema legos 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ă.