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"Petya has got an interesting flower. Petya is a busy person, so he sometimes forgets to water it. You are given n days from Petya's live and you have to determine what happened with his flower in the end. The flower grows as follows: At the beginning of the 1 -st day the flower is 1 centimeter tall. What is its height after n days? Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). Description of the test cases follows. The first line of each test case contains the only integer n ( 1 <= q n <= q 100 ). The second line of each test case contains n integers a_1, a_2, ... , a_n ( a_i = 0 or a_i = 1 ). If a_i = 1 , the flower is watered in the i -th day, otherwise it is not watered. For each test case print a single integer k -- the flower's height after n days, or -1 , if the flower dies. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
138976036 |
__Davit__ |
A |
Dec. 13, 2021, 11:20 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
7 |
77 |
3174400 |
|
|
138886211 |
insep |
A |
Dec. 12, 2021, 3:37 p.m. |
OK |
D |
TESTS |
7 |
30 |
204800 |
|
|
138877157 |
daniil_volkov |
A |
Dec. 12, 2021, 3:24 p.m. |
OK |
FPC |
TESTS |
7 |
15 |
0 |
|
|
138905667 |
Kristina__ |
A |
Dec. 12, 2021, 4:24 p.m. |
OK |
FPC |
TESTS |
7 |
15 |
0 |
|
|
138894524 |
Alex_Korost |
A |
Dec. 12, 2021, 3:55 p.m. |
OK |
FPC |
TESTS |
7 |
15 |
0 |
|
|
138898094 |
Pavel_Pavlyak |
A |
Dec. 12, 2021, 4:04 p.m. |
OK |
FPC |
TESTS |
7 |
15 |
102400 |
|
|
139051934 |
_gone |
A |
Dec. 14, 2021, 5:36 a.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
139061988 |
Chengxng |
A |
Dec. 14, 2021, 5:42 a.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
139062989 |
GREEN_ |
A |
Dec. 14, 2021, 5:56 a.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
139063181 |
peterlcy |
A |
Dec. 14, 2021, 5:58 a.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
139040089 |
xhy1186342522 |
A |
Dec. 14, 2021, 4:55 a.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
138886722 |
Newpson |
A |
Dec. 12, 2021, 3:38 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
138983403 |
azad12614 |
A |
Dec. 13, 2021, 12:35 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
139019218 |
VamsyK |
A |
Dec. 13, 2021, 7:13 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
139021046 |
Risur_Abbu |
A |
Dec. 13, 2021, 7:40 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
139017825 |
Bbbtt04 |
A |
Dec. 13, 2021, 6:53 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
0 |
|
|
138873750 |
CalisthenicsMan |
A |
Dec. 12, 2021, 3:21 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
0 |
|
|
138869905 |
ilya.kligunov |
A |
Dec. 12, 2021, 3:18 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
102400 |
|
|
138885095 |
azalia |
A |
Dec. 12, 2021, 3:35 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
102400 |
|
|
139041051 |
OP_2020 |
A |
Dec. 14, 2021, 5:15 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
|
139027777 |
strong_independent_woman |
A |
Dec. 13, 2021, 9:50 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
|
139021687 |
rudrakshraguvar |
A |
Dec. 13, 2021, 7:49 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
|
139013982 |
Pingvinn |
A |
Dec. 13, 2021, 6:02 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
|
139062591 |
_Cian_ |
A |
Dec. 14, 2021, 5:50 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
|
139041517 |
yjx1098969626 |
A |
Dec. 14, 2021, 5:23 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
0 |
|
|
138881301 |
lolikonshik |
A |
Dec. 12, 2021, 3:29 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138880997 |
far_east_man |
A |
Dec. 12, 2021, 3:29 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138879562 |
performer |
A |
Dec. 12, 2021, 3:27 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138879101 |
prost_sasha |
A |
Dec. 12, 2021, 3:26 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138897765 |
madiyar0407 |
A |
Dec. 12, 2021, 4:03 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138910745 |
RedCore |
A |
Dec. 12, 2021, 4:37 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
139016378 |
Tkesho_prog |
A |
Dec. 13, 2021, 6:32 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
139018222 |
Tetracontadigon |
A |
Dec. 13, 2021, 6:59 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138893499 |
ASDF2357 |
A |
Dec. 12, 2021, 3:52 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138886688 |
RedMACHINE |
A |
Dec. 12, 2021, 3:38 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138875164 |
aldik678 |
A |
Dec. 12, 2021, 3:22 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
139062176 |
UN_predictable |
A |
Dec. 14, 2021, 5:44 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
139036289 |
devoops |
A |
Dec. 14, 2021, 3:12 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138906043 |
flight.mode |
A |
Dec. 12, 2021, 4:25 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138883467 |
mingoster1337 |
A |
Dec. 12, 2021, 3:33 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138882282 |
Artem2907 |
A |
Dec. 12, 2021, 3:31 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138878380 |
Arlan4ik |
A |
Dec. 12, 2021, 3:26 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138877108 |
maxmaz111 |
A |
Dec. 12, 2021, 3:24 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138874318 |
dewset |
A |
Dec. 12, 2021, 3:21 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138873033 |
Sergak_top |
A |
Dec. 12, 2021, 3:20 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138876863 |
Rom_Bog |
A |
Dec. 12, 2021, 3:24 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138875711 |
Yulia_04 |
A |
Dec. 12, 2021, 3:23 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138874897 |
Dariom |
A |
Dec. 12, 2021, 3:22 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138874223 |
orengo |
A |
Dec. 12, 2021, 3:21 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138877012 |
Poruchik |
A |
Dec. 12, 2021, 3:24 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138882802 |
SydBarrett |
A |
Dec. 12, 2021, 3:32 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138885994 |
DDCringe |
A |
Dec. 12, 2021, 3:37 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138890715 |
SandreY |
A |
Dec. 12, 2021, 3:46 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138891113 |
Ernur05 |
A |
Dec. 12, 2021, 3:47 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138894431 |
paskalgod |
A |
Dec. 12, 2021, 3:55 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138998000 |
Yash9890 |
A |
Dec. 13, 2021, 3:09 p.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
|
139014789 |
will_probably_cheat |
A |
Dec. 13, 2021, 6:12 p.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
|
138913088 |
daniilscherbina |
A |
Dec. 12, 2021, 4:44 p.m. |
OK |
Java 11 |
TESTS |
7 |
186 |
0 |
|
|
139024199 |
wildcards |
A |
Dec. 13, 2021, 8:34 p.m. |
OK |
Java 11 |
TESTS |
7 |
187 |
0 |
|
|
138893954 |
Tishkinta |
A |
Dec. 12, 2021, 3:53 p.m. |
OK |
Java 11 |
TESTS |
7 |
202 |
0 |
|
|
138893482 |
t0nso1eil |
A |
Dec. 12, 2021, 3:52 p.m. |
OK |
Java 11 |
TESTS |
7 |
202 |
0 |
|
|
138899631 |
Termitys |
A |
Dec. 12, 2021, 4:08 p.m. |
OK |
Java 11 |
TESTS |
7 |
218 |
0 |
|
|
138881747 |
Denis_koch |
A |
Dec. 12, 2021, 3:30 p.m. |
OK |
Java 11 |
TESTS |
7 |
233 |
0 |
|
|
138875029 |
vcherashny-zahar |
A |
Dec. 12, 2021, 3:22 p.m. |
OK |
Java 11 |
TESTS |
7 |
233 |
0 |
|
|
138891056 |
Tusha_ches |
A |
Dec. 12, 2021, 3:47 p.m. |
OK |
Java 8 |
TESTS |
7 |
93 |
0 |
|
|
138870864 |
KhamGao_O |
A |
Dec. 12, 2021, 3:19 p.m. |
OK |
Java 8 |
TESTS |
7 |
108 |
0 |
|
|
138879140 |
aloeok |
A |
Dec. 12, 2021, 3:26 p.m. |
OK |
Java 8 |
TESTS |
7 |
108 |
0 |
|
|
138892159 |
inngutorova |
A |
Dec. 12, 2021, 3:49 p.m. |
OK |
Java 8 |
TESTS |
7 |
109 |
0 |
|
|
138880597 |
Embrion_top |
A |
Dec. 12, 2021, 3:28 p.m. |
OK |
Java 8 |
TESTS |
7 |
124 |
0 |
|
|
138898052 |
_TurboGhost_ |
A |
Dec. 12, 2021, 4:03 p.m. |
OK |
Java 8 |
TESTS |
7 |
124 |
0 |
|
|
138904714 |
Ilya_Krn |
A |
Dec. 12, 2021, 4:22 p.m. |
OK |
Java 8 |
TESTS |
7 |
155 |
0 |
|
|
138881337 |
Koo_Pung-Kei |
A |
Dec. 12, 2021, 3:29 p.m. |
OK |
Kotlin 1.5 |
TESTS |
7 |
218 |
0 |
|
|
138877181 |
AndrOgurc |
A |
Dec. 12, 2021, 3:24 p.m. |
OK |
Kotlin 1.5 |
TESTS |
7 |
233 |
0 |
|
|
138886481 |
Ancient_Lich |
A |
Dec. 12, 2021, 3:38 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
0 |
0 |
|
|
138876531 |
Subio |
A |
Dec. 12, 2021, 3:24 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
0 |
0 |
|
|
138874588 |
Bakamboker |
A |
Dec. 12, 2021, 3:22 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
0 |
0 |
|
|
138901969 |
Doctor_Who_you_are |
A |
Dec. 12, 2021, 4:14 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
0 |
0 |
|
|
138895490 |
Batman_505 |
A |
Dec. 12, 2021, 3:57 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
0 |
0 |
|
|
138881005 |
OlegTime2004 |
A |
Dec. 12, 2021, 3:29 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
0 |
0 |
|
|
138917954 |
ShelbyCompany |
A |
Dec. 12, 2021, 5:01 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
15 |
0 |
|
|
138904229 |
ProgroPhrogo |
A |
Dec. 12, 2021, 4:20 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
15 |
0 |
|
|
138908131 |
DS0503 |
A |
Dec. 12, 2021, 4:28 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
15 |
0 |
|
|
138915786 |
KraK1n |
A |
Dec. 12, 2021, 4:54 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
15 |
0 |
|
|
138872268 |
reosfire |
A |
Dec. 12, 2021, 3:20 p.m. |
OK |
.NET Core C# |
TESTS |
7 |
77 |
409600 |
|
|
138911087 |
fullo4ka |
A |
Dec. 12, 2021, 4:38 p.m. |
OK |
.NET Core C# |
TESTS |
7 |
92 |
307200 |
|
|
138892317 |
IDKJustRandomHandle |
A |
Dec. 12, 2021, 3:50 p.m. |
OK |
.NET Core C# |
TESTS |
7 |
93 |
512000 |
|
|
138914915 |
sanset13 |
A |
Dec. 12, 2021, 4:51 p.m. |
OK |
PascalABC.NET |
TESTS |
7 |
218 |
614400 |
|
|
138894408 |
KhalilovaAM |
A |
Dec. 12, 2021, 3:54 p.m. |
OK |
PascalABC.NET |
TESTS |
7 |
233 |
102400 |
|
|
138881044 |
Semen56 |
A |
Dec. 12, 2021, 3:29 p.m. |
OK |
PascalABC.NET |
TESTS |
7 |
233 |
409600 |
|
|
138894095 |
Teslev |
A |
Dec. 12, 2021, 3:54 p.m. |
OK |
PascalABC.NET |
TESTS |
7 |
234 |
102400 |
|
|
138883339 |
mun911-338 |
A |
Dec. 12, 2021, 3:32 p.m. |
OK |
PascalABC.NET |
TESTS |
7 |
234 |
102400 |
|
|
138883264 |
itisme228 |
A |
Dec. 12, 2021, 3:32 p.m. |
OK |
PascalABC.NET |
TESTS |
7 |
249 |
0 |
|
|
138892937 |
zlat_manya |
A |
Dec. 12, 2021, 3:51 p.m. |
OK |
PascalABC.NET |
TESTS |
7 |
249 |
0 |
|
|
138876914 |
beg18 |
A |
Dec. 12, 2021, 3:24 p.m. |
OK |
PascalABC.NET |
TESTS |
7 |
249 |
0 |
|
|
138869808 |
tomak |
A |
Dec. 12, 2021, 3:18 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
62 |
1536000 |
|
|
138885975 |
Uelbc |
A |
Dec. 12, 2021, 3:37 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
62 |
1638400 |
|
|
138883139 |
lenya2005 |
A |
Dec. 12, 2021, 3:32 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
62 |
2048000 |
|
|
138879086 |
__Dmitriy__ |
A |
Dec. 12, 2021, 3:26 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
77 |
1331200 |
|
|
138887422 |
kirri_7 |
A |
Dec. 12, 2021, 3:40 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
77 |
1433600 |
|
|
138883668 |
alexey174 |
A |
Dec. 12, 2021, 3:33 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
77 |
1433600 |
|
|
138876578 |
anontot |
A |
Dec. 12, 2021, 3:24 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
77 |
1433600 |
|
|
138874471 |
kubavsop |
A |
Dec. 12, 2021, 3:22 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
77 |
1433600 |
|
|
138900655 |
Kiriru |
A |
Dec. 12, 2021, 4:10 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
77 |
1536000 |
|
|
138892022 |
renatxat |
A |
Dec. 12, 2021, 3:49 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
77 |
1536000 |
|
|
138871472 |
MikleDevil |
A |
Dec. 12, 2021, 3:19 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
108 |
1331200 |
|
|
138881465 |
selmik |
A |
Dec. 12, 2021, 3:30 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
108 |
1433600 |
|
|
138918692 |
Peanir |
A |
Dec. 12, 2021, 5:03 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
108 |
1638400 |
|
|
138875614 |
semeka13 |
A |
Dec. 12, 2021, 3:23 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
108 |
1638400 |
|
|
138871904 |
denk |
A |
Dec. 12, 2021, 3:19 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
108 |
1740800 |
|
|
138871575 |
Speedcuber63 |
A |
Dec. 12, 2021, 3:19 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
108 |
1740800 |
|
|
138902938 |
Triikas |
A |
Dec. 12, 2021, 4:16 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
109 |
1331200 |
|
|
138888147 |
Ewpty |
A |
Dec. 12, 2021, 3:41 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
109 |
1331200 |
|
|
138880829 |
Daaanly |
A |
Dec. 12, 2021, 3:29 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
109 |
1331200 |
|
|
138878675 |
itonelove |
A |
Dec. 12, 2021, 3:26 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
109 |
1331200 |
|
|
138918608 |
BorisCh0L1 |
A |
Dec. 12, 2021, 5:03 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138917227 |
GVZKRD |
A |
Dec. 12, 2021, 4:58 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138916489 |
Vadim_bs |
A |
Dec. 12, 2021, 4:56 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138912953 |
Amir_17 |
A |
Dec. 12, 2021, 4:44 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138907433 |
Circle_ |
A |
Dec. 12, 2021, 4:26 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138906952 |
KerbError |
A |
Dec. 12, 2021, 4:26 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138905009 |
Bleno |
A |
Dec. 12, 2021, 4:22 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138902181 |
palmusan |
A |
Dec. 12, 2021, 4:14 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138898857 |
Saneksha |
A |
Dec. 12, 2021, 4:06 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138897627 |
IK1417 |
A |
Dec. 12, 2021, 4:02 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
remove filters
Back to search problems