Codeforces Round 825 (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
1736 Codeforces Round 825 (Div. 2) FINISHED False 7200 71767463 Oct. 10, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15361 ) C1 Good Subarrays (Easy Version) PROGRAMMING binary search data structures two pointers

B'This is the easy version of this problem. In this version, we do not have queries. Note that we have multiple test cases in this version. You can make hacks only if both versions of the problem are solved. An array b of length m is good if for all i the i -th element is greater than or equal to i . In other words, b is good if and only if b_i geq i for all i ( 1 <= q i <= q m ). You are given an array a consisting of n positive integers. Find the number of pairs of indices (l, r) , where 1 <= l <= r <= n , such that the array [a_l, a_{l+1}, ldots, a_r] is good. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= q t <= q 2 cdot 10^5 ). Description of the test cases follows. The first line of each test case contains an integer n ( 1 <= q n <= q 2 cdot 10^5 ), the length of the array a . The second line of each test case contains n space-separated integers a_1,a_2, ldots,a_n ( 1 <= q a_i <= q n ), representing the 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, print the number of suitable pairs of indices. In the first test case, all subarrays of a are good, so all pairs are suitable. In the second test case, the pairs (1, 1) , (2, 2) , and (3, 3) are suitable. For example, when (l, r) = (1, 2) , the array b=[1,1] is not good because b_2 < 2 . '...

Tutorials

