Codeforces Round 835 (Div. 4)

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.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1760 Codeforces Round 835 (Div. 4) FINISHED False 8700 62781899 Nov. 21, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 23910 ) D Challenging Valleys PROGRAMMING implementation

B'You are given an array a[0 ... n-1] of n integers. This array is called a "valley" if there exists exactly one subarray a[l ... r] such that: Here are three examples: The first image shows the array [ 3, 2, 2, 1, 2, 2, 3 ], it is a valley because only subarray with indices l=r=3 satisfies the condition. The second image shows the array [ 1, 1, 1, 2, 3, 3, 4, 5, 6, 6, 6 ], it is a valley because only subarray with indices l=0, r=2 satisfies the codition. The third image shows the array [ 1, 2, 3, 4, 3, 2, 1 ], it is not a valley because two subarrays l=r=0 and l=r=6 that satisfy the condition. You are asked whether the given array is a valley or not. Note that we consider the array to be indexed from 0 . The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= q n <= q 2 cdot10^5 ) -- the length of the array. The second line of each test case contains n integers a_i ( 1 <= q a_i <= q 10^9 ) -- the elements of the array. It is guaranteed that the sum of n over all test cases is smaller than 2 cdot10^5 . For each test case, output "YES" (without quotes) if the array is a valley, and "NO" (without quotes) otherwise. You can output the answer in any case (for example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer). The first three test cases are explained in the statement. '...

Tutorials

