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 have an array of integers a of length n . You can apply the following operation to the given array: Determine whether it is possible to sort the array in non-decreasing order by performing the operation any number of times (possibly zero). For example, let a = [ 7, 10, 1, 3, 2 ]. Then we can perform 3 operations to sort the array: The first line of input data contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the length of array a . The second line of each test case contains exactly n positive integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ) -- the elements of array a . It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output on a separate line: You can output YES and NO in any case (for example, strings yEs, yes, Yes and YES will be recognized as positive response). 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 |
215676666 |
tabibi |
B |
July 26, 2023, 5:15 a.m. |
OK |
C# 10 |
TESTS |
7 |
249 |
26931200 |
|
|
215652952 |
bluemegane |
B |
July 25, 2023, 10:59 p.m. |
OK |
C# 8 |
TESTS |
7 |
109 |
18534400 |
|
|
215652805 |
bluemegane |
B |
July 25, 2023, 10:55 p.m. |
OK |
C# 8 |
TESTS |
7 |
171 |
18739200 |
|
|
215630925 |
PLUTO_o |
B |
July 25, 2023, 5:50 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
6 |
1263 |
17612800 |
|
|
215661651 |
songtianyu |
B |
July 26, 2023, 2:06 a.m. |
OK |
Clang++20 Diagnostics |
TESTS |
7 |
1029 |
2048000 |
|
|
215635933 |
arctictern |
B |
July 25, 2023, 6:33 p.m. |
OK |
Clang++20 Diagnostics |
TESTS |
7 |
1138 |
16486400 |
|
|
215621837 |
Hendrix_Lee |
B |
July 25, 2023, 4:57 p.m. |
OK |
GNU C11 |
TESTS |
6 |
62 |
3174400 |
|
|
215635720 |
alizayan684 |
B |
July 25, 2023, 6:31 p.m. |
OK |
GNU C11 |
TESTS |
7 |
109 |
1740800 |
|
|
215656245 |
ce_375 |
B |
July 26, 2023, 12:36 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
61 |
1638400 |
|
|
215648184 |
Eman-ashraf-awad |
B |
July 25, 2023, 9:14 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
61 |
1638400 |
|
|
215656603 |
qiaochen |
B |
July 26, 2023, 12:46 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
61 |
1638400 |
|
|
215674395 |
Pratyogi_7 |
B |
July 26, 2023, 4:47 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
61 |
1638400 |
|
|
215663439 |
tongluosao |
B |
July 26, 2023, 2:29 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
61 |
4403200 |
|
|
215648033 |
ganeshamaraneni19 |
B |
July 25, 2023, 9:12 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
62 |
1536000 |
|
|
215668298 |
T0p_ |
B |
July 26, 2023, 3:25 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
62 |
1638400 |
|
|
215668197 |
2022111821 |
B |
July 26, 2023, 3:24 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
62 |
1638400 |
|
|
215678152 |
cqbzhyn |
B |
July 26, 2023, 5:32 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
62 |
1638400 |
|
|
215673979 |
tzs_21 |
B |
July 26, 2023, 4:41 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
62 |
1638400 |
|
|
215625135 |
Md_Imdadul_Haque_Somik |
B |
July 25, 2023, 5:11 p.m. |
OK |
GNU C++17 |
TESTS |
6 |
61 |
1638400 |
|
|
215630863 |
Rafa017I |
B |
July 25, 2023, 5:49 p.m. |
OK |
GNU C++17 |
TESTS |
6 |
61 |
1638400 |
|
|
215633710 |
antonleeee |
B |
July 25, 2023, 6:13 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
61 |
1638400 |
|
|
215649853 |
Nada_A7med |
B |
July 25, 2023, 9:44 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
61 |
2764800 |
|
|
215649437 |
Taha |
B |
July 25, 2023, 9:36 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
61 |
2764800 |
|
|
215620499 |
Javier06 |
B |
July 25, 2023, 4:52 p.m. |
OK |
GNU C++17 |
TESTS |
6 |
61 |
2867200 |
|
|
215675249 |
shreyanshdangi464 |
B |
July 26, 2023, 4:57 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
61 |
2969600 |
|
|
215625843 |
Void.exe |
B |
July 25, 2023, 5:15 p.m. |
OK |
GNU C++17 |
TESTS |
6 |
61 |
3891200 |
|
|
215628200 |
omar2017 |
B |
July 25, 2023, 5:30 p.m. |
OK |
GNU C++17 |
TESTS |
6 |
62 |
1024000 |
|
|
215680474 |
kanu_2303 |
B |
July 26, 2023, 5:59 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
62 |
1638400 |
|
|
215632698 |
GabrielNeri |
B |
July 25, 2023, 6:04 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
46 |
1638400 |
|
|
215680327 |
ImmortalMerlin |
B |
July 26, 2023, 5:57 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
46 |
1638400 |
|
|
215660497 |
wang_shuo123 |
B |
July 26, 2023, 1:49 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
46 |
1638400 |
|
|
215641527 |
OmarW |
B |
July 25, 2023, 7:37 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
46 |
1638400 |
|
|
215635519 |
yousef_nassar |
B |
July 25, 2023, 6:29 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
46 |
1740800 |
|
|
215659975 |
SugarT |
B |
July 26, 2023, 1:41 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
46 |
2969600 |
|
|
215634288 |
menna4691 |
B |
July 25, 2023, 6:18 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
46 |
2969600 |
|
|
215662279 |
atomworkplace1234 |
B |
July 26, 2023, 2:14 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
46 |
2969600 |
|
|
215665169 |
jk1024 |
B |
July 26, 2023, 2:49 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
46 |
2969600 |
|
|
215656997 |
YaoLingF |
B |
July 26, 2023, 12:54 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
46 |
3174400 |
|
|
215649162 |
kedrox |
B |
July 25, 2023, 9:31 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
31 |
1638400 |
|
|
215643349 |
KareemHatem |
B |
July 25, 2023, 8:08 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
31 |
1638400 |
|
|
215640767 |
Dirus007 |
B |
July 25, 2023, 7:28 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
31 |
1638400 |
|
|
215634216 |
Khaled_Al_Awad |
B |
July 25, 2023, 6:17 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
31 |
1638400 |
|
|
215630186 |
SenseiYahya |
B |
July 25, 2023, 5:44 p.m. |
OK |
GNU C++20 (64) |
TESTS |
6 |
31 |
1638400 |
|
|
215676207 |
raihanul.hridoy100 |
B |
July 26, 2023, 5:09 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
31 |
1638400 |
|
|
215672687 |
The_Ahmed |
B |
July 26, 2023, 4:22 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
31 |
1638400 |
|
|
215668674 |
fa45b216 |
B |
July 26, 2023, 3:30 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
31 |
1638400 |
|
|
215660198 |
rgnerdplayer |
B |
July 26, 2023, 1:45 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
31 |
1638400 |
|
|
215652500 |
ahmed.abdelsamad55 |
B |
July 25, 2023, 10:47 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
31 |
1638400 |
|
|
215677388 |
botayhard |
B |
July 26, 2023, 5:23 a.m. |
OK |
Go |
TESTS |
7 |
77 |
161792000 |
|
|
215677269 |
TJ_Codes |
B |
July 26, 2023, 5:22 a.m. |
OK |
Java 11 |
TESTS |
7 |
218 |
0 |
|
|
215638470 |
WhatAGod |
B |
July 25, 2023, 7:01 p.m. |
OK |
Java 11 |
TESTS |
7 |
264 |
4403200 |
|
|
215675153 |
dark_rays |
B |
July 26, 2023, 4:56 a.m. |
OK |
Java 11 |
TESTS |
7 |
296 |
8601600 |
|
|
215656047 |
ttannishh |
B |
July 26, 2023, 12:31 a.m. |
OK |
Java 11 |
TESTS |
7 |
326 |
18944000 |
|
|
215641895 |
princeayush04 |
B |
July 25, 2023, 7:44 p.m. |
OK |
Java 11 |
TESTS |
7 |
327 |
6348800 |
|
|
215680175 |
Nanthakumar06 |
B |
July 26, 2023, 5:56 a.m. |
OK |
Java 11 |
TESTS |
7 |
342 |
13004800 |
|
|
215641906 |
revenant_20 |
B |
July 25, 2023, 7:44 p.m. |
OK |
Java 11 |
TESTS |
7 |
358 |
5324800 |
|
|
215620545 |
Akhil_Chennupati |
B |
July 25, 2023, 4:52 p.m. |
OK |
Java 11 |
TESTS |
6 |
389 |
19865600 |
|
|
215671807 |
InfinitePath |
B |
July 26, 2023, 4:09 a.m. |
OK |
Java 11 |
TESTS |
7 |
404 |
77516800 |
|
|
215676923 |
verma.shivam2605 |
B |
July 26, 2023, 5:18 a.m. |
OK |
Java 11 |
TESTS |
7 |
451 |
0 |
|
|
215663786 |
looklakshya |
B |
July 26, 2023, 2:33 a.m. |
OK |
Java 17 |
TESTS |
7 |
187 |
0 |
|
|
215629288 |
Abdelrahim303 |
B |
July 25, 2023, 5:37 p.m. |
OK |
Java 17 |
TESTS |
6 |
202 |
614400 |
|
|
215656832 |
Nagendravarma |
B |
July 26, 2023, 12:51 a.m. |
OK |
Java 17 |
TESTS |
7 |
218 |
204800 |
|
|
215649972 |
inst |
B |
July 25, 2023, 9:47 p.m. |
OK |
Java 17 |
TESTS |
7 |
218 |
716800 |
|
|
215623711 |
nimbargisamarth |
B |
July 25, 2023, 5:04 p.m. |
OK |
Java 17 |
TESTS |
6 |
233 |
614400 |
|
|
215654554 |
ExcaliBBur |
B |
July 25, 2023, 11:49 p.m. |
OK |
Java 17 |
TESTS |
7 |
249 |
0 |
|
|
215632269 |
harshn.work |
B |
July 25, 2023, 6:01 p.m. |
OK |
Java 17 |
TESTS |
7 |
264 |
819200 |
|
|
215662276 |
anand_mishra_ |
B |
July 26, 2023, 2:14 a.m. |
OK |
Java 17 |
TESTS |
7 |
264 |
1331200 |
|
|
215661288 |
Kiwiegg |
B |
July 26, 2023, 2 a.m. |
OK |
Java 17 |
TESTS |
7 |
280 |
921600 |
|
|
215659445 |
Jatinydv17 |
B |
July 26, 2023, 1:34 a.m. |
OK |
Java 17 |
TESTS |
7 |
280 |
5120000 |
|
|
215636864 |
leonlian |
B |
July 25, 2023, 6:42 p.m. |
OK |
Java 8 |
TESTS |
7 |
155 |
0 |
|
|
215658061 |
lemma_Forever |
B |
July 26, 2023, 1:13 a.m. |
OK |
Java 8 |
TESTS |
7 |
202 |
4505600 |
|
|
215636546 |
Masalmah |
B |
July 25, 2023, 6:39 p.m. |
OK |
Java 8 |
TESTS |
7 |
202 |
66969600 |
|
|
215650630 |
Abood19 |
B |
July 25, 2023, 10:01 p.m. |
OK |
Java 8 |
TESTS |
7 |
217 |
4403200 |
|
|
215675791 |
MJ21 |
B |
July 26, 2023, 5:04 a.m. |
OK |
Java 8 |
TESTS |
7 |
218 |
4403200 |
|
|
215627572 |
Tomatos03 |
B |
July 25, 2023, 5:26 p.m. |
OK |
Java 8 |
TESTS |
6 |
218 |
13516800 |
|
|
215676436 |
codechefpurpose2023 |
B |
July 26, 2023, 5:12 a.m. |
OK |
Java 8 |
TESTS |
7 |
248 |
4403200 |
|
|
215669978 |
harry1995 |
B |
July 26, 2023, 3:47 a.m. |
OK |
Java 8 |
TESTS |
7 |
265 |
17612800 |
|
|
215655276 |
lankimanchodu |
B |
July 26, 2023, 12:10 a.m. |
OK |
Java 8 |
TESTS |
7 |
420 |
0 |
|
|
215674915 |
MJ21 |
B |
July 26, 2023, 4:53 a.m. |
OK |
Java 8 |
TESTS |
7 |
436 |
0 |
|
|
215633886 |
sethposner |
B |
July 25, 2023, 6:14 p.m. |
OK |
JavaScript |
TESTS |
7 |
265 |
35840000 |
|
|
215635112 |
TRR |
B |
July 25, 2023, 6:25 p.m. |
OK |
Mono C# |
TESTS |
7 |
124 |
20480000 |
|
|
215637408 |
maxK99 |
B |
July 25, 2023, 6:48 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
187 |
1638400 |
|
|
215663545 |
fanhuaxingyu |
B |
July 26, 2023, 2:30 a.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
187 |
1638400 |
|
|
215649662 |
majddd |
B |
July 25, 2023, 9:40 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
202 |
1638400 |
|
|
215667052 |
Nanase_ai |
B |
July 26, 2023, 3:11 a.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
202 |
3174400 |
|
|
215635024 |
eogito |
B |
July 25, 2023, 6:24 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
218 |
2457600 |
|
|
215626336 |
maya_cheery |
B |
July 25, 2023, 5:18 p.m. |
OK |
MS C++ 2017 |
TESTS |
6 |
514 |
1638400 |
|
|
215628062 |
codeiitd |
B |
July 25, 2023, 5:29 p.m. |
OK |
PyPy 3 |
TESTS |
6 |
295 |
20787200 |
|
|
215645194 |
WalrusRamen21 |
B |
July 25, 2023, 8:32 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
326 |
19046400 |
|
|
215655095 |
Wizard_of_Orz |
B |
July 26, 2023, 12:06 a.m. |
OK |
PyPy 3 |
TESTS |
7 |
343 |
19046400 |
|
|
215642904 |
Compiler_10 |
B |
July 25, 2023, 8 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
343 |
19353600 |
|
|
215677024 |
kotleta552 |
B |
July 26, 2023, 5:19 a.m. |
OK |
PyPy 3 |
TESTS |
7 |
389 |
18841600 |
|
|
215627518 |
adu_alt |
B |
July 25, 2023, 5:25 p.m. |
OK |
PyPy 3 |
TESTS |
6 |
405 |
24985600 |
|
|
215676661 |
lkm_codeforces |
B |
July 26, 2023, 5:15 a.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
124 |
19353600 |
|
|
215628098 |
gardengnome |
B |
July 25, 2023, 5:29 p.m. |
OK |
PyPy 3-64 |
TESTS |
6 |
124 |
26624000 |
|
|
215672556 |
injust |
B |
July 26, 2023, 4:20 a.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
124 |
26726400 |
|
|
215640093 |
injust |
B |
July 25, 2023, 7:20 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
124 |
26726400 |
|
|
215656041 |
RobinFromTheHood |
B |
July 26, 2023, 12:31 a.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
124 |
27545600 |
|
|
215632393 |
Alex239 |
B |
July 25, 2023, 6:02 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
124 |
27545600 |
|
|
215674057 |
Ankush_tonde |
B |
July 26, 2023, 4:42 a.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
124 |
30105600 |
|
|
215660285 |
aureg109 |
B |
July 26, 2023, 1:46 a.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
140 |
29286400 |
|
|
215645286 |
ahmedabdelbakey7 |
B |
July 25, 2023, 8:33 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
140 |
30105600 |
|
|
215680121 |
Raindrops1117 |
B |
July 26, 2023, 5:55 a.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
155 |
26726400 |
|
|
215637812 |
abukhassym |
B |
July 25, 2023, 6:53 p.m. |
OK |
Python 3 |
TESTS |
7 |
139 |
27852800 |
|
|
215640304 |
Damirem |
B |
July 25, 2023, 7:22 p.m. |
OK |
Python 3 |
TESTS |
7 |
155 |
26521600 |
|
|
215631168 |
Aldibek |
B |
July 25, 2023, 5:51 p.m. |
OK |
Python 3 |
TESTS |
7 |
155 |
27033600 |
|
|
215660270 |
aureg109 |
B |
July 26, 2023, 1:45 a.m. |
OK |
Python 3 |
TESTS |
7 |
155 |
27545600 |
|
|
215637946 |
abukhassym |
B |
July 25, 2023, 6:54 p.m. |
OK |
Python 3 |
TESTS |
7 |
155 |
27852800 |
|
|
215646105 |
oraby2110 |
B |
July 25, 2023, 8:44 p.m. |
OK |
Python 3 |
TESTS |
7 |
155 |
28672000 |
|
|
215676608 |
giriraj_parik |
B |
July 26, 2023, 5:14 a.m. |
OK |
Python 3 |
TESTS |
7 |
156 |
28672000 |
|
|
215653528 |
Anupam_1925 |
B |
July 25, 2023, 11:17 p.m. |
OK |
Python 3 |
TESTS |
7 |
171 |
27238400 |
|
|
215657394 |
farhad-nstu |
B |
July 26, 2023, 1:03 a.m. |
OK |
Python 3 |
TESTS |
7 |
171 |
27852800 |
|
|
215634243 |
rajesh_127 |
B |
July 25, 2023, 6:18 p.m. |
OK |
Python 3 |
TESTS |
7 |
171 |
27852800 |
|
|
215628796 |
0x81 |
B |
July 25, 2023, 5:34 p.m. |
OK |
Ruby 3 |
TESTS |
6 |
608 |
36659200 |
|
|
215645839 |
ihnaqi |
B |
July 25, 2023, 8:41 p.m. |
OK |
Rust 2021 |
TESTS |
7 |
62 |
6656000 |
|
|
215645323 |
ihnaqi |
B |
July 25, 2023, 8:34 p.m. |
OK |
Rust 2021 |
TESTS |
7 |
77 |
6656000 |
|
|
remove filters
Back to search problems