Codeforces Round 813 (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
1712 Codeforces Round 813 (Div. 2) FINISHED False 8100 71421899 Aug. 13, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19937 ) C Sort Zero PROGRAMMING greedy sortings two pointers

B'You are given an array of n positive integers a_1,a_2, ldots,a_n . In one operation you do the following: Find the minimum number of operations required to sort the array in non-decreasing order. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). Description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ). The second line of each test case contains n positive integers a_1,a_2, ldots,a_n ( 1 <= a_i <= n ). It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case print one integer -- the minimum number of operations required to sort the array in non-decreasing order. In the first test case, you can choose x = 3 for the operation, the resulting array is [0, 0, 2] . In the second test case, you can choose x = 1 for the first operation and x = 3 for the second operation, the resulting array is [0, 0, 0, 0] . '...

Tutorials

Codeforces Round #813 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
168196867 prj11137 C Aug. 13, 2022, 7:39 p.m. OK GNU C11 TESTS 37 77 819200
168215541 TheGoood C Aug. 14, 2022, 2:07 a.m. OK GNU C++14 TESTS 38 31 512000
168213840 2011qiqi C Aug. 14, 2022, 1:28 a.m. OK GNU C++14 TESTS 37 31 819200
168174170 JatNad C Aug. 13, 2022, 4:38 p.m. OK GNU C++14 TESTS 37 31 819200
168219675 MingYue.wwy C Aug. 14, 2022, 3:32 a.m. OK GNU C++14 TESTS 38 31 819200
168171752 gsomani C Aug. 13, 2022, 4:31 p.m. OK GNU C++14 TESTS 37 31 1536000
168216123 lemon_one C Aug. 14, 2022, 2:19 a.m. OK GNU C++14 TESTS 38 31 1638400
168219658 AIM-9M C Aug. 14, 2022, 3:32 a.m. OK GNU C++14 TESTS 38 31 1638400
168214327 Reisen_ C Aug. 14, 2022, 1:40 a.m. OK GNU C++14 TESTS 37 31 4505600
168215519 sunchaoyi C Aug. 14, 2022, 2:06 a.m. OK GNU C++14 TESTS 38 46 512000
168220033 ArshAgl C Aug. 14, 2022, 3:38 a.m. OK GNU C++14 TESTS 38 46 512000
168186685 sandry24 C Aug. 13, 2022, 6:06 p.m. OK GNU C++17 TESTS 37 31 409600
168221178 deities C Aug. 14, 2022, 4:01 a.m. OK GNU C++17 TESTS 38 31 819200
168212472 Pcjmy C Aug. 14, 2022, 12:55 a.m. OK GNU C++17 TESTS 37 31 819200
168222371 yytyytyyt C Aug. 14, 2022, 4:22 a.m. OK GNU C++17 TESTS 38 31 819200
168192650 Aditya_871 C Aug. 13, 2022, 6:56 p.m. OK GNU C++17 TESTS 37 31 921600
168191875 Mihai999 C Aug. 13, 2022, 6:49 p.m. OK GNU C++17 TESTS 37 31 921600
168185269 Myp001 C Aug. 13, 2022, 5:56 p.m. OK GNU C++17 TESTS 37 31 921600
168208567 saelcc03 C Aug. 13, 2022, 11 p.m. OK GNU C++17 TESTS 37 31 921600
168181034 Kilo_5723 C Aug. 13, 2022, 5:31 p.m. OK GNU C++17 TESTS 37 31 1228800
168202792 AlexanderL C Aug. 13, 2022, 9:02 p.m. OK GNU C++17 TESTS 37 31 1536000
168189209 Bullet C Aug. 13, 2022, 6:25 p.m. OK GNU C++17 (64) TESTS 37 31 819200
168196263 Xc4l16r3 C Aug. 13, 2022, 7:33 p.m. OK GNU C++17 (64) TESTS 37 31 1228800
168224042 XHYU61 C Aug. 14, 2022, 4:53 a.m. OK GNU C++17 (64) TESTS 40 31 1638400
168222982 OTTFF C Aug. 14, 2022, 4:33 a.m. OK GNU C++17 (64) TESTS 38 31 1638400
168208639 HitmanX97 C Aug. 13, 2022, 11:02 p.m. OK GNU C++17 (64) TESTS 37 31 5222400
168190668 hara_1999 C Aug. 13, 2022, 6:39 p.m. OK GNU C++17 (64) TESTS 37 31 5222400
168228052 Ahnaf_ C Aug. 14, 2022, 5:52 a.m. OK GNU C++17 (64) TESTS 40 31 5427200
168183828 EE97 C Aug. 13, 2022, 5:46 p.m. OK GNU C++17 (64) TESTS 37 31 5734400
168211393 TrendBattles C Aug. 14, 2022, 12:24 a.m. OK GNU C++17 (64) TESTS 37 46 819200
168177250 iRed3y C Aug. 13, 2022, 4:47 p.m. OK GNU C++17 (64) TESTS 37 46 921600
168206383 sreeshmaheshwar C Aug. 13, 2022, 10:07 p.m. OK GNU C++20 (64) TESTS 37 31 409600
168182206 Siddharth2EEE C Aug. 13, 2022, 5:36 p.m. OK GNU C++20 (64) TESTS 37 31 409600
168181835 AnonymousGuy12 C Aug. 13, 2022, 5:34 p.m. OK GNU C++20 (64) TESTS 37 31 409600
168205371 sreeshmaheshwar C Aug. 13, 2022, 9:48 p.m. OK GNU C++20 (64) TESTS 37 31 409600
168221919 tyler C Aug. 14, 2022, 4:14 a.m. OK GNU C++20 (64) TESTS 38 31 409600
168217785 Prgl2001 C Aug. 14, 2022, 2:54 a.m. OK GNU C++20 (64) TESTS 38 31 512000
168218341 Githm C Aug. 14, 2022, 3:06 a.m. OK GNU C++20 (64) TESTS 38 31 819200
168215816 Shahed_955 C Aug. 14, 2022, 2:12 a.m. OK GNU C++20 (64) TESTS 38 31 819200
168210428 NourElleithy C Aug. 13, 2022, 11:53 p.m. OK GNU C++20 (64) TESTS 37 31 819200
168227062 Deepanshu_B C Aug. 14, 2022, 5:40 a.m. OK GNU C++20 (64) TESTS 40 31 819200
168177180 huxulm C Aug. 13, 2022, 4:47 p.m. OK Go TESTS 37 93 5939200
168214580 aditya2024 C Aug. 14, 2022, 1:47 a.m. OK Java 11 TESTS 37 218 2867200
168219528 mk_0380 C Aug. 14, 2022, 3:30 a.m. OK Java 11 TESTS 38 218 3481600
168189114 themadknight45 C Aug. 13, 2022, 6:24 p.m. OK Java 11 TESTS 37 218 3686400
168197799 Srisaivamshi C Aug. 13, 2022, 7:51 p.m. OK Java 11 TESTS 37 249 3686400
168182104 gurkaran_s C Aug. 13, 2022, 5:36 p.m. OK Java 11 TESTS 37 249 4096000
168225840 sf14t C Aug. 14, 2022, 5:21 a.m. OK Java 11 TESTS 40 265 3379200
168209201 newguy1 C Aug. 13, 2022, 11:19 p.m. OK Java 11 TESTS 37 265 9932800
168188832 mcrash12 C Aug. 13, 2022, 6:22 p.m. OK Java 11 TESTS 37 280 2048000
168206199 yudi23 C Aug. 13, 2022, 10:03 p.m. OK Java 11 TESTS 37 280 4198400
168198123 Srisaivamshi C Aug. 13, 2022, 7:55 p.m. OK Java 11 TESTS 37 280 10956800
168205094 harman1148 C Aug. 13, 2022, 9:42 p.m. OK Java 17 TESTS 37 265 4300800
168228246 bkifhr10 C Aug. 14, 2022, 5:55 a.m. OK Java 17 TESTS 40 311 11161600
168220660 agarwalmanas212001 C Aug. 14, 2022, 3:50 a.m. OK Java 17 TESTS 38 327 11468800
168206041 hsnalshrawyly56 C Aug. 13, 2022, 9:59 p.m. OK Java 17 TESTS 37 389 7475200
168205773 Donatello2024 C Aug. 13, 2022, 9:55 p.m. OK Java 17 TESTS 37 405 6860800
168205937 hsnalshrawyly56 C Aug. 13, 2022, 9:58 p.m. OK Java 17 TESTS 37 436 7782400
168205655 Donatello2024 C Aug. 13, 2022, 9:53 p.m. OK Java 17 TESTS 37 452 7270400
168175012 sailesh25 C Aug. 13, 2022, 4:41 p.m. OK Java 17 TESTS 37 467 6144000
168177646 CharonXin C Aug. 13, 2022, 4:48 p.m. OK Java 17 TESTS 37 483 19558400
168199242 Rayhan_ChowdhuRy C Aug. 13, 2022, 8:09 p.m. OK Java 8 TESTS 37 109 0
168188216 Swapniltri C Aug. 13, 2022, 6:18 p.m. OK Java 8 TESTS 37 140 0
168226157 Kalesh C Aug. 14, 2022, 5:26 a.m. OK Java 8 TESTS 40 155 6144000
168192273 ved20 C Aug. 13, 2022, 6:53 p.m. OK Java 8 TESTS 37 170 6348800
168192858 Sussykin C Aug. 13, 2022, 6:58 p.m. OK Java 8 TESTS 37 171 0
168181541 Diaa12360 C Aug. 13, 2022, 5:33 p.m. OK Java 8 TESTS 37 171 4198400
168192264 Mohamed308 C Aug. 13, 2022, 6:53 p.m. OK Java 8 TESTS 37 171 4812800
168202563 Mohamed308 C Aug. 13, 2022, 8:58 p.m. OK Java 8 TESTS 37 171 5632000
168182380 ahmedTarek28 C Aug. 13, 2022, 5:37 p.m. OK Java 8 TESTS 37 171 6041600
168175478 ahmedTarek28 C Aug. 13, 2022, 4:42 p.m. OK Java 8 TESTS 37 171 6041600
168181397 Galina_Basalova C Aug. 13, 2022, 5:32 p.m. OK MS C++ 2017 TESTS 37 109 3891200
168205880 k4Jl1Zp0pbl C Aug. 13, 2022, 9:57 p.m. OK MS C++ 2017 TESTS 37 124 4096000
168174315 SahajTC C Aug. 13, 2022, 4:39 p.m. OK MS C++ 2017 TESTS 37 124 4096000
168172648 cz_itsme C Aug. 13, 2022, 4:34 p.m. OK MS C++ 2017 TESTS 37 124 8396800
168176027 AbdelkareemEmara C Aug. 13, 2022, 4:44 p.m. OK MS C++ 2017 TESTS 37 140 6144000
168203299 Crimson_Quasar C Aug. 13, 2022, 9:11 p.m. OK MS C++ 2017 TESTS 37 202 819200
168184847 aki79 C Aug. 13, 2022, 5:53 p.m. OK PHP TESTS 37 93 46182400
168182412 1_2_3_4_5_9 C Aug. 13, 2022, 5:37 p.m. OK PyPy 2 TESTS 37 171 12492800
168223443 gsaar C Aug. 14, 2022, 4:42 a.m. OK PyPy 3 TESTS 39 171 12390400
168208191 voicon C Aug. 13, 2022, 10:51 p.m. OK PyPy 3 TESTS 37 186 10649600
168186460 sami02jain C Aug. 13, 2022, 6:04 p.m. OK PyPy 3 TESTS 37 187 16896000
168190851 macdod C Aug. 13, 2022, 6:40 p.m. OK PyPy 3 TESTS 37 358 11161600
168176039 slovenberg C Aug. 13, 2022, 4:44 p.m. OK PyPy 3 TESTS 37 436 11776000
168200550 Su_123 C Aug. 13, 2022, 8:27 p.m. OK PyPy 3 TESTS 37 436 15052800
168198115 divyamkakkar24 C Aug. 13, 2022, 7:55 p.m. OK PyPy 3 TESTS 37 436 17305600
168201790 Su_123 C Aug. 13, 2022, 8:46 p.m. OK PyPy 3 TESTS 37 482 15564800
168172923 Su_123 C Aug. 13, 2022, 4:35 p.m. OK PyPy 3 TESTS 37 483 13516800
168174742 andriy.borzenkov C Aug. 13, 2022, 4:40 p.m. OK PyPy 3 TESTS 37 623 13004800
168184158 minta911 C Aug. 13, 2022, 5:48 p.m. OK PyPy 3-64 TESTS 37 108 18636800
168193004 jhilary C Aug. 13, 2022, 6:59 p.m. OK PyPy 3-64 TESTS 37 108 18841600
168207769 BeBeBe66666 C Aug. 13, 2022, 10:41 p.m. OK PyPy 3-64 TESTS 37 139 18841600
168198853 gesuta C Aug. 13, 2022, 8:04 p.m. OK PyPy 3-64 TESTS 37 140 17920000
168192593 OGgyR C Aug. 13, 2022, 6:56 p.m. OK PyPy 3-64 TESTS 37 140 19660800
168193993 mohanned_war C Aug. 13, 2022, 7:08 p.m. OK PyPy 3-64 TESTS 37 155 19558400
168196987 rivnam C Aug. 13, 2022, 7:41 p.m. OK PyPy 3-64 TESTS 37 155 20889600
168189099 Yusif C Aug. 13, 2022, 6:24 p.m. OK PyPy 3-64 TESTS 37 171 12595200
168182224 gesuta C Aug. 13, 2022, 5:36 p.m. OK PyPy 3-64 TESTS 37 171 18432000
168185131 SangeetaSingh C Aug. 13, 2022, 5:55 p.m. OK PyPy 3-64 TESTS 37 217 19046400
168191675 sshinohs C Aug. 13, 2022, 6:48 p.m. OK Python 3 TESTS 37 109 8294400
168181516 H_Raja C Aug. 13, 2022, 5:33 p.m. OK Python 3 TESTS 37 124 7065600
168174263 Tronnert C Aug. 13, 2022, 4:38 p.m. OK Python 3 TESTS 37 124 8396800
168198269 0.00 C Aug. 13, 2022, 7:57 p.m. OK Python 3 TESTS 37 170 9625600
168196329 Dhruv_Viradiya C Aug. 13, 2022, 7:33 p.m. OK Python 3 TESTS 37 171 7270400
168215462 Uruguay C Aug. 14, 2022, 2:05 a.m. OK Python 3 TESTS 38 186 7270400
168218946 shivesh_21 C Aug. 14, 2022, 3:18 a.m. OK Python 3 TESTS 38 187 7065600
168216113 n5rut0 C Aug. 14, 2022, 2:18 a.m. OK Python 3 TESTS 38 187 11468800
168202670 wanzhou C Aug. 13, 2022, 8:59 p.m. OK Python 3 TESTS 37 202 7065600
168221235 nurm22r C Aug. 14, 2022, 4:02 a.m. OK Python 3 TESTS 38 202 7270400
168195765 kena0ki C Aug. 13, 2022, 7:27 p.m. OK Rust 2021 TESTS 37 31 3174400
168176771 cod1r C Aug. 13, 2022, 4:46 p.m. OK Rust 2021 TESTS 37 108 8089600

remove filters

Back to search problems