Educational Codeforces Round 162 (Rated for Div. 2)

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
1923 Educational Codeforces Round 162 (Rated for Div. 2) FINISHED False 7200 28481063 Feb. 23, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15848 ) C Find B PROGRAMMING constructive algorithms data structures greedy

B'An array a of length m is considered good if there exists an integer array b of length m such that the following conditions hold: You are given an array c of length n . Each element of this array is greater than 0 . You have to answer q queries. During the i -th query, you have to determine whether the subarray c_{l_{i}}, c_{l_{i}+1}, ... , c_{r_{i}} is good. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains two integers n and q ( 1 <= n, q <= 3 cdot 10^5 ) -- the length of the array c and the number of queries. The second line of each test case contains n integers c_1, c_2, ... , c_n ( 1 <= c_i <= 10^9 ). Then q lines follow. The i -th of them contains two integers l_i and r_i ( 1 <= l_i <= r_i <= n ) -- the borders of the i -th subarray. Additional constraints on the input: the sum of n over all test cases does not exceed 3 cdot 10^5 ; the sum of q over all test cases does not exceed 3 cdot 10^5 . For each query, print YES if the subarray is good. Otherwise, print NO. You can output each letter of the answer in any case (upper or lower). For example, the strings yEs, yes, Yes, and YES will all be recognized as positive responses. '...

Tutorials