Codeforces Round #825 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
175491472 chrisfcoder C1 Oct. 11, 2022, 2:38 a.m. OK C# 10 TESTS 12 124 13619200
175490756 lm666 C1 Oct. 11, 2022, 2:25 a.m. OK Clang++17 Diagnostics TESTS 12 374 1843200
175447811 1435730 C1 Oct. 10, 2022, 5:26 p.m. OK GNU C11 TESTS 11 62 819200
175493256 stozn C1 Oct. 11, 2022, 3:11 a.m. OK GNU C11 TESTS 12 390 819200
175493320 stozn C1 Oct. 11, 2022, 3:12 a.m. OK GNU C11 TESTS 12 390 819200
175493531 stozn C1 Oct. 11, 2022, 3:16 a.m. OK GNU C11 TESTS 12 405 819200
175491068 stozn C1 Oct. 11, 2022, 2:31 a.m. OK GNU C11 TESTS 12 405 819200
175493395 stozn C1 Oct. 11, 2022, 3:13 a.m. OK GNU C11 TESTS 12 405 819200
175491730 stozn C1 Oct. 11, 2022, 2:43 a.m. OK GNU C11 TESTS 12 405 1638400
175492940 stozn C1 Oct. 11, 2022, 3:05 a.m. OK GNU C11 TESTS 12 421 819200
175492200 ankur1 C1 Oct. 11, 2022, 2:51 a.m. OK GNU C++14 TESTS 12 46 0
175498155 huangxinting666 C1 Oct. 11, 2022, 4:40 a.m. OK GNU C++14 TESTS 12 46 0
175463946 player4life C1 Oct. 10, 2022, 8:14 p.m. OK GNU C++14 TESTS 11 46 819200
175487777 abibats_qwq C1 Oct. 11, 2022, 1:23 a.m. OK GNU C++14 TESTS 11 46 819200
175488707 omeganot C1 Oct. 11, 2022, 1:43 a.m. OK GNU C++14 TESTS 12 46 819200
175492330 unbecoming C1 Oct. 11, 2022, 2:54 a.m. OK GNU C++14 TESTS 12 46 819200
175481131 Ahmad-Magdy C1 Oct. 10, 2022, 10:01 p.m. OK GNU C++14 TESTS 11 46 819200
175480173 vyshnavchayi C1 Oct. 10, 2022, 9:40 p.m. OK GNU C++14 TESTS 11 46 819200
175486811 babinh372006 C1 Oct. 11, 2022, 12:59 a.m. OK GNU C++14 TESTS 11 46 819200
175495999 winterrr C1 Oct. 11, 2022, 4:04 a.m. OK GNU C++14 TESTS 12 46 819200
175504406 Bobocan C1 Oct. 11, 2022, 6:03 a.m. OK GNU C++17 TESTS 12 15 1331200
175495786 _ZJC C1 Oct. 11, 2022, 3:59 a.m. OK GNU C++17 TESTS 12 46 0
175453313 3aarongan C1 Oct. 10, 2022, 6:10 p.m. OK GNU C++17 TESTS 11 46 0
175451967 CrazyCoder00 C1 Oct. 10, 2022, 5:59 p.m. OK GNU C++17 TESTS 11 46 0
175449603 Nishant777 C1 Oct. 10, 2022, 5:39 p.m. OK GNU C++17 TESTS 11 46 0
175449330 D4nnyLee C1 Oct. 10, 2022, 5:37 p.m. OK GNU C++17 TESTS 11 46 0
175448816 D4nnyLee C1 Oct. 10, 2022, 5:33 p.m. OK GNU C++17 TESTS 11 46 0
175502871 abhinavpandeyjee C1 Oct. 11, 2022, 5:45 a.m. OK GNU C++17 TESTS 12 46 819200
175498956 sheismyfream C1 Oct. 11, 2022, 4:52 a.m. OK GNU C++17 TESTS 12 46 819200
175500412 Tszicu C1 Oct. 11, 2022, 5:13 a.m. OK GNU C++17 TESTS 12 46 819200
175491882 Adham_Ali C1 Oct. 11, 2022, 2:45 a.m. OK GNU C++17 (64) TESTS 12 31 0
175489807 donald_duck123 C1 Oct. 11, 2022, 2:08 a.m. OK GNU C++17 (64) TESTS 12 31 716800
175452117 anjaan__ C1 Oct. 10, 2022, 6 p.m. OK GNU C++17 (64) TESTS 11 31 819200
175484569 rniya C1 Oct. 10, 2022, 11:52 p.m. OK GNU C++17 (64) TESTS 11 31 819200
175437357 sandoval C1 Oct. 10, 2022, 4:22 p.m. OK GNU C++17 (64) TESTS 11 31 819200
175436092 why_so_nooooob C1 Oct. 10, 2022, 4:19 p.m. OK GNU C++17 (64) TESTS 11 31 819200
175467407 bhatta.subhro C1 Oct. 10, 2022, 9:12 p.m. OK GNU C++17 (64) TESTS 11 31 819200
175489172 izumiQR C1 Oct. 11, 2022, 1:54 a.m. OK GNU C++17 (64) TESTS 12 31 1638400
175482388 1potato2potato C1 Oct. 10, 2022, 10:35 p.m. OK GNU C++17 (64) TESTS 11 31 1638400
175467851 camc C1 Oct. 10, 2022, 9:21 p.m. OK GNU C++17 (64) TESTS 11 31 1638400
175439652 TheLost C1 Oct. 10, 2022, 4:27 p.m. OK GNU C++20 (64) TESTS 11 15 1024000
175436681 Morley C1 Oct. 10, 2022, 4:20 p.m. OK GNU C++20 (64) TESTS 11 15 1638400
175451721 FelixArg C1 Oct. 10, 2022, 5:57 p.m. OK GNU C++20 (64) TESTS 11 30 819200
175484664 Nairy_a30 C1 Oct. 10, 2022, 11:55 p.m. OK GNU C++20 (64) TESTS 11 31 0
175457625 Mo.Ibrahim C1 Oct. 10, 2022, 6:53 p.m. OK GNU C++20 (64) TESTS 11 31 0
175494921 fishcathu. C1 Oct. 11, 2022, 3:42 a.m. OK GNU C++20 (64) TESTS 12 31 0
175494846 fishcathu. C1 Oct. 11, 2022, 3:40 a.m. OK GNU C++20 (64) TESTS 12 31 0
175437159 SGRomemi C1 Oct. 10, 2022, 4:21 p.m. OK GNU C++20 (64) TESTS 11 31 0
175459598 s3n C1 Oct. 10, 2022, 7:17 p.m. OK GNU C++20 (64) TESTS 11 31 0
175504468 Eslam030915 C1 Oct. 11, 2022, 6:04 a.m. OK GNU C++20 (64) TESTS 12 31 819200
175440324 koqo C1 Oct. 10, 2022, 4:28 p.m. OK Go TESTS 11 108 2969600
175491694 ac-qyd C1 Oct. 11, 2022, 2:42 a.m. OK Go TESTS 12 295 4505600
175456443 jyoti360 C1 Oct. 10, 2022, 6:40 p.m. OK Java 11 TESTS 11 171 0
175447514 Spidey2182 C1 Oct. 10, 2022, 5:24 p.m. OK Java 11 TESTS 11 171 0
175491601 oneafter C1 Oct. 11, 2022, 2:41 a.m. OK Java 11 TESTS 12 187 0
175497837 __Serendipity C1 Oct. 11, 2022, 4:35 a.m. OK Java 11 TESTS 12 187 0
175449257 kb_0311 C1 Oct. 10, 2022, 5:36 p.m. OK Java 11 TESTS 11 202 2150400
175439816 mareshkau C1 Oct. 10, 2022, 4:27 p.m. OK Java 11 TESTS 11 217 0
175492747 oneafter C1 Oct. 11, 2022, 3:02 a.m. OK Java 11 TESTS 12 218 0
175447733 dpsn743 C1 Oct. 10, 2022, 5:25 p.m. OK Java 11 TESTS 11 218 0
175438802 harsh_gupta_1705 C1 Oct. 10, 2022, 4:25 p.m. OK Java 11 TESTS 11 218 0
175459516 ETHANHUNTMI5 C1 Oct. 10, 2022, 7:16 p.m. OK Java 11 TESTS 11 233 0
175442812 tony4875 C1 Oct. 10, 2022, 4:34 p.m. OK Java 17 TESTS 11 218 0
175438954 freakin23 C1 Oct. 10, 2022, 4:25 p.m. OK Java 17 TESTS 11 218 204800
175442806 Huybq26 C1 Oct. 10, 2022, 4:34 p.m. OK Java 17 TESTS 11 265 204800
175464939 Kedrigern C1 Oct. 10, 2022, 8:30 p.m. OK Java 17 TESTS 11 327 17203200
175441467 shubhanshu_jha14 C1 Oct. 10, 2022, 4:31 p.m. OK Java 17 TESTS 11 389 10137600
175495932 abdulazizms C1 Oct. 11, 2022, 4:02 a.m. OK Java 17 TESTS 12 483 8601600
175497241 cute_bei C1 Oct. 11, 2022, 4:25 a.m. OK Java 17 TESTS 12 701 307200
175492104 cftauros C1 Oct. 11, 2022, 2:49 a.m. OK Java 8 TESTS 12 93 0
175439725 Diaa12360 C1 Oct. 10, 2022, 4:27 p.m. OK Java 8 TESTS 11 124 0
175458798 Unrated_Pritam C1 Oct. 10, 2022, 7:07 p.m. OK Java 8 TESTS 11 124 1843200
175501552 frey4 C1 Oct. 11, 2022, 5:28 a.m. OK Java 8 TESTS 12 124 1843200
175440102 Eslam_Ahmed C1 Oct. 10, 2022, 4:28 p.m. OK Java 8 TESTS 11 139 1843200
175436551 cftauros C1 Oct. 10, 2022, 4:20 p.m. OK Java 8 TESTS 11 140 0
175455700 Kaldaruly C1 Oct. 10, 2022, 6:32 p.m. OK Java 8 TESTS 11 140 1843200
175447700 Parimal C1 Oct. 10, 2022, 5:25 p.m. OK Java 8 TESTS 11 155 1843200
175437853 Unrated_Pritam C1 Oct. 10, 2022, 4:23 p.m. OK Java 8 TESTS 11 155 1843200
175459241 malekelkassas C1 Oct. 10, 2022, 7:12 p.m. OK Java 8 TESTS 11 155 12492800
175437540 Bloodwyn C1 Oct. 10, 2022, 4:22 p.m. OK Kotlin 1.6 TESTS 11 296 14540800
175503848 liaopengfei C1 Oct. 11, 2022, 5:56 a.m. OK MS C++ 2017 TESTS 12 62 819200
175488877 hiro220214 C1 Oct. 11, 2022, 1:47 a.m. OK MS C++ 2017 TESTS 12 62 819200
175483510 tjdvyzl12345 C1 Oct. 10, 2022, 11:15 p.m. OK MS C++ 2017 TESTS 11 140 1638400
175442740 sam_petux C1 Oct. 10, 2022, 4:33 p.m. OK MS C++ 2017 TESTS 11 171 0
175488467 tjdvyzl12345 C1 Oct. 11, 2022, 1:38 a.m. OK MS C++ 2017 TESTS 12 420 1638400
175488407 tjdvyzl12345 C1 Oct. 11, 2022, 1:36 a.m. OK MS C++ 2017 TESTS 12 436 1638400
175491855 kun2605879979 C1 Oct. 11, 2022, 2:45 a.m. OK MS C++ 2017 TESTS 12 436 16076800
175467123 DavitMarg C1 Oct. 10, 2022, 9:06 p.m. OK MS C++ 2017 TESTS 11 967 10035200
175484760 turz0ahsan C1 Oct. 10, 2022, 11:58 p.m. OK Node.js TESTS 11 171 13619200
175458416 phantomxxx C1 Oct. 10, 2022, 7:02 p.m. OK PyPy 3 TESTS 11 140 15257600
175490485 rummansadik C1 Oct. 11, 2022, 2:20 a.m. OK PyPy 3 TESTS 12 155 15155200
175492137 Yash_Nandwana C1 Oct. 11, 2022, 2:50 a.m. OK PyPy 3 TESTS 12 187 19251200
175467439 Abdalkhalig C1 Oct. 10, 2022, 9:13 p.m. OK PyPy 3 TESTS 11 202 13516800
175463128 macieekk C1 Oct. 10, 2022, 8:02 p.m. OK PyPy 3 TESTS 11 218 14950400
175504294 0x7f_ C1 Oct. 11, 2022, 6:02 a.m. OK PyPy 3 TESTS 12 248 19251200
175438039 Apass.Jack C1 Oct. 10, 2022, 4:23 p.m. OK PyPy 3 TESTS 11 311 17510400
175463472 jplassmann C1 Oct. 10, 2022, 8:07 p.m. OK PyPy 3 TESTS 11 327 14848000
175441739 yazan_sh21 C1 Oct. 10, 2022, 4:31 p.m. OK PyPy 3 TESTS 11 342 13414400
175436850 supermiron C1 Oct. 10, 2022, 4:21 p.m. OK PyPy 3 TESTS 11 343 13516800
175449527 mrdhnv C1 Oct. 10, 2022, 5:38 p.m. OK PyPy 3-64 TESTS 11 93 17408000
175447338 ketanraut88 C1 Oct. 10, 2022, 5:23 p.m. OK PyPy 3-64 TESTS 11 108 19865600
175462391 hvbird C1 Oct. 10, 2022, 7:52 p.m. OK PyPy 3-64 TESTS 11 108 22118400
175464938 Aksnov C1 Oct. 10, 2022, 8:30 p.m. OK PyPy 3-64 TESTS 11 108 23040000
175451601 ketanraut88 C1 Oct. 10, 2022, 5:56 p.m. OK PyPy 3-64 TESTS 11 109 19968000
175462569 gesuta C1 Oct. 10, 2022, 7:55 p.m. OK PyPy 3-64 TESTS 11 109 20172800
175462861 ahmedsiad C1 Oct. 10, 2022, 7:58 p.m. OK PyPy 3-64 TESTS 11 109 23244800
175482109 biglunchdude C1 Oct. 10, 2022, 10:27 p.m. OK PyPy 3-64 TESTS 11 124 25190400
175498809 griffindor C1 Oct. 11, 2022, 4:50 a.m. OK PyPy 3-64 TESTS 12 139 20582400
175494081 InariInDream C1 Oct. 11, 2022, 3:26 a.m. OK PyPy 3-64 TESTS 12 139 23040000
175455287 dddscript C1 Oct. 10, 2022, 6:29 p.m. OK Python 3 TESTS 11 155 14028800
175438243 Shubham_2709 C1 Oct. 10, 2022, 4:24 p.m. OK Python 3 TESTS 11 186 13824000
175451818 Karcher C1 Oct. 10, 2022, 5:58 p.m. OK Python 3 TESTS 11 187 13414400
175462773 ankit_xyz C1 Oct. 10, 2022, 7:57 p.m. OK Python 3 TESTS 11 202 13824000
175442053 Ray_29 C1 Oct. 10, 2022, 4:32 p.m. OK Python 3 TESTS 11 217 13414400
175452401 brutaembo C1 Oct. 10, 2022, 6:03 p.m. OK Python 3 TESTS 11 218 13414400
175449162 Dinesh_devanaboina C1 Oct. 10, 2022, 5:35 p.m. OK Python 3 TESTS 11 218 13414400
175441662 IronMan_P0 C1 Oct. 10, 2022, 4:31 p.m. OK Python 3 TESTS 11 218 13414400
175453544 alaa81313 C1 Oct. 10, 2022, 6:12 p.m. OK Python 3 TESTS 11 218 13824000
175456291 curious600171 C1 Oct. 10, 2022, 6:38 p.m. OK Python 3 TESTS 11 233 13824000

remove filters

Back to search problems