Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
Problems
B'Mary has just graduated from one well-known University and is now attending celebration party. Students like to dream of a beautiful life, so they used champagne glasses to construct a small pyramid. The height of the pyramid is n. The top level consists of only 1 glass, that stands on 2 glasses on the second level (counting from the top), then 3 glasses on the third level and so on.The bottom level consists of n glasses. Vlad has seen in the movies many times how the champagne beautifully flows from top levels to bottom ones, filling all the glasses simultaneously. So he took a bottle and started to pour it in the glass located at the top of the pyramid. Each second, Vlad pours to the top glass the amount of champagne equal to the size of exactly one glass. If the glass is already full, but there is some champagne flowing in it, then it pours over the edge of the glass and is equally distributed over two glasses standing under. If the overflowed glass is at the bottom level, then the champagne pours on the table. For the purpose of this problem we consider that champagne is distributed among pyramid glasses immediately. Vlad is interested in the number of completely full glasses if he stops pouring champagne in t seconds. Pictures below illustrate the pyramid consisting of three levels. The only line of the input contains two integers n and t (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910, xe2 x80 x890 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89t xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910 xe2 x80 x89000) -- the height of the pyramid and the number of seconds Vlad will be pouring champagne from the bottle. Print the single integer -- the number of completely full glasses after t seconds. In the first sample, the glasses full after 5 seconds are: the top glass, both glasses on the second level and the middle glass at the bottom level. Left and right glasses of the bottom level will be half-empty. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
18079170 |
tungtinhoctre126 |
B |
May 25, 2016, 3:37 p.m. |
OK |
FPC |
TESTS |
121 |
15 |
1945600 |
|
1500 |
18083836 |
Igor201012015 |
B |
May 25, 2016, 4:15 p.m. |
OK |
FPC |
TESTS |
121 |
15 |
2150400 |
|
1500 |
18077110 |
GiannisAntetokounmpo |
B |
May 25, 2016, 3:23 p.m. |
OK |
FPC |
TESTS |
121 |
15 |
2560000 |
|
1500 |
18080358 |
Zeron |
B |
May 25, 2016, 3:46 p.m. |
OK |
FPC |
TESTS |
121 |
30 |
1843200 |
|
1500 |
18083266 |
Markellonchik |
B |
May 25, 2016, 4:10 p.m. |
OK |
FPC |
TESTS |
121 |
31 |
1740800 |
|
1500 |
18082759 |
Tenpole |
B |
May 25, 2016, 4:06 p.m. |
OK |
FPC |
TESTS |
121 |
31 |
1740800 |
|
1500 |
18078445 |
dmlocdmloc |
B |
May 25, 2016, 3:32 p.m. |
OK |
FPC |
TESTS |
121 |
31 |
1945600 |
|
1500 |
18076569 |
Ingus |
B |
May 25, 2016, 3:20 p.m. |
OK |
FPC |
TESTS |
121 |
31 |
2252800 |
|
1500 |
18076655 |
0lkeh |
B |
May 25, 2016, 3:20 p.m. |
OK |
FPC |
TESTS |
121 |
93 |
1740800 |
|
1500 |
18080404 |
lerom |
B |
May 25, 2016, 3:46 p.m. |
OK |
FPC |
TESTS |
121 |
233 |
1945600 |
|
1500 |
18085806 |
rachg_54 |
B |
May 25, 2016, 4:34 p.m. |
OK |
GNU C |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18086825 |
xxyyttxx |
B |
May 25, 2016, 4:44 p.m. |
OK |
GNU C |
TESTS |
121 |
30 |
2048000 |
|
1500 |
18083405 |
harish14143 |
B |
May 25, 2016, 4:12 p.m. |
OK |
GNU C |
TESTS |
121 |
30 |
2048000 |
|
1500 |
18087967 |
holynova |
B |
May 25, 2016, 4:55 p.m. |
OK |
GNU C |
TESTS |
121 |
31 |
2048000 |
|
1500 |
18084841 |
zeosutt |
B |
May 25, 2016, 4:25 p.m. |
OK |
GNU C |
TESTS |
121 |
31 |
2048000 |
|
1500 |
18084192 |
SSSatan |
B |
May 25, 2016, 4:19 p.m. |
OK |
GNU C |
TESTS |
121 |
31 |
2048000 |
|
1500 |
18081506 |
invisP |
B |
May 25, 2016, 3:55 p.m. |
OK |
GNU C |
TESTS |
121 |
31 |
2048000 |
|
1500 |
18084355 |
-NOOB- |
B |
May 25, 2016, 4:21 p.m. |
OK |
GNU C |
TESTS |
121 |
46 |
2048000 |
|
1500 |
18080550 |
vietnakid |
B |
May 25, 2016, 3:47 p.m. |
OK |
GNU C |
TESTS |
121 |
46 |
2048000 |
|
1500 |
18087200 |
mannu_the_coder |
B |
May 25, 2016, 4:47 p.m. |
OK |
GNU C |
TESTS |
121 |
62 |
2150400 |
|
1500 |
18080844 |
kakalan |
B |
May 25, 2016, 3:50 p.m. |
OK |
GNU C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18086201 |
Chestnut |
B |
May 25, 2016, 4:38 p.m. |
OK |
GNU C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18084177 |
dakata |
B |
May 25, 2016, 4:19 p.m. |
OK |
GNU C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18083216 |
skykhs3 |
B |
May 25, 2016, 4:10 p.m. |
OK |
GNU C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18082242 |
biran0079 |
B |
May 25, 2016, 4:01 p.m. |
OK |
GNU C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18080850 |
5_Apm |
B |
May 25, 2016, 3:50 p.m. |
OK |
GNU C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18077691 |
GodCowC |
B |
May 25, 2016, 3:27 p.m. |
OK |
GNU C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18077560 |
fuboat |
B |
May 25, 2016, 3:26 p.m. |
OK |
GNU C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18077282 |
adkroxx |
B |
May 25, 2016, 3:24 p.m. |
OK |
GNU C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18077266 |
poore100 |
B |
May 25, 2016, 3:24 p.m. |
OK |
GNU C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18087727 |
Farhan007 |
B |
May 25, 2016, 4:53 p.m. |
OK |
GNU C11 |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18082372 |
farizazmip |
B |
May 25, 2016, 4:02 p.m. |
OK |
GNU C11 |
TESTS |
121 |
15 |
2150400 |
|
1500 |
18082988 |
1041287344 |
B |
May 25, 2016, 4:08 p.m. |
OK |
GNU C11 |
TESTS |
121 |
31 |
2048000 |
|
1500 |
18077589 |
OnlyYuju |
B |
May 25, 2016, 3:26 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
15 |
1945600 |
|
1500 |
18079005 |
sds3031 |
B |
May 25, 2016, 3:36 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18078402 |
dantrag |
B |
May 25, 2016, 3:31 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18078225 |
UtopiaBeam |
B |
May 25, 2016, 3:30 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18077628 |
tsiki |
B |
May 25, 2016, 3:27 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18077523 |
top34051 |
B |
May 25, 2016, 3:26 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18077519 |
Artorius |
B |
May 25, 2016, 3:26 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18080608 |
Death_Scythe |
B |
May 25, 2016, 3:48 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18082612 |
xen |
B |
May 25, 2016, 4:04 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18086693 |
rng__58 |
B |
May 25, 2016, 4:43 p.m. |
OK |
GNU C++11 |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18081210 |
p0wonTnx |
B |
May 25, 2016, 3:53 p.m. |
OK |
Java 7 |
TESTS |
121 |
124 |
39014400 |
|
1500 |
18078908 |
The_MG |
B |
May 25, 2016, 3:35 p.m. |
OK |
Java 7 |
TESTS |
121 |
124 |
39014400 |
|
1500 |
18086374 |
ankeshgupta007 |
B |
May 25, 2016, 4:40 p.m. |
OK |
Java 7 |
TESTS |
121 |
140 |
39014400 |
|
1500 |
18081872 |
fillets |
B |
May 25, 2016, 3:58 p.m. |
OK |
Java 7 |
TESTS |
121 |
140 |
39116800 |
|
1500 |
18079679 |
suigingin |
B |
May 25, 2016, 3:40 p.m. |
OK |
Java 7 |
TESTS |
121 |
140 |
39424000 |
|
1500 |
18082213 |
Thibo |
B |
May 25, 2016, 4:01 p.m. |
OK |
Java 7 |
TESTS |
121 |
155 |
39014400 |
|
1500 |
18085900 |
smalex69 |
B |
May 25, 2016, 4:35 p.m. |
OK |
Java 7 |
TESTS |
121 |
155 |
39321600 |
|
1500 |
18082739 |
erke.shakenova |
B |
May 25, 2016, 4:06 p.m. |
OK |
Java 7 |
TESTS |
121 |
155 |
39424000 |
|
1500 |
18077957 |
codder90 |
B |
May 25, 2016, 3:29 p.m. |
OK |
Java 7 |
TESTS |
121 |
156 |
39424000 |
|
1500 |
18084092 |
qiuyu8290 |
B |
May 25, 2016, 4:18 p.m. |
OK |
Java 7 |
TESTS |
121 |
218 |
39424000 |
|
1500 |
18088645 |
Noureldin_Khaled |
B |
May 25, 2016, 5 p.m. |
OK |
Java 8 |
TESTS |
121 |
124 |
20377600 |
|
1500 |
18079977 |
iakovlev.zakhar |
B |
May 25, 2016, 3:43 p.m. |
OK |
Java 8 |
TESTS |
121 |
124 |
20377600 |
|
1500 |
18077363 |
baukaman |
B |
May 25, 2016, 3:25 p.m. |
OK |
Java 8 |
TESTS |
121 |
124 |
20480000 |
|
1500 |
18083660 |
ankit_1993 |
B |
May 25, 2016, 4:14 p.m. |
OK |
Java 8 |
TESTS |
121 |
124 |
20582400 |
|
1500 |
18083132 |
tcheng |
B |
May 25, 2016, 4:09 p.m. |
OK |
Java 8 |
TESTS |
121 |
124 |
20582400 |
|
1500 |
18082004 |
jetblack20 |
B |
May 25, 2016, 3:59 p.m. |
OK |
Java 8 |
TESTS |
121 |
124 |
20582400 |
|
1500 |
18080086 |
CongDuy |
B |
May 25, 2016, 3:44 p.m. |
OK |
Java 8 |
TESTS |
121 |
124 |
20582400 |
|
1500 |
18079535 |
akshay_miterani |
B |
May 25, 2016, 3:39 p.m. |
OK |
Java 8 |
TESTS |
121 |
124 |
20582400 |
|
1500 |
18079527 |
asinkevich |
B |
May 25, 2016, 3:39 p.m. |
OK |
Java 8 |
TESTS |
121 |
124 |
20582400 |
|
1500 |
18078507 |
bhishma |
B |
May 25, 2016, 3:32 p.m. |
OK |
Java 8 |
TESTS |
121 |
124 |
20582400 |
|
1500 |
18081640 |
vladislav805 |
B |
May 25, 2016, 3:56 p.m. |
OK |
JavaScript |
TESTS |
121 |
358 |
7577600 |
|
1500 |
18081299 |
eulerscheZahl |
B |
May 25, 2016, 3:53 p.m. |
OK |
MS C# |
TESTS |
121 |
77 |
11468800 |
|
1500 |
18081495 |
TwoFx |
B |
May 25, 2016, 3:55 p.m. |
OK |
MS C# |
TESTS |
121 |
77 |
11571200 |
|
1500 |
18081062 |
hdz |
B |
May 25, 2016, 3:51 p.m. |
OK |
MS C# |
TESTS |
121 |
77 |
11571200 |
|
1500 |
18086084 |
diequeeq |
B |
May 25, 2016, 4:37 p.m. |
OK |
MS C# |
TESTS |
121 |
78 |
11571200 |
|
1500 |
18083923 |
fr0st |
B |
May 25, 2016, 4:17 p.m. |
OK |
MS C# |
TESTS |
121 |
78 |
11878400 |
|
1500 |
18086224 |
DigitalArtistKz |
B |
May 25, 2016, 4:38 p.m. |
OK |
MS C# |
TESTS |
121 |
139 |
11468800 |
|
1500 |
18077532 |
shjgkwo |
B |
May 25, 2016, 3:26 p.m. |
OK |
MS C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18077442 |
cjwj5505 |
B |
May 25, 2016, 3:25 p.m. |
OK |
MS C++ |
TESTS |
121 |
15 |
2048000 |
|
1500 |
18087706 |
Ivan_sakh |
B |
May 25, 2016, 4:52 p.m. |
OK |
MS C++ |
TESTS |
121 |
15 |
2252800 |
|
1500 |
18082619 |
GSHS_phc |
B |
May 25, 2016, 4:05 p.m. |
OK |
MS C++ |
TESTS |
121 |
15 |
2252800 |
|
1500 |
18081167 |
mostafa_9a7c2 |
B |
May 25, 2016, 3:52 p.m. |
OK |
MS C++ |
TESTS |
121 |
15 |
2252800 |
|
1500 |
18078835 |
wowoto9772 |
B |
May 25, 2016, 3:34 p.m. |
OK |
MS C++ |
TESTS |
121 |
15 |
2252800 |
|
1500 |
18078607 |
Handsome_guy |
B |
May 25, 2016, 3:33 p.m. |
OK |
MS C++ |
TESTS |
121 |
15 |
2252800 |
|
1500 |
18078548 |
PreNa |
B |
May 25, 2016, 3:32 p.m. |
OK |
MS C++ |
TESTS |
121 |
15 |
2252800 |
|
1500 |
18077718 |
rureggaeton |
B |
May 25, 2016, 3:27 p.m. |
OK |
MS C++ |
TESTS |
121 |
15 |
2252800 |
|
1500 |
18077116 |
Huyum_nik |
B |
May 25, 2016, 3:23 p.m. |
OK |
MS C++ |
TESTS |
121 |
15 |
2252800 |
|
1500 |
18079315 |
Darooha |
B |
May 25, 2016, 3:38 p.m. |
OK |
Ocaml |
TESTS |
121 |
15 |
4096000 |
|
1500 |
18079965 |
Vosatorp |
B |
May 25, 2016, 3:43 p.m. |
OK |
PyPy 3 |
TESTS |
121 |
280 |
26828800 |
|
1500 |
18088266 |
eightnoteight |
B |
May 25, 2016, 4:57 p.m. |
OK |
PyPy 3 |
TESTS |
121 |
342 |
29593600 |
|
1500 |
18076919 |
jebwizoscar |
B |
May 25, 2016, 3:22 p.m. |
OK |
Python 2 |
TESTS |
121 |
61 |
4710400 |
|
1500 |
18086205 |
kien_metalrock |
B |
May 25, 2016, 4:38 p.m. |
OK |
Python 2 |
TESTS |
121 |
62 |
4710400 |
|
1500 |
18083874 |
sjtuzlp |
B |
May 25, 2016, 4:16 p.m. |
OK |
Python 2 |
TESTS |
121 |
62 |
4710400 |
|
1500 |
18077666 |
taoistly |
B |
May 25, 2016, 3:27 p.m. |
OK |
Python 2 |
TESTS |
121 |
62 |
4710400 |
|
1500 |
18084299 |
barakraganosungam |
B |
May 25, 2016, 4:20 p.m. |
OK |
Python 2 |
TESTS |
121 |
655 |
4812800 |
|
1500 |
18086707 |
drahton |
B |
May 25, 2016, 4:43 p.m. |
OK |
Python 2 |
TESTS |
121 |
997 |
4710400 |
|
1500 |
18078569 |
Chipe1 |
B |
May 25, 2016, 3:33 p.m. |
OK |
Python 3 |
TESTS |
121 |
77 |
5120000 |
|
1500 |
18084505 |
Iriskinn |
B |
May 25, 2016, 4:22 p.m. |
OK |
Python 3 |
TESTS |
121 |
77 |
5222400 |
|
1500 |
18079590 |
noelnadal |
B |
May 25, 2016, 3:40 p.m. |
OK |
Python 3 |
TESTS |
121 |
93 |
5222400 |
|
1500 |
18079372 |
ACkf |
B |
May 25, 2016, 3:38 p.m. |
OK |
Python 3 |
TESTS |
121 |
93 |
5222400 |
|
1500 |
18081487 |
sanchopanca |
B |
May 25, 2016, 3:55 p.m. |
OK |
Python 3 |
TESTS |
121 |
109 |
5734400 |
|
1500 |
18077225 |
sparkyyyy |
B |
May 25, 2016, 3:24 p.m. |
OK |
Python 3 |
TESTS |
121 |
156 |
4608000 |
|
1500 |
18077668 |
wisest |
B |
May 25, 2016, 3:27 p.m. |
OK |
Python 3 |
TESTS |
121 |
170 |
5222400 |
|
1500 |
18084780 |
Passenger |
B |
May 25, 2016, 4:25 p.m. |
OK |
Python 3 |
TESTS |
121 |
171 |
5222400 |
|
1500 |
18086111 |
Smaug |
B |
May 25, 2016, 4:37 p.m. |
OK |
Python 3 |
TESTS |
121 |
186 |
5222400 |
|
1500 |
18086495 |
MataMarrano |
B |
May 25, 2016, 4:41 p.m. |
OK |
Python 3 |
TESTS |
121 |
280 |
5222400 |
|
1500 |
18083480 |
kulych |
B |
May 25, 2016, 4:13 p.m. |
OK |
Ruby |
TESTS |
121 |
93 |
6553600 |
|
1500 |
18081988 |
volodymyr.antoniuk |
B |
May 25, 2016, 3:59 p.m. |
OK |
Ruby |
TESTS |
121 |
358 |
6656000 |
|
1500 |
18082293 |
wrick |
B |
May 25, 2016, 4:02 p.m. |
OK |
Scala |
TESTS |
121 |
436 |
39833600 |
|
1500 |
remove filters
Back to search problems