109348

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
182050823 WAAAAAAAAAAAAAAAAAAAAA D Nov. 21, 2022, 7:05 p.m. OK C# 10 TESTS 12 62 18636800
182041509 Aisha993 D Nov. 21, 2022, 5:38 p.m. OK GNU C11 TESTS 12 46 819200
182087184 ylyh D Nov. 22, 2022, 5:18 a.m. OK GNU C11 TESTS 12 46 819200
182081680 Miraemon D Nov. 22, 2022, 3:40 a.m. OK GNU C11 TESTS 12 46 819200
182040585 DariaFung D Nov. 21, 2022, 5:31 p.m. OK GNU C11 TESTS 12 46 1638400
182056766 Syntax_Error_ D Nov. 21, 2022, 8:21 p.m. OK GNU C11 TESTS 12 61 819200
182037251 oldprg D Nov. 21, 2022, 5:12 p.m. OK GNU C11 TESTS 12 62 0
182037940 mrgaolll D Nov. 21, 2022, 5:16 p.m. OK GNU C11 TESTS 12 62 819200
182079436 BerryPie D Nov. 22, 2022, 3:07 a.m. OK GNU C++14 TESTS 12 46 819200
182047470 ka_sh D Nov. 21, 2022, 6:30 p.m. OK GNU C++14 TESTS 12 46 1638400
182078228 WulongQAQ D Nov. 22, 2022, 2:43 a.m. OK GNU C++14 TESTS 12 46 3993600
182063332 _ncm_ D Nov. 21, 2022, 10:31 p.m. OK GNU C++14 TESTS 12 61 819200
182082979 AIM-9M D Nov. 22, 2022, 4:05 a.m. OK GNU C++14 TESTS 12 61 819200
182075134 ug1y-b0y D Nov. 22, 2022, 1:39 a.m. OK GNU C++14 TESTS 12 61 819200
182068967 omeganot D Nov. 22, 2022, 1:13 a.m. OK GNU C++14 TESTS 12 61 819200
182068470 Nelces D Nov. 22, 2022, 1:02 a.m. OK GNU C++14 TESTS 12 61 921600
182067079 _ncm_ D Nov. 22, 2022, 12:25 a.m. OK GNU C++14 TESTS 12 61 1638400
182039046 saminsadaf7 D Nov. 21, 2022, 5:22 p.m. OK GNU C++14 TESTS 12 61 1638400
182067475 ff_666 D Nov. 22, 2022, 12:36 a.m. OK GNU C++17 TESTS 12 15 1843200
182081526 uxinglaohu D Nov. 22, 2022, 3:37 a.m. OK GNU C++17 TESTS 12 46 819200
182046086 Sig0001 D Nov. 21, 2022, 6:16 p.m. OK GNU C++17 TESTS 12 46 1638400
182035742 includesid D Nov. 21, 2022, 5:05 p.m. OK GNU C++17 TESTS 12 46 2048000
182081893 4eyebird D Nov. 22, 2022, 3:44 a.m. OK GNU C++17 TESTS 12 46 3993600
182039129 Bharat_986 D Nov. 21, 2022, 5:22 p.m. OK GNU C++17 TESTS 12 61 819200
182053298 VietKieuCampuchia D Nov. 21, 2022, 7:33 p.m. OK GNU C++17 TESTS 12 61 819200
182065818 Deaga D Nov. 21, 2022, 11:43 p.m. OK GNU C++17 TESTS 12 61 819200
182088833 FoundGod D Nov. 22, 2022, 5:43 a.m. OK GNU C++17 TESTS 12 61 819200
182086844 Sayan_Jasu D Nov. 22, 2022, 5:13 a.m. OK GNU C++17 TESTS 12 61 1638400
182057654 ebarbs D Nov. 21, 2022, 8:35 p.m. OK GNU C++17 (64) TESTS 12 31 18227200
182068632 mixed_juice717 D Nov. 22, 2022, 1:05 a.m. OK GNU C++17 (64) TESTS 12 46 819200
182079204 Evang D Nov. 22, 2022, 3:03 a.m. OK GNU C++17 (64) TESTS 12 46 819200
182060981 moo. D Nov. 21, 2022, 9:38 p.m. OK GNU C++17 (64) TESTS 12 46 819200
182056625 enslaved D Nov. 21, 2022, 8:19 p.m. OK GNU C++17 (64) TESTS 12 46 819200
182055589 arwamohmd.32 D Nov. 21, 2022, 8:04 p.m. OK GNU C++17 (64) TESTS 12 46 819200
182053352 naaam_h_siddhu D Nov. 21, 2022, 7:34 p.m. OK GNU C++17 (64) TESTS 12 46 819200
182051272 mesbah19 D Nov. 21, 2022, 7:10 p.m. OK GNU C++17 (64) TESTS 12 46 819200
182045824 FuzzyCarnage D Nov. 21, 2022, 6:14 p.m. OK GNU C++17 (64) TESTS 12 46 819200
182045774 FuzzyCarnage D Nov. 21, 2022, 6:13 p.m. OK GNU C++17 (64) TESTS 12 46 819200
182036839 crackearth56 D Nov. 21, 2022, 5:10 p.m. OK GNU C++20 (64) TESTS 12 31 0
182057642 zERo_Inf D Nov. 21, 2022, 8:35 p.m. OK GNU C++20 (64) TESTS 12 31 819200
182054576 hash_comder D Nov. 21, 2022, 7:50 p.m. OK GNU C++20 (64) TESTS 12 31 819200
182059546 q64bit D Nov. 21, 2022, 9:09 p.m. OK GNU C++20 (64) TESTS 12 31 819200
182067082 AaronHe D Nov. 22, 2022, 12:25 a.m. OK GNU C++20 (64) TESTS 12 31 819200
182071640 Shikimori-san D Nov. 22, 2022, 1:30 a.m. OK GNU C++20 (64) TESTS 12 31 819200
182077101 Vistarin D Nov. 22, 2022, 2:22 a.m. OK GNU C++20 (64) TESTS 12 31 819200
182082184 Akorac D Nov. 22, 2022, 3:50 a.m. OK GNU C++20 (64) TESTS 12 31 819200
182083156 itsdhruvarora D Nov. 22, 2022, 4:08 a.m. OK GNU C++20 (64) TESTS 12 31 819200
182059266 otaha6635 D Nov. 21, 2022, 9:03 p.m. OK GNU C++20 (64) TESTS 12 31 819200
182076542 pepradere D Nov. 22, 2022, 2:10 a.m. OK Go TESTS 12 46 13209600
182063813 shiro D Nov. 21, 2022, 10:44 p.m. OK Go TESTS 12 93 4710400
182042230 Ashutosh_patel_ D Nov. 21, 2022, 5:43 p.m. OK Java 11 TESTS 12 187 0
182063137 Yousef_Badr D Nov. 21, 2022, 10:27 p.m. OK Java 11 TESTS 12 202 0
182035383 shizuka12 D Nov. 21, 2022, 5:04 p.m. OK Java 11 TESTS 12 233 0
182088605 pakkapapad D Nov. 22, 2022, 5:39 a.m. OK Java 11 TESTS 12 233 6246400
182052560 harsh.bhandari.v D Nov. 21, 2022, 7:25 p.m. OK Java 11 TESTS 12 248 6246400
182061571 Abdelrahim303 D Nov. 21, 2022, 9:50 p.m. OK Java 11 TESTS 12 249 0
182040355 AadishJain D Nov. 21, 2022, 5:30 p.m. OK Java 11 TESTS 12 249 0
182036593 Siyaram_13 D Nov. 21, 2022, 5:09 p.m. OK Java 11 TESTS 12 264 6553600
182035824 Siyaram_13 D Nov. 21, 2022, 5:06 p.m. OK Java 11 TESTS 12 280 6451200
182046425 sduMamutbekov D Nov. 21, 2022, 6:19 p.m. OK Java 11 TESTS 12 311 6656000
182040031 Eslam_Ahmed D Nov. 21, 2022, 5:27 p.m. OK Java 17 TESTS 12 233 307200
182068576 DimasHN_04 D Nov. 22, 2022, 1:04 a.m. OK Java 17 TESTS 12 233 921600
182087020 Badass_Nemesis D Nov. 22, 2022, 5:15 a.m. OK Java 17 TESTS 12 249 5427200
182083953 sharadtandale2878 D Nov. 22, 2022, 4:23 a.m. OK Java 17 TESTS 12 264 512000
182048667 koolkartik D Nov. 21, 2022, 6:41 p.m. OK Java 17 TESTS 12 264 512000
182048211 a_dev D Nov. 21, 2022, 6:37 p.m. OK Java 17 TESTS 12 280 512000
182062399 lauralou930 D Nov. 21, 2022, 10:08 p.m. OK Java 17 TESTS 12 280 21606400
182060881 kevy15 D Nov. 21, 2022, 9:35 p.m. OK Java 17 TESTS 12 327 4710400
182040669 rajashish914 D Nov. 21, 2022, 5:32 p.m. OK Java 17 TESTS 12 529 921600
182086453 Suraj1607 D Nov. 22, 2022, 5:06 a.m. OK Java 17 TESTS 12 530 614400
182058337 Mohamed308 D Nov. 21, 2022, 8:47 p.m. OK Java 8 TESTS 12 139 2764800
182038535 Koka D Nov. 21, 2022, 5:19 p.m. OK Java 8 TESTS 12 139 2764800
182063056 mohamedhassan_c D Nov. 21, 2022, 10:24 p.m. OK Java 8 TESTS 12 155 2764800
182042845 rish1896 D Nov. 21, 2022, 5:48 p.m. OK Java 8 TESTS 12 155 6041600
182054298 ahmedyuu D Nov. 21, 2022, 7:46 p.m. OK Java 8 TESTS 12 155 6451200
182054345 ahmedtawfik D Nov. 21, 2022, 7:46 p.m. OK Java 8 TESTS 12 170 6451200
182054268 ahmedyuu D Nov. 21, 2022, 7:45 p.m. OK Java 8 TESTS 12 170 6451200
182054213 ahmedyuu D Nov. 21, 2022, 7:45 p.m. OK Java 8 TESTS 12 170 6451200
182086504 toufique_husein D Nov. 22, 2022, 5:07 a.m. OK Java 8 TESTS 12 358 0
182082299 sarthak_2912 D Nov. 22, 2022, 3:52 a.m. OK Java 8 TESTS 12 358 0
182087720 debk007 D Nov. 22, 2022, 5:26 a.m. OK Kotlin 1.7 TESTS 12 998 109772800
182088124 zixiang D Nov. 22, 2022, 5:32 a.m. OK MS C++ 2017 TESTS 12 62 819200
182086058 tmyz D Nov. 22, 2022, 5 a.m. OK MS C++ 2017 TESTS 12 171 0
182085118 ShiYiiiii D Nov. 22, 2022, 4:44 a.m. OK MS C++ 2017 TESTS 12 171 819200
182041547 timusmanovs D Nov. 21, 2022, 5:38 p.m. OK MS C++ 2017 TESTS 12 171 819200
182037421 osoka_123 D Nov. 21, 2022, 5:13 p.m. OK MS C++ 2017 TESTS 12 171 819200
182081031 LoTFe D Nov. 22, 2022, 3:28 a.m. OK MS C++ 2017 TESTS 12 171 3072000
182054459 reversir D Nov. 21, 2022, 7:48 p.m. OK MS C++ 2017 TESTS 12 187 819200
182037450 1783034644 D Nov. 21, 2022, 5:13 p.m. OK MS C++ 2017 TESTS 12 187 819200
182058529 rsFalse D Nov. 21, 2022, 8:51 p.m. OK Perl TESTS 12 795 38912000
182041167 nestor_makhno D Nov. 21, 2022, 5:35 p.m. OK PyPy 2 TESTS 12 389 13004800
182042513 phantomxxx D Nov. 21, 2022, 5:46 p.m. OK PyPy 3 TESTS 12 155 19046400
182034197 adwait_hegde D Nov. 21, 2022, 4:59 p.m. OK PyPy 3 TESTS 12 171 19353600
182042156 Baibars D Nov. 21, 2022, 5:43 p.m. OK PyPy 3 TESTS 12 265 15257600
182089653 Pars03 D Nov. 22, 2022, 5:54 a.m. OK PyPy 3 TESTS 12 327 19148800
182076754 MHAII D Nov. 22, 2022, 2:15 a.m. OK PyPy 3 TESTS 12 373 19046400
182068362 akimuuwu D Nov. 22, 2022, 12:59 a.m. OK PyPy 3 TESTS 12 374 19148800
182070310 Sp00kiel D Nov. 22, 2022, 1:25 a.m. OK PyPy 3 TESTS 12 389 19148800
182034404 dwaraganathan15 D Nov. 21, 2022, 5:01 p.m. OK PyPy 3 TESTS 12 420 18944000
182062705 timofey256 D Nov. 21, 2022, 10:16 p.m. OK PyPy 3 TESTS 12 420 19148800
182034576 hkwu6013 D Nov. 21, 2022, 5:01 p.m. OK PyPy 3-64 TESTS 12 124 28057600
182045750 abc_noob D Nov. 21, 2022, 6:13 p.m. OK PyPy 3-64 TESTS 12 139 29388800
182050286 Su_123 D Nov. 21, 2022, 6:59 p.m. OK PyPy 3-64 TESTS 12 140 28262400
182050908 haydenhyoung D Nov. 21, 2022, 7:06 p.m. OK PyPy 3-64 TESTS 12 140 29798400
182041486 crapcode D Nov. 21, 2022, 5:38 p.m. OK PyPy 3-64 TESTS 12 140 30412800
182050175 Su_123 D Nov. 21, 2022, 6:58 p.m. OK PyPy 3-64 TESTS 12 155 28262400
182046976 Su_123 D Nov. 21, 2022, 6:25 p.m. OK PyPy 3-64 TESTS 12 155 28262400
182062541 Juanm1 D Nov. 21, 2022, 10:12 p.m. OK PyPy 3-64 TESTS 12 155 29184000
182061498 nealzane D Nov. 21, 2022, 9:48 p.m. OK PyPy 3-64 TESTS 12 155 29900800
182037011 ds1 D Nov. 21, 2022, 5:11 p.m. OK PyPy 3-64 TESTS 12 155 29900800
182089880 Dinoh_Sandys D Nov. 22, 2022, 5:57 a.m. OK Python 3 TESTS 12 124 16179200
182042927 marcis.vijups D Nov. 21, 2022, 5:49 p.m. OK Python 3 TESTS 12 124 16486400
182037872 longvb48 D Nov. 21, 2022, 5:16 p.m. OK Python 3 TESTS 12 140 16486400
182037513 RexJoshua D Nov. 21, 2022, 5:14 p.m. OK Python 3 TESTS 12 140 16486400
182039485 elistark D Nov. 21, 2022, 5:24 p.m. OK Python 3 TESTS 12 155 16486400
182063780 EinPy D Nov. 21, 2022, 10:43 p.m. OK Python 3 TESTS 12 156 16076800
182048677 ssundar.kars D Nov. 21, 2022, 6:41 p.m. OK Python 3 TESTS 12 156 16486400
182041927 himasiri1999 D Nov. 21, 2022, 5:41 p.m. OK Python 3 TESTS 12 156 16486400
182083804 dmnewone D Nov. 22, 2022, 4:20 a.m. OK Python 3 TESTS 12 170 15872000
182050536 Alyalsayed D Nov. 21, 2022, 7:02 p.m. OK Python 3 TESTS 12 170 16486400
182048091 nikgaevoy D Nov. 21, 2022, 6:36 p.m. OK Rust 2021 TESTS 12 124 17715200

remove filters

Back to search problems