#4470
turnulete
Un elev dispune de n
cuburi, pentru fiecare cub cunoscându-se latura sa ci
. El dorește să construiască m
turnuri, fiecare turn conținând doar cuburi de aceeași dimensiune. Să se determine înălțimea maximă care se poate obține pentru fiecare din cele m
turnuri.
Problema | turnulete | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 32 MB
/
Stivă 8 MB
|
Id soluție | #51059360 | Utilizator | |
Fișier | turnulete.cpp | Dimensiune | 648 B |
Data încărcării | 21 Mai 2024, 18:54 | Scor / rezultat | Eroare de compilare |
turnulete.cpp:21:9: error: stray '\342' in program st ← 1 ^ turnulete.cpp:21:9: error: stray '\206' in program turnulete.cpp:21:9: error: stray '\220' in program turnulete.cpp:22:1: error: stray '\342' in program dr ← n ^ turnulete.cpp:22:1: error: stray '\206' in program turnulete.cpp:22:1: error: stray '\220' in program turnulete.cpp:23:1: error: stray '\342' in program poz ← 0 ^ turnulete.cpp:23:1: error: stray '\206' in program turnulete.cpp:23:1: error: stray '\220' in program turnulete.cpp:24:1: error: stray '\303' in program CÂTTIMP st≤dr SI poz=0 EXECUTĂ ^ turnulete.cpp:24:1: error: stray '\202' in program turnulete.cpp:24:1: error: stray '\342' in program turnulete.cpp:24:1: error: stray '\211' in program turnulete.cpp:24:1: error: stray '\244' in program turnulete.cpp:24:1: error: stray '\304' in program turnulete.cpp:24:1: error: stray '\202' in program turnulete.cpp:25:5: error: stray '\342' in program m ← (st + dr) DIV 2 ^ turnulete.cpp:25:5: error: stray '\206' in program turnulete.cpp:25:5: error: stray '\220' in program turnulete.cpp:26:5: error: stray '\304' in program DACĂ v[m] = x ATUNCI ^ turnulete.cpp:26:5: error: stray '\202' in program turnulete.cpp:29:9: error: stray '\304' in program DACĂ v[m] < x ATUNCI ^ turnulete.cpp:29:9: error: stray '\202' in program turnulete.cpp:30:13: error: stray '\342' in program st ← m + 1 ^ turnulete.cpp:30:13: error: stray '\206' in program turnulete.cpp:30:13: error: stray '\220' in program turnulete.cpp:32:13: error: stray '\342' in program dr ← m - 1 ^ turnulete.cpp:32:13: error: stray '\206' in program turnulete.cpp:32:13: error: stray '\220' in program turnulete.cpp:33:9: error: stray '\304' in program SFDACĂ ^ turnulete.cpp:33:9: error: stray '\202' in program turnulete.cpp:34:5: error: stray '\304' in program SFDACĂ ^ turnulete.cpp:34:5: error: stray '\202' in program turnulete.cpp:35:1: error: stray '\303' in program SFCÂTTIMP ^ turnulete.cpp:35:1: error: stray '\202' in program turnulete.cpp: In function 'int main()': turnulete.cpp:21:16: error: expected ';' before numeric constant st ← 1 ^ turnulete.cpp:35:6: warning: statement has no effect [-Wunused-value] SFCÂTTIMP ^ turnulete.cpp:14:13: warning: unused variable 'x' [-Wunused-variable] int x=b; ^ turnulete.cpp:17:13: warning: unused variable 'dr' [-Wunused-variable] int dr=n; ^ turnulete.cpp:18:13: warning: unused variable 'poz' [-Wunused-variable] int poz=0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema turnulete 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ă.