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 |
138953747 |
onnstion49 |
A |
Dec. 13, 2021, 6:02 a.m. |
OK |
GNU C11 |
TESTS |
7 |
0 |
0 |
|
|
138913338 |
777888 |
A |
Dec. 12, 2021, 4:45 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
138945204 |
dianzikejidaxue |
A |
Dec. 13, 2021, 2:38 a.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
138904648 |
raghav00 |
A |
Dec. 12, 2021, 4:21 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
138916344 |
lan10rn |
A |
Dec. 12, 2021, 4:56 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
138921520 |
Rafsan093 |
A |
Dec. 12, 2021, 5:12 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
138928956 |
Kovid_Krishnan |
A |
Dec. 12, 2021, 6:32 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
138930889 |
DavidMeza |
A |
Dec. 12, 2021, 6:59 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
138931121 |
sushmit14 |
A |
Dec. 12, 2021, 7:03 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
138931918 |
Harsh7534615 |
A |
Dec. 12, 2021, 7:16 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
0 |
|
|
138905472 |
Sellaris |
A |
Dec. 12, 2021, 4:24 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
0 |
|
|
138945333 |
PhaiCoGiaiQuocGia |
A |
Dec. 13, 2021, 2:43 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
0 |
|
|
138944798 |
LONG__INT |
A |
Dec. 13, 2021, 2:21 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
0 |
|
|
138933620 |
YashDwivedi |
A |
Dec. 12, 2021, 7:47 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
0 |
|
|
138929041 |
FarhanAlam |
A |
Dec. 12, 2021, 6:33 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
0 |
|
|
138927935 |
Akshat017 |
A |
Dec. 12, 2021, 6:19 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
0 |
|
|
138919943 |
Asfak_Shahrier |
A |
Dec. 12, 2021, 5:07 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
0 |
|
|
138910533 |
shristygupta |
A |
Dec. 12, 2021, 4:36 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
0 |
|
|
138933071 |
shubhammarathe |
A |
Dec. 12, 2021, 7:36 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
102400 |
|
|
138944500 |
UuganbayarBud |
A |
Dec. 13, 2021, 2:09 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
0 |
102400 |
|
|
138947775 |
dip_10 |
A |
Dec. 13, 2021, 3:54 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138948285 |
Sudin7362 |
A |
Dec. 13, 2021, 4:07 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138949559 |
ps_noob |
A |
Dec. 13, 2021, 4:38 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138945794 |
goyalsarthak003 |
A |
Dec. 13, 2021, 2:58 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138945304 |
Kaleem.Syed |
A |
Dec. 13, 2021, 2:41 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138949965 |
202001024324 |
A |
Dec. 13, 2021, 4:48 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138946920 |
aadib |
A |
Dec. 13, 2021, 3:32 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138950221 |
pkp_2502 |
A |
Dec. 13, 2021, 4:53 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138950856 |
MSD_SINSINWAAR |
A |
Dec. 13, 2021, 5:06 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138951588 |
shivanshshukla60 |
A |
Dec. 13, 2021, 5:21 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
0 |
0 |
|
|
138946370 |
202015010216 |
A |
Dec. 13, 2021, 3:16 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138945361 |
Srbmaury |
A |
Dec. 13, 2021, 2:44 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138942358 |
Porag_2742 |
A |
Dec. 13, 2021, 12:30 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138936101 |
skittles1412 |
A |
Dec. 12, 2021, 8:39 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138933113 |
Ayush_Sawlani |
A |
Dec. 12, 2021, 7:37 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138931951 |
bhatta.subhro |
A |
Dec. 12, 2021, 7:17 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138951148 |
Abhitipu |
A |
Dec. 13, 2021, 5:12 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138948675 |
AkaMG |
A |
Dec. 13, 2021, 4:17 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138947904 |
GaryH |
A |
Dec. 13, 2021, 3:57 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138946062 |
Muhammad.bilal |
A |
Dec. 13, 2021, 3:06 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
0 |
0 |
|
|
138950442 |
grapo_Oranges |
A |
Dec. 13, 2021, 4:57 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138952802 |
danwuSBU |
A |
Dec. 13, 2021, 5:44 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138952765 |
procolonel |
A |
Dec. 13, 2021, 5:43 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138952496 |
ArianKheirandish |
A |
Dec. 13, 2021, 5:38 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138948152 |
cc_cai |
A |
Dec. 13, 2021, 4:04 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138946848 |
heisenberg09 |
A |
Dec. 13, 2021, 3:31 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138946645 |
depression_ |
A |
Dec. 13, 2021, 3:24 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138937136 |
MisterGu |
A |
Dec. 12, 2021, 9:04 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138934030 |
Zzif |
A |
Dec. 12, 2021, 7:54 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138930599 |
JovanB |
A |
Dec. 12, 2021, 6:54 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
0 |
0 |
|
|
138937514 |
LongWalk |
A |
Dec. 12, 2021, 9:14 p.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
|
138917639 |
SOME_ONEE |
A |
Dec. 12, 2021, 5 p.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
0 |
|
|
138946752 |
DanhDang |
A |
Dec. 13, 2021, 3:28 a.m. |
OK |
Java 11 |
TESTS |
7 |
171 |
32460800 |
|
|
138946745 |
vinayak3010 |
A |
Dec. 13, 2021, 3:27 a.m. |
OK |
Java 11 |
TESTS |
7 |
187 |
0 |
|
|
138944527 |
ddwuya |
A |
Dec. 13, 2021, 2:11 a.m. |
OK |
Java 11 |
TESTS |
7 |
187 |
0 |
|
|
138909107 |
kranuj |
A |
Dec. 12, 2021, 4:32 p.m. |
OK |
Java 11 |
TESTS |
7 |
187 |
0 |
|
|
138947571 |
DanhDang |
A |
Dec. 13, 2021, 3:48 a.m. |
OK |
Java 11 |
TESTS |
7 |
187 |
32460800 |
|
|
138951091 |
Shabnamk |
A |
Dec. 13, 2021, 5:11 a.m. |
OK |
Java 11 |
TESTS |
7 |
202 |
0 |
|
|
138905868 |
nhiemnguyen999 |
A |
Dec. 12, 2021, 4:25 p.m. |
OK |
Java 11 |
TESTS |
7 |
202 |
32460800 |
|
|
138944407 |
argetlam1 |
A |
Dec. 13, 2021, 2:05 a.m. |
OK |
Java 11 |
TESTS |
7 |
217 |
0 |
|
|
138942728 |
shanks19 |
A |
Dec. 13, 2021, 12:51 a.m. |
OK |
Java 8 |
TESTS |
7 |
92 |
0 |
|
|
138912618 |
Mohamed-Ahmed810 |
A |
Dec. 12, 2021, 4:43 p.m. |
OK |
Java 8 |
TESTS |
7 |
93 |
0 |
|
|
138940716 |
snowyrsb |
A |
Dec. 12, 2021, 11:04 p.m. |
OK |
Java 8 |
TESTS |
7 |
93 |
0 |
|
|
138934139 |
tishrah_ |
A |
Dec. 12, 2021, 7:56 p.m. |
OK |
Java 8 |
TESTS |
7 |
93 |
0 |
|
|
138925092 |
anonxx5 |
A |
Dec. 12, 2021, 5:51 p.m. |
OK |
Java 8 |
TESTS |
7 |
93 |
0 |
|
|
138945858 |
MetaX |
A |
Dec. 13, 2021, 3 a.m. |
OK |
Java 8 |
TESTS |
7 |
93 |
0 |
|
|
138944732 |
TriumphantEggplant |
A |
Dec. 13, 2021, 2:19 a.m. |
OK |
Java 8 |
TESTS |
7 |
93 |
0 |
|
|
138925262 |
VishuTomar |
A |
Dec. 12, 2021, 5:53 p.m. |
OK |
Java 8 |
TESTS |
7 |
108 |
0 |
|
|
138953468 |
DeepthansuGvs |
A |
Dec. 13, 2021, 5:57 a.m. |
OK |
Java 8 |
TESTS |
7 |
108 |
0 |
|
|
138952193 |
XYxyXYxy |
A |
Dec. 13, 2021, 5:32 a.m. |
OK |
Java 8 |
TESTS |
7 |
109 |
0 |
|
|
138926195 |
JuLoSpace |
A |
Dec. 12, 2021, 6 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
15 |
0 |
|
|
138912437 |
DmtrPpl |
A |
Dec. 12, 2021, 4:42 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
15 |
0 |
|
|
138914601 |
YBLiaw |
A |
Dec. 12, 2021, 4:50 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
15 |
0 |
|
|
138944521 |
doctorBingo |
A |
Dec. 13, 2021, 2:10 a.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
15 |
0 |
|
|
138917191 |
an0n7me |
A |
Dec. 12, 2021, 4:58 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
15 |
0 |
|
|
138908822 |
Harazdii |
A |
Dec. 12, 2021, 4:31 p.m. |
OK |
.NET Core C# |
TESTS |
7 |
77 |
409600 |
|
|
138909350 |
Ahad726 |
A |
Dec. 12, 2021, 4:32 p.m. |
OK |
.NET Core C# |
TESTS |
7 |
77 |
614400 |
|
|
138932766 |
anton9843 |
A |
Dec. 12, 2021, 7:31 p.m. |
OK |
.NET Core C# |
TESTS |
7 |
78 |
409600 |
|
|
138917697 |
Yasash |
A |
Dec. 12, 2021, 5 p.m. |
OK |
Node.js |
TESTS |
7 |
61 |
307200 |
|
|
138924337 |
1_2_3_4_5_9 |
A |
Dec. 12, 2021, 5:47 p.m. |
OK |
PyPy 2 |
TESTS |
7 |
77 |
1024000 |
|
|
138929329 |
gopal.yedida |
A |
Dec. 12, 2021, 6:37 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
77 |
1536000 |
|
|
138928355 |
deep_is_high |
A |
Dec. 12, 2021, 6:24 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
77 |
1945600 |
|
|
138929142 |
DVANZER |
A |
Dec. 12, 2021, 6:34 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
78 |
1433600 |
|
|
138951018 |
ranger_18 |
A |
Dec. 13, 2021, 5:10 a.m. |
OK |
PyPy 3 |
TESTS |
7 |
92 |
1433600 |
|
|
138944366 |
Mukundan425 |
A |
Dec. 13, 2021, 2:04 a.m. |
OK |
PyPy 3 |
TESTS |
7 |
93 |
1536000 |
|
|
138918601 |
Aragorn8037 |
A |
Dec. 12, 2021, 5:03 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
93 |
1638400 |
|
|
138927581 |
legend.ary_as |
A |
Dec. 12, 2021, 6:15 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
93 |
1945600 |
|
|
138924801 |
feelme |
A |
Dec. 12, 2021, 5:49 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
93 |
2048000 |
|
|
138911814 |
armusman2 |
A |
Dec. 12, 2021, 4:40 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
170 |
4710400 |
|
|
138938257 |
zenk82 |
A |
Dec. 12, 2021, 9:33 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
170 |
5222400 |
|
|
138926509 |
KeshNar |
A |
Dec. 12, 2021, 6:03 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
93 |
1638400 |
|
|
138926970 |
jaeheonshim |
A |
Dec. 12, 2021, 6:08 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
108 |
1433600 |
|
|
138947548 |
rivnam |
A |
Dec. 13, 2021, 3:47 a.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
109 |
1638400 |
|
|
138946424 |
freakbuoyancy |
A |
Dec. 13, 2021, 3:17 a.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
109 |
1638400 |
|
|
138935308 |
ad451 |
A |
Dec. 12, 2021, 8:21 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
109 |
1638400 |
|
|
138924820 |
sahil_dugaje |
A |
Dec. 12, 2021, 5:49 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
109 |
1638400 |
|
|
138929469 |
s1mple_17 |
A |
Dec. 12, 2021, 6:39 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
109 |
1740800 |
|
|
138928685 |
ctt312000 |
A |
Dec. 12, 2021, 6:28 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
109 |
1740800 |
|
|
138930992 |
Enchk |
A |
Dec. 12, 2021, 7:01 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
124 |
1331200 |
|
|
138931865 |
artem4512 |
A |
Dec. 12, 2021, 7:16 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
124 |
1638400 |
|
|
138926115 |
OLOGY |
A |
Dec. 12, 2021, 6 p.m. |
OK |
Python 2 |
TESTS |
7 |
31 |
0 |
|
|
138925765 |
OLOGY |
A |
Dec. 12, 2021, 5:57 p.m. |
OK |
Python 2 |
TESTS |
7 |
62 |
102400 |
|
|
138952699 |
nayan007 |
A |
Dec. 13, 2021, 5:42 a.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138951451 |
gonuguntadeepak |
A |
Dec. 13, 2021, 5:18 a.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138927548 |
YashNandwana |
A |
Dec. 12, 2021, 6:15 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138922039 |
Charcha_Galav |
A |
Dec. 12, 2021, 5:13 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138909931 |
kishu_551 |
A |
Dec. 12, 2021, 4:34 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138905117 |
flash196 |
A |
Dec. 12, 2021, 4:23 p.m. |
OK |
Python 3 |
TESTS |
7 |
31 |
0 |
|
|
138950506 |
saddlep |
A |
Dec. 13, 2021, 4:59 a.m. |
OK |
Python 3 |
TESTS |
7 |
46 |
0 |
|
|
138933292 |
Apu123 |
A |
Dec. 12, 2021, 7:41 p.m. |
OK |
Python 3 |
TESTS |
7 |
46 |
0 |
|
|
138932758 |
D_Dima |
A |
Dec. 12, 2021, 7:31 p.m. |
OK |
Python 3 |
TESTS |
7 |
46 |
0 |
|
|
138932836 |
Sam._.072 |
A |
Dec. 12, 2021, 7:32 p.m. |
OK |
Python 3 |
TESTS |
7 |
46 |
0 |
|
|
remove filters
Back to search problems