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'You are given an array a consisting of n positive integers. You can perform the following operation on it: For example, let 's consider the array a = [ 100, 2, 50, 10, 1 ] with 5 elements. Perform two operations on it: The first line of the input contains a single integer t ( 1 <= t <= 2000 ) -- the number of test cases. Then follows the description of each test case. The first line of each test case contains a single integer n ( 1 <= n <= 10^4 ) -- the number of elements in the array a . The second line of each test case contains exactly n integers a_i ( 1 <= a_i <= 10^6 ) -- the elements of the array a . It is guaranteed that the sum of n over all test cases does not exceed 10^4 . For each test case, output a single line: You can output the answer in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will all be recognized as a positive answer). The first test case is explained in the problem statement. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
227956306 |
Derato |
D |
Oct. 12, 2023, 10:05 p.m. |
OK |
C# 10 |
TESTS |
14 |
108 |
5427200 |
|
|
227972955 |
bluemegane |
D |
Oct. 13, 2023, 3:57 a.m. |
OK |
C# 8 |
TESTS |
14 |
140 |
3481600 |
|
|
227952966 |
andrey.starodubtsev |
D |
Oct. 12, 2023, 9 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
14 |
233 |
4300800 |
|
|
227943949 |
GMode |
D |
Oct. 12, 2023, 7:07 p.m. |
OK |
Clang++20 Diagnostics |
TESTS |
14 |
109 |
4300800 |
|
|
227933115 |
OUyio |
D |
Oct. 12, 2023, 5:32 p.m. |
OK |
Clang++20 Diagnostics |
TESTS |
14 |
171 |
0 |
|
|
227942406 |
NenadDapic |
D |
Oct. 12, 2023, 6:51 p.m. |
OK |
FPC |
TESTS |
14 |
311 |
8499200 |
|
|
227925651 |
razv |
D |
Oct. 12, 2023, 4:54 p.m. |
OK |
GNU C11 |
TESTS |
14 |
670 |
8396800 |
|
|
227925973 |
Why_So_Serious |
D |
Oct. 12, 2023, 4:55 p.m. |
OK |
GNU C++14 |
TESTS |
14 |
15 |
204800 |
|
|
227925053 |
ln_gym |
D |
Oct. 12, 2023, 4:52 p.m. |
OK |
GNU C++14 |
TESTS |
14 |
15 |
204800 |
|
|
227963226 |
moocpp |
D |
Oct. 13, 2023, 1:09 a.m. |
OK |
GNU C++14 |
TESTS |
14 |
15 |
204800 |
|
|
227940555 |
lyingflat1 |
D |
Oct. 12, 2023, 6:34 p.m. |
OK |
GNU C++14 |
TESTS |
14 |
15 |
8089600 |
|
|
227976679 |
Snow-Ting |
D |
Oct. 13, 2023, 4:51 a.m. |
OK |
GNU C++14 |
TESTS |
14 |
30 |
102400 |
|
|
227965970 |
2022315-03 |
D |
Oct. 13, 2023, 2:04 a.m. |
OK |
GNU C++14 |
TESTS |
14 |
31 |
0 |
|
|
227969651 |
think12 |
D |
Oct. 13, 2023, 3:07 a.m. |
OK |
GNU C++14 |
TESTS |
14 |
31 |
0 |
|
|
227931452 |
Aryan_Jaiswal28 |
D |
Oct. 12, 2023, 5:22 p.m. |
OK |
GNU C++14 |
TESTS |
14 |
31 |
102400 |
|
|
227963831 |
clly |
D |
Oct. 13, 2023, 1:22 a.m. |
OK |
GNU C++14 |
TESTS |
14 |
31 |
102400 |
|
|
227980034 |
khushalivaidya |
D |
Oct. 13, 2023, 5:33 a.m. |
OK |
GNU C++14 |
TESTS |
14 |
31 |
204800 |
|
|
227964844 |
34543534545 |
D |
Oct. 13, 2023, 1:41 a.m. |
OK |
GNU C++17 |
TESTS |
14 |
15 |
0 |
|
|
227930250 |
apoorvtandon |
D |
Oct. 12, 2023, 5:14 p.m. |
OK |
GNU C++17 |
TESTS |
14 |
15 |
102400 |
|
|
227931563 |
himanshugoldy |
D |
Oct. 12, 2023, 5:22 p.m. |
OK |
GNU C++17 |
TESTS |
14 |
15 |
102400 |
|
|
227936296 |
Wilbert1124 |
D |
Oct. 12, 2023, 5:58 p.m. |
OK |
GNU C++17 |
TESTS |
14 |
15 |
204800 |
|
|
227929481 |
SeeYouSpaceCowboy |
D |
Oct. 12, 2023, 5:10 p.m. |
OK |
GNU C++17 |
TESTS |
14 |
15 |
204800 |
|
|
227976405 |
nirdesh17 |
D |
Oct. 13, 2023, 4:47 a.m. |
OK |
GNU C++17 |
TESTS |
14 |
15 |
307200 |
|
|
227933979 |
Bambo0st |
D |
Oct. 12, 2023, 5:39 p.m. |
OK |
GNU C++17 |
TESTS |
14 |
15 |
409600 |
|
|
227975004 |
jsh00325 |
D |
Oct. 13, 2023, 4:27 a.m. |
OK |
GNU C++17 |
TESTS |
14 |
15 |
1228800 |
|
|
227964936 |
M.Abdalkreem |
D |
Oct. 13, 2023, 1:43 a.m. |
OK |
GNU C++17 |
TESTS |
14 |
15 |
1228800 |
|
|
227972186 |
PQ2876 |
D |
Oct. 13, 2023, 3:45 a.m. |
OK |
GNU C++17 |
TESTS |
14 |
15 |
4198400 |
|
|
227960992 |
wuyin331 |
D |
Oct. 13, 2023, 12:14 a.m. |
OK |
GNU C++17 (64) |
TESTS |
14 |
15 |
102400 |
|
|
227945777 |
NIckyNIck |
D |
Oct. 12, 2023, 7:26 p.m. |
OK |
GNU C++17 (64) |
TESTS |
14 |
15 |
102400 |
|
|
227937051 |
IbrahimMohamed18 |
D |
Oct. 12, 2023, 6:04 p.m. |
OK |
GNU C++17 (64) |
TESTS |
14 |
15 |
102400 |
|
|
227934153 |
Coinred001 |
D |
Oct. 12, 2023, 5:40 p.m. |
OK |
GNU C++17 (64) |
TESTS |
14 |
15 |
102400 |
|
|
227969481 |
fs20091003 |
D |
Oct. 13, 2023, 3:04 a.m. |
OK |
GNU C++17 (64) |
TESTS |
14 |
15 |
1638400 |
|
|
227947157 |
XpectoPatronum |
D |
Oct. 12, 2023, 7:41 p.m. |
OK |
GNU C++17 (64) |
TESTS |
14 |
15 |
4096000 |
|
|
227945093 |
yug_tyagi |
D |
Oct. 12, 2023, 7:18 p.m. |
OK |
GNU C++17 (64) |
TESTS |
14 |
31 |
102400 |
|
|
227964642 |
shiro53 |
D |
Oct. 13, 2023, 1:37 a.m. |
OK |
GNU C++17 (64) |
TESTS |
14 |
31 |
102400 |
|
|
227947446 |
Vineet0103 |
D |
Oct. 12, 2023, 7:45 p.m. |
OK |
GNU C++17 (64) |
TESTS |
14 |
31 |
102400 |
|
|
227931722 |
walilili |
D |
Oct. 12, 2023, 5:23 p.m. |
OK |
GNU C++17 (64) |
TESTS |
14 |
31 |
102400 |
|
|
227977132 |
go_die |
D |
Oct. 13, 2023, 4:57 a.m. |
OK |
GNU C++20 (64) |
TESTS |
14 |
0 |
204800 |
|
|
227924806 |
mdanisulh |
D |
Oct. 12, 2023, 4:51 p.m. |
OK |
GNU C++20 (64) |
TESTS |
14 |
15 |
0 |
|
|
227928504 |
Rasel__sarker |
D |
Oct. 12, 2023, 5:06 p.m. |
OK |
GNU C++20 (64) |
TESTS |
14 |
15 |
0 |
|
|
227973434 |
lll66686 |
D |
Oct. 13, 2023, 4:03 a.m. |
OK |
GNU C++20 (64) |
TESTS |
14 |
15 |
0 |
|
|
227966260 |
Learn_cute_k |
D |
Oct. 13, 2023, 2:09 a.m. |
OK |
GNU C++20 (64) |
TESTS |
14 |
15 |
0 |
|
|
227958418 |
shekhar_46 |
D |
Oct. 12, 2023, 11 p.m. |
OK |
GNU C++20 (64) |
TESTS |
14 |
15 |
0 |
|
|
227929944 |
ItzDesert |
D |
Oct. 12, 2023, 5:13 p.m. |
OK |
GNU C++20 (64) |
TESTS |
14 |
15 |
0 |
|
|
227928963 |
Satwik_Tillu |
D |
Oct. 12, 2023, 5:08 p.m. |
OK |
GNU C++20 (64) |
TESTS |
14 |
15 |
0 |
|
|
227925330 |
coderchamp7 |
D |
Oct. 12, 2023, 4:53 p.m. |
OK |
GNU C++20 (64) |
TESTS |
14 |
15 |
0 |
|
|
227979926 |
wdtn |
D |
Oct. 13, 2023, 5:32 a.m. |
OK |
GNU C++20 (64) |
TESTS |
14 |
15 |
102400 |
|
|
227928035 |
goodluck-ccq |
D |
Oct. 12, 2023, 5:04 p.m. |
OK |
Go |
TESTS |
14 |
108 |
512000 |
|
|
227943473 |
katomasao |
D |
Oct. 12, 2023, 7:02 p.m. |
OK |
Haskell |
TESTS |
14 |
78 |
11571200 |
|
|
227981780 |
Pirate_coder82 |
D |
Oct. 13, 2023, 5:52 a.m. |
OK |
Java 11 |
TESTS |
14 |
171 |
0 |
|
|
227974874 |
snkv |
D |
Oct. 13, 2023, 4:25 a.m. |
OK |
Java 11 |
TESTS |
14 |
217 |
0 |
|
|
227924984 |
Rohinth |
D |
Oct. 12, 2023, 4:52 p.m. |
OK |
Java 11 |
TESTS |
14 |
217 |
0 |
|
|
227974901 |
snkv |
D |
Oct. 13, 2023, 4:26 a.m. |
OK |
Java 11 |
TESTS |
14 |
218 |
0 |
|
|
227932859 |
RaHuL_SiNgH22 |
D |
Oct. 12, 2023, 5:31 p.m. |
OK |
Java 11 |
TESTS |
14 |
249 |
0 |
|
|
227933666 |
etian6795 |
D |
Oct. 12, 2023, 5:36 p.m. |
OK |
Java 11 |
TESTS |
14 |
249 |
0 |
|
|
227962956 |
lihanyu |
D |
Oct. 13, 2023, 1:03 a.m. |
OK |
Java 11 |
TESTS |
14 |
249 |
5222400 |
|
|
227924333 |
dheerajchhatanidc |
D |
Oct. 12, 2023, 4:49 p.m. |
OK |
Java 11 |
TESTS |
14 |
374 |
0 |
|
|
227958170 |
themadknight45 |
D |
Oct. 12, 2023, 10:53 p.m. |
OK |
Java 11 |
TESTS |
14 |
420 |
7168000 |
|
|
227958158 |
dark_rays |
D |
Oct. 12, 2023, 10:53 p.m. |
OK |
Java 11 |
TESTS |
14 |
420 |
7168000 |
|
|
227961946 |
the_unseen |
D |
Oct. 13, 2023, 12:38 a.m. |
OK |
Java 17 |
TESTS |
14 |
186 |
102400 |
|
|
227970745 |
AKhacks |
D |
Oct. 13, 2023, 3:24 a.m. |
OK |
Java 17 |
TESTS |
14 |
187 |
716800 |
|
|
227927996 |
Pratham2908 |
D |
Oct. 12, 2023, 5:03 p.m. |
OK |
Java 17 |
TESTS |
14 |
187 |
819200 |
|
|
227929539 |
Zhanzhe_Lee |
D |
Oct. 12, 2023, 5:11 p.m. |
OK |
Java 17 |
TESTS |
14 |
202 |
409600 |
|
|
227940926 |
vaibhav_1710 |
D |
Oct. 12, 2023, 6:37 p.m. |
OK |
Java 17 |
TESTS |
14 |
202 |
512000 |
|
|
227930619 |
anand_mishra_ |
D |
Oct. 12, 2023, 5:16 p.m. |
OK |
Java 17 |
TESTS |
14 |
218 |
102400 |
|
|
227938150 |
Nagendravarma |
D |
Oct. 12, 2023, 6:13 p.m. |
OK |
Java 17 |
TESTS |
14 |
218 |
614400 |
|
|
227963039 |
dilshar23 |
D |
Oct. 13, 2023, 1:05 a.m. |
OK |
Java 17 |
TESTS |
14 |
264 |
307200 |
|
|
227979632 |
darshanjan-entrepreneur |
D |
Oct. 13, 2023, 5:28 a.m. |
OK |
Java 17 |
TESTS |
14 |
264 |
614400 |
|
|
227981171 |
Swilled7 |
D |
Oct. 13, 2023, 5:45 a.m. |
OK |
Java 17 |
TESTS |
14 |
265 |
1024000 |
|
|
227962140 |
NerfThis |
D |
Oct. 13, 2023, 12:43 a.m. |
OK |
Java 8 |
TESTS |
14 |
109 |
0 |
|
|
227977316 |
Akarsh2810 |
D |
Oct. 13, 2023, 4:59 a.m. |
OK |
Java 8 |
TESTS |
14 |
124 |
0 |
|
|
227977110 |
Akarsh2810 |
D |
Oct. 13, 2023, 4:56 a.m. |
OK |
Java 8 |
TESTS |
14 |
124 |
0 |
|
|
227945793 |
sumitlaura101 |
D |
Oct. 12, 2023, 7:26 p.m. |
OK |
Java 8 |
TESTS |
14 |
140 |
5836800 |
|
|
227940372 |
Sumitsingh7 |
D |
Oct. 12, 2023, 6:32 p.m. |
OK |
Java 8 |
TESTS |
14 |
140 |
5836800 |
|
|
227929828 |
AbhayTiwari007 |
D |
Oct. 12, 2023, 5:12 p.m. |
OK |
Java 8 |
TESTS |
14 |
171 |
0 |
|
|
227933725 |
_mistborn |
D |
Oct. 12, 2023, 5:37 p.m. |
OK |
Java 8 |
TESTS |
14 |
187 |
0 |
|
|
227981239 |
amit_roy |
D |
Oct. 13, 2023, 5:46 a.m. |
OK |
Java 8 |
TESTS |
14 |
202 |
6656000 |
|
|
227963326 |
Tomatos03 |
D |
Oct. 13, 2023, 1:11 a.m. |
OK |
Java 8 |
TESTS |
14 |
592 |
0 |
|
|
227947334 |
jdtheripperpc |
D |
Oct. 12, 2023, 7:44 p.m. |
OK |
Java 8 |
TESTS |
14 |
1200 |
0 |
|
|
227925714 |
Golovanov399 |
D |
Oct. 12, 2023, 4:54 p.m. |
OK |
Kotlin 1.7 |
TESTS |
14 |
935 |
137932800 |
|
|
227970315 |
yyyyyyyyyyF |
D |
Oct. 13, 2023, 3:17 a.m. |
OK |
MS C++ 2017 |
TESTS |
14 |
46 |
102400 |
|
|
227936963 |
MMufinn |
D |
Oct. 12, 2023, 6:03 p.m. |
OK |
MS C++ 2017 |
TESTS |
14 |
46 |
102400 |
|
|
227931058 |
DanielGG |
D |
Oct. 12, 2023, 5:19 p.m. |
OK |
MS C++ 2017 |
TESTS |
14 |
46 |
102400 |
|
|
227956058 |
Olzlzlz |
D |
Oct. 12, 2023, 10:01 p.m. |
OK |
MS C++ 2017 |
TESTS |
14 |
1076 |
8396800 |
|
|
227941260 |
Justin_Foley |
D |
Oct. 12, 2023, 6:40 p.m. |
OK |
PyPy 3 |
TESTS |
14 |
171 |
12083200 |
|
|
227925934 |
yujie3 |
D |
Oct. 12, 2023, 4:55 p.m. |
OK |
PyPy 3 |
TESTS |
14 |
265 |
6246400 |
|
|
227945393 |
Joshc |
D |
Oct. 12, 2023, 7:22 p.m. |
OK |
PyPy 3 |
TESTS |
14 |
358 |
7475200 |
|
|
227978733 |
hato_ |
D |
Oct. 13, 2023, 5:18 a.m. |
OK |
PyPy 3 |
TESTS |
14 |
1060 |
9932800 |
|
|
227937925 |
madmaxz |
D |
Oct. 12, 2023, 6:11 p.m. |
OK |
PyPy 3-64 |
TESTS |
14 |
93 |
8294400 |
|
|
227931907 |
cy171 |
D |
Oct. 12, 2023, 5:25 p.m. |
OK |
PyPy 3-64 |
TESTS |
14 |
155 |
9932800 |
|
|
227929454 |
vedantmishra69 |
D |
Oct. 12, 2023, 5:10 p.m. |
OK |
PyPy 3-64 |
TESTS |
14 |
171 |
6144000 |
|
|
227935488 |
bronze_coder |
D |
Oct. 12, 2023, 5:51 p.m. |
OK |
PyPy 3-64 |
TESTS |
14 |
171 |
9318400 |
|
|
227959366 |
cybsbbb |
D |
Oct. 12, 2023, 11:28 p.m. |
OK |
PyPy 3-64 |
TESTS |
14 |
171 |
9625600 |
|
|
227927961 |
ProCoder12 |
D |
Oct. 12, 2023, 5:03 p.m. |
OK |
PyPy 3-64 |
TESTS |
14 |
171 |
9830400 |
|
|
227964891 |
randombernie |
D |
Oct. 13, 2023, 1:42 a.m. |
OK |
PyPy 3-64 |
TESTS |
14 |
171 |
17203200 |
|
|
227933655 |
Ayush___ |
D |
Oct. 12, 2023, 5:36 p.m. |
OK |
PyPy 3-64 |
TESTS |
14 |
171 |
24780800 |
|
|
227959211 |
cybsbbb |
D |
Oct. 12, 2023, 11:24 p.m. |
OK |
PyPy 3-64 |
TESTS |
14 |
186 |
7884800 |
|
|
227963236 |
_BREEZE_ |
D |
Oct. 13, 2023, 1:09 a.m. |
OK |
PyPy 3-64 |
TESTS |
14 |
186 |
8806400 |
|
|
227943858 |
YuRen-tw |
D |
Oct. 12, 2023, 7:06 p.m. |
OK |
Python 3 |
TESTS |
14 |
46 |
1228800 |
|
|
227962896 |
SIGMA_MAN |
D |
Oct. 13, 2023, 1:02 a.m. |
OK |
Python 3 |
TESTS |
14 |
77 |
1331200 |
|
|
227930194 |
Akylz |
D |
Oct. 12, 2023, 5:14 p.m. |
OK |
Python 3 |
TESTS |
14 |
108 |
1638400 |
|
|
227943630 |
TheSoltion12 |
D |
Oct. 12, 2023, 7:03 p.m. |
OK |
Python 3 |
TESTS |
14 |
124 |
1331200 |
|
|
227927447 |
Jimmily |
D |
Oct. 12, 2023, 5:01 p.m. |
OK |
Python 3 |
TESTS |
14 |
124 |
1433600 |
|
|
227939345 |
Akylz |
D |
Oct. 12, 2023, 6:23 p.m. |
OK |
Python 3 |
TESTS |
14 |
124 |
1638400 |
|
|
227942152 |
daszybak |
D |
Oct. 12, 2023, 6:48 p.m. |
OK |
Python 3 |
TESTS |
14 |
186 |
1843200 |
|
|
227924420 |
r0gue_shinobi |
D |
Oct. 12, 2023, 4:49 p.m. |
OK |
Python 3 |
TESTS |
14 |
264 |
1638400 |
|
|
227929613 |
manav_1301 |
D |
Oct. 12, 2023, 5:11 p.m. |
OK |
Python 3 |
TESTS |
14 |
265 |
1331200 |
|
|
227941979 |
Aadi03 |
D |
Oct. 12, 2023, 6:47 p.m. |
OK |
Python 3 |
TESTS |
14 |
452 |
1843200 |
|
|
227948965 |
Loganwick |
D |
Oct. 12, 2023, 8:04 p.m. |
OK |
Rust 2021 |
TESTS |
14 |
31 |
614400 |
|
|
remove filters
Back to search problems