Educational Codeforces Round 162 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
247983222 Davidwang1024 C Feb. 23, 2024, 4:51 p.m. OK C# 10 TESTS 6 998 13107200
247979015 1435730 C Feb. 23, 2024, 4:36 p.m. OK GNU C11 TESTS 6 1403 3891200
247980103 SajibKC_19 C Feb. 23, 2024, 4:39 p.m. OK GNU C++17 TESTS 6 171 4812800
247981132 Nisikto C Feb. 23, 2024, 4:43 p.m. OK GNU C++17 TESTS 6 202 4812800
247985024 ssiddhesh64 C Feb. 23, 2024, 4:59 p.m. OK GNU C++17 TESTS 6 202 5632000
247980544 xsf111 C Feb. 23, 2024, 4:40 p.m. OK GNU C++17 TESTS 6 217 1024000
247982313 Vishak_Bhat C Feb. 23, 2024, 4:47 p.m. OK GNU C++17 TESTS 6 217 1024000
248042298 cbl1224 C Feb. 24, 2024, 4:36 a.m. OK GNU C++17 TESTS 7 217 4812800
247979142 DesLightYT C Feb. 23, 2024, 4:36 p.m. OK GNU C++17 TESTS 6 218 614400
247984972 prashanth_32 C Feb. 23, 2024, 4:59 p.m. OK GNU C++17 TESTS 6 218 1536000
248044514 alcorzb C Feb. 24, 2024, 5:04 a.m. OK GNU C++17 TESTS 7 218 12390400
247988216 karansrivastava C Feb. 23, 2024, 5:17 p.m. OK GNU C++17 TESTS 6 233 819200
247987494 tbcp C Feb. 23, 2024, 5:12 p.m. OK GNU C++17 (64) TESTS 6 139 1228800
247988195 Rabbi_hasan162 C Feb. 23, 2024, 5:16 p.m. OK GNU C++17 (64) TESTS 6 139 1228800
247983023 ymr_ymr_ C Feb. 23, 2024, 4:50 p.m. OK GNU C++17 (64) TESTS 6 139 5222400
247987805 yyppcc C Feb. 23, 2024, 5:14 p.m. OK GNU C++17 (64) TESTS 6 140 819200
247989911 argtarg C Feb. 23, 2024, 5:27 p.m. OK GNU C++17 (64) TESTS 6 140 819200
247988509 tbcp C Feb. 23, 2024, 5:18 p.m. OK GNU C++17 (64) TESTS 6 140 1228800
247982730 evilboy_ C Feb. 23, 2024, 4:49 p.m. OK GNU C++17 (64) TESTS 6 140 3584000
247980478 bladeabc C Feb. 23, 2024, 4:40 p.m. OK GNU C++17 (64) TESTS 6 140 4812800
247984081 HLJU_23_yangaobo C Feb. 23, 2024, 4:55 p.m. OK GNU C++17 (64) TESTS 6 140 24064000
247985633 Shamim97 C Feb. 23, 2024, 5:02 p.m. OK GNU C++17 (64) TESTS 6 140 99020800
247989666 Kirigakure_Saizo C Feb. 23, 2024, 5:26 p.m. OK GNU C++20 (64) TESTS 6 31 2048000
248032621 Kiffaz C Feb. 24, 2024, 1:54 a.m. OK GNU C++20 (64) TESTS 7 31 5120000
247979804 altqi C Feb. 23, 2024, 4:38 p.m. OK GNU C++20 (64) TESTS 6 93 819200
247990476 NtwoO C Feb. 23, 2024, 5:31 p.m. OK GNU C++20 (64) TESTS 6 108 819200
247989739 YolandaLi C Feb. 23, 2024, 5:26 p.m. OK GNU C++20 (64) TESTS 6 108 1024000
247991456 dj_khalid C Feb. 23, 2024, 5:37 p.m. OK GNU C++20 (64) TESTS 6 108 1228800
247986209 Ali_Azzam C Feb. 23, 2024, 5:05 p.m. OK GNU C++20 (64) TESTS 6 108 1228800
247981101 mojitos C Feb. 23, 2024, 4:43 p.m. OK GNU C++20 (64) TESTS 6 108 12083200
247984917 virinci C Feb. 23, 2024, 4:58 p.m. OK GNU C++20 (64) TESTS 6 109 409600
247984672 b_i_b C Feb. 23, 2024, 4:57 p.m. OK GNU C++20 (64) TESTS 6 109 614400
248030697 sugar2023 C Feb. 24, 2024, 1:07 a.m. OK Go TESTS 7 374 12083200
248040801 ajayg3059 C Feb. 24, 2024, 4:16 a.m. OK Go TESTS 7 405 16486400
248043888 _CHEEMS_ C Feb. 24, 2024, 4:57 a.m. OK Java 21 TESTS 7 311 0
248042351 amit_roy C Feb. 24, 2024, 4:37 a.m. OK Java 21 TESTS 7 311 14745600
247979418 priyaroy3370 C Feb. 23, 2024, 4:37 p.m. OK Java 21 TESTS 6 327 5324800
247984678 priyaroy3370 C Feb. 23, 2024, 4:57 p.m. OK Java 21 TESTS 6 358 6041600
247979940 Navdeep_joshi5 C Feb. 23, 2024, 4:38 p.m. OK Java 21 TESTS 6 389 102400
247990461 SweetAsCocaine C Feb. 23, 2024, 5:31 p.m. OK Java 21 TESTS 6 451 409600
247984754 daksh_02 C Feb. 23, 2024, 4:58 p.m. OK Java 21 TESTS 6 467 204800
247984340 dummypluser C Feb. 23, 2024, 4:56 p.m. OK Java 21 TESTS 6 467 204800
248044843 yang_wei C Feb. 24, 2024, 5:07 a.m. OK Java 21 TESTS 7 482 0
247989805 Nagendravarma C Feb. 23, 2024, 5:26 p.m. OK Java 21 TESTS 6 483 307200
247983468 qw_er__ty C Feb. 23, 2024, 4:52 p.m. OK Java 8 TESTS 6 249 0
248009846 chandu33 C Feb. 23, 2024, 7:50 p.m. OK Java 8 TESTS 7 280 17100800
247986212 kethan1081 C Feb. 23, 2024, 5:05 p.m. OK Java 8 TESTS 6 296 0
247993724 Yousef_Badr C Feb. 23, 2024, 5:52 p.m. OK Java 8 TESTS 7 311 14745600
248035254 alibaba C Feb. 24, 2024, 2:49 a.m. OK Java 8 TESTS 7 311 18739200
248003930 mada-mada C Feb. 23, 2024, 7:03 p.m. OK Java 8 TESTS 7 483 26316800
248014066 Sumitsingh7 C Feb. 23, 2024, 8:30 p.m. OK Java 8 TESTS 7 1903 7475200
248043033 Chandrakant2000 C Feb. 24, 2024, 4:46 a.m. OK Java 8 TESTS 7 2995 0
248016850 Crazy67 C Feb. 23, 2024, 9 p.m. OK Kotlin 1.9 TESTS 7 389 25702400
248023348 The_Gunner C Feb. 23, 2024, 10:29 p.m. OK Kotlin 1.9 TESTS 7 2573 36147200
247984990 Galina_Basalova C Feb. 23, 2024, 4:59 p.m. OK MS C++ 2017 TESTS 6 639 1228800
248019717 kaaamKaaaam C Feb. 23, 2024, 9:35 p.m. OK MS C++ 2017 TESTS 7 701 7168000
248037375 aluckyboy C Feb. 24, 2024, 3:24 a.m. OK MS C++ 2017 TESTS 7 733 7270400
248034834 dayaojing C Feb. 24, 2024, 2:41 a.m. OK MS C++ 2017 TESTS 7 1591 4812800
248005395 alle_bpy C Feb. 23, 2024, 7:14 p.m. OK MS C++ 2017 TESTS 7 1606 7168000
247978972 ahtoh_ C Feb. 23, 2024, 4:36 p.m. OK Node.js TESTS 6 685 81305600
248001168 maximzasorin C Feb. 23, 2024, 6:43 p.m. OK PHP TESTS 7 1169 79872000
247983527 Imeon C Feb. 23, 2024, 4:52 p.m. OK PyPy 3 TESTS 6 607 22323200
247982438 radhikapillai25 C Feb. 23, 2024, 4:48 p.m. OK PyPy 3 TESTS 6 608 21299200
247988969 gardengnome C Feb. 23, 2024, 5:21 p.m. OK PyPy 3-64 TESTS 6 249 16486400
247977729 proffgarryoak C Feb. 23, 2024, 4:33 p.m. OK PyPy 3-64 TESTS 6 264 14233600
247989951 gardengnome C Feb. 23, 2024, 5:27 p.m. OK PyPy 3-64 TESTS 6 265 16179200
248033467 yertugan06 C Feb. 24, 2024, 2:12 a.m. OK PyPy 3-64 TESTS 7 280 45363200
248010772 crux_024 C Feb. 23, 2024, 7:59 p.m. OK PyPy 3-64 TESTS 7 280 45568000
248007109 Ratery C Feb. 23, 2024, 7:27 p.m. OK PyPy 3-64 TESTS 7 295 45568000
248020838 Riladavin C Feb. 23, 2024, 9:50 p.m. OK PyPy 3-64 TESTS 7 311 45568000
248020886 Riladavin C Feb. 23, 2024, 9:50 p.m. OK PyPy 3-64 TESTS 7 311 46080000
248005081 logankeede C Feb. 23, 2024, 7:12 p.m. OK PyPy 3-64 TESTS 7 327 45568000
248021190 Riladavin C Feb. 23, 2024, 9:54 p.m. OK PyPy 3-64 TESTS 7 342 46080000
248026976 OLOGY C Feb. 23, 2024, 11:41 p.m. OK Python 2 TESTS 7 1029 60313600
248027229 OLOGY C Feb. 23, 2024, 11:46 p.m. OK Python 2 TESTS 7 1045 60313600
248007082 Ratery C Feb. 23, 2024, 7:27 p.m. OK Python 3 TESTS 7 639 39424000
247990043 Mahesh_4444 C Feb. 23, 2024, 5:28 p.m. OK Python 3 TESTS 6 872 11161600
247987108 AdityaVegad C Feb. 23, 2024, 5:10 p.m. OK Python 3 TESTS 6 873 10137600
247984129 Mahesh_4444 C Feb. 23, 2024, 4:55 p.m. OK Python 3 TESTS 6 1060 11161600
248001760 21r01a04m7 C Feb. 23, 2024, 6:47 p.m. OK Python 3 TESTS 7 1091 39424000
247996318 Wube C Feb. 23, 2024, 6:09 p.m. OK Python 3 TESTS 7 1169 76288000
247996119 Wube C Feb. 23, 2024, 6:08 p.m. OK Python 3 TESTS 7 1185 76288000
247981360 pushpa2.0 C Feb. 23, 2024, 4:44 p.m. OK Python 3 TESTS 6 1372 19251200
248025460 Fourty_Seven C Feb. 23, 2024, 11:10 p.m. OK Python 3 TESTS 7 1418 76902400
248045012 mukundjha C Feb. 24, 2024, 5:09 a.m. OK Python 3 TESTS 7 1575 80793600
248009396 r3kste C Feb. 23, 2024, 7:46 p.m. OK Rust 2021 TESTS 7 61 6041600
248006370 vstiff C Feb. 23, 2024, 7:21 p.m. OK Rust 2021 TESTS 7 109 16793600

remove filters

Back to search problems