Codeforces Round 901 (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
1875 Codeforces Round 901 (Div. 2) FINISHED False 10800 41095463 Sept. 30, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9242 ) D Jellyfish and Mex PROGRAMMING dp

B'You are given an array of n nonnegative integers a_1, a_2, ... , a_n . Let m be a variable that is initialized to 0 , Jellyfish will perform the following operation n times: Now Jellyfish wants to know the minimum possible final value of m if he performs all the operations optimally. ^{ dagger} The MEX (minimum excluded) of an array is the smallest non-negative integer that does not belong to the array. For instance: Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= q t <= q 5000 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= q n <= q 5000 ) -- the size of the array. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 0 <= q a_i <= q 10^9 ) -- the integers in the array. It is guaranteed that the sum of n over all test cases does not exceed 5000 . For each test case, output a single integer -- the minimum value of m if the operations are performed optimally. In the first test case, we delete elements from a in the following order: [5,2, color{red}{1},0,3,0,4,0] to [5,2,0,3, color{red}{0},4,0] to [5,2, color{red}{0},3,4,0] to [5,2,3,4, color{red}{0}] to [5,2, color{red}{3},4] to [ color{red}{5},2,4] to [ color{red}{2},4] to [ color{red}{4}] to [~] . The value of m will be 1+1+1+0+0+0+0+0=3 . '...

Tutorials

Codeforces Round 901 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
226097073 UPC.LJW D Oct. 1, 2023, 2:14 a.m. OK GNU C++14 TESTS 20 15 0
226054314 sebma D Sept. 30, 2023, 5:13 p.m. OK GNU C++14 TESTS 20 15 0
226107362 18612631378 D Oct. 1, 2023, 4:47 a.m. OK GNU C++14 TESTS 20 15 102400
226104393 InvisibleX D Oct. 1, 2023, 4:06 a.m. OK GNU C++14 TESTS 20 15 102400
226099666 Leonador D Oct. 1, 2023, 2:57 a.m. OK GNU C++14 TESTS 20 15 102400
226099119 lopzith D Oct. 1, 2023, 2:47 a.m. OK GNU C++14 TESTS 20 15 102400
226092455 lishan4688 D Oct. 1, 2023, 12:33 a.m. OK GNU C++14 TESTS 20 15 102400
226092363 chenjunxiu D Oct. 1, 2023, 12:30 a.m. OK GNU C++14 TESTS 20 15 102400
226096249 why_123 D Oct. 1, 2023, 1:59 a.m. OK GNU C++14 TESTS 20 15 204800
226090590 11d10xy D Sept. 30, 2023, 11:35 p.m. OK GNU C++14 TESTS 20 15 1228800
226108858 SundryVictory D Oct. 1, 2023, 5:06 a.m. OK GNU C++17 TESTS 20 15 102400
226097677 ILovveyyou D Oct. 1, 2023, 2:24 a.m. OK GNU C++17 TESTS 20 15 102400
226089899 lxyb D Sept. 30, 2023, 11:17 p.m. OK GNU C++17 TESTS 20 15 102400
226076327 HowMoring D Sept. 30, 2023, 7:33 p.m. OK GNU C++17 TESTS 20 15 102400
226068111 Piwry D Sept. 30, 2023, 6:28 p.m. OK GNU C++17 TESTS 20 15 102400
226067572 iridescent_black D Sept. 30, 2023, 6:26 p.m. OK GNU C++17 TESTS 20 15 102400
226060540 caoxinyang D Sept. 30, 2023, 5:29 p.m. OK GNU C++17 TESTS 20 15 102400
226059681 Romiros D Sept. 30, 2023, 5:27 p.m. OK GNU C++17 TESTS 20 15 102400
226058546 2005zhw D Sept. 30, 2023, 5:24 p.m. OK GNU C++17 TESTS 20 15 102400
226084568 DobromirAngelov D Sept. 30, 2023, 9:17 p.m. OK GNU C++17 TESTS 20 15 204800
226108624 fairy_land D Oct. 1, 2023, 5:03 a.m. OK GNU C++17 (64) TESTS 20 15 0
226101775 zhi_fan D Oct. 1, 2023, 3:29 a.m. OK GNU C++17 (64) TESTS 20 15 0
226111708 Followall D Oct. 1, 2023, 5:39 a.m. OK GNU C++17 (64) TESTS 20 15 102400
226098043 ThePwo D Oct. 1, 2023, 2:30 a.m. OK GNU C++17 (64) TESTS 20 15 102400
226060291 RGB_YYYYY D Sept. 30, 2023, 5:29 p.m. OK GNU C++17 (64) TESTS 20 15 102400
226055958 For_rest D Sept. 30, 2023, 5:17 p.m. OK GNU C++17 (64) TESTS 20 15 102400
226104865 RedLeaf D Oct. 1, 2023, 4:13 a.m. OK GNU C++17 (64) TESTS 20 15 204800
226067113 NaCl823400 D Sept. 30, 2023, 6:24 p.m. OK GNU C++17 (64) TESTS 20 15 204800
226074658 wqweto D Sept. 30, 2023, 7:16 p.m. OK GNU C++17 (64) TESTS 20 15 409600
226060542 tft_grandmaster D Sept. 30, 2023, 5:29 p.m. OK GNU C++17 (64) TESTS 20 15 409600
226086758 Osssss11 D Sept. 30, 2023, 9:58 p.m. OK GNU C++20 (64) TESTS 20 0 102400
226066740 Ronbogo D Sept. 30, 2023, 6:23 p.m. OK GNU C++20 (64) TESTS 20 0 307200
226108078 2986858916 D Oct. 1, 2023, 4:57 a.m. OK GNU C++20 (64) TESTS 20 15 0
226089195 VinnySJ D Sept. 30, 2023, 10:55 p.m. OK GNU C++20 (64) TESTS 20 15 0
226086799 Osssss11 D Sept. 30, 2023, 9:58 p.m. OK GNU C++20 (64) TESTS 20 15 0
226086365 physics0523 D Sept. 30, 2023, 9:50 p.m. OK GNU C++20 (64) TESTS 20 15 0
226084984 samliu12 D Sept. 30, 2023, 9:25 p.m. OK GNU C++20 (64) TESTS 20 15 0
226082054 Boboge D Sept. 30, 2023, 8:37 p.m. OK GNU C++20 (64) TESTS 20 15 0
226074074 Final_Track D Sept. 30, 2023, 7:11 p.m. OK GNU C++20 (64) TESTS 20 15 0
226055602 DJer_9 D Sept. 30, 2023, 5:16 p.m. OK GNU C++20 (64) TESTS 20 15 0
226062253 verma.shivam2605 D Sept. 30, 2023, 5:33 p.m. OK Java 11 TESTS 20 234 0
226105874 utsav_deep D Oct. 1, 2023, 4:27 a.m. OK Java 11 TESTS 20 327 48947200
226085659 RahulAhuja2901 D Sept. 30, 2023, 9:37 p.m. OK Java 11 TESTS 20 655 146944000
226085596 RahulAhuja2901 D Sept. 30, 2023, 9:36 p.m. OK Java 11 TESTS 20 686 146944000
226085499 RahulAhuja2901 D Sept. 30, 2023, 9:34 p.m. OK Java 11 TESTS 20 686 146944000
226060364 dzhi D Sept. 30, 2023, 5:29 p.m. OK Java 17 TESTS 20 186 307200
226096835 the_unseen D Oct. 1, 2023, 2:10 a.m. OK Java 17 TESTS 20 202 307200
226068643 mpanyavin D Sept. 30, 2023, 6:32 p.m. OK Java 17 TESTS 20 202 716800
226060887 LeetCodeforces_Null D Sept. 30, 2023, 5:30 p.m. OK Java 17 TESTS 20 218 512000
226054613 vaibhav_1710 D Sept. 30, 2023, 5:14 p.m. OK Java 17 TESTS 20 374 716800
226066825 Eslam_Ahmed D Sept. 30, 2023, 6:23 p.m. OK Java 17 TESTS 20 592 144896000
226085422 RahulAhuja2901 D Sept. 30, 2023, 9:33 p.m. OK Java 17 TESTS 20 639 151040000
226085348 RahulAhuja2901 D Sept. 30, 2023, 9:32 p.m. OK Java 17 TESTS 20 639 151449600
226085450 RahulAhuja2901 D Sept. 30, 2023, 9:33 p.m. OK Java 17 TESTS 20 654 151040000
226085695 RahulAhuja2901 D Sept. 30, 2023, 9:38 p.m. OK Java 17 TESTS 20 670 151552000
226092520 tbs-jyy D Oct. 1, 2023, 12:35 a.m. OK Java 21 TESTS 20 233 0
226061581 senisinsane D Sept. 30, 2023, 5:32 p.m. OK Java 21 TESTS 20 264 0
226085622 RahulAhuja2901 D Sept. 30, 2023, 9:37 p.m. OK Java 21 TESTS 20 702 144076800
226067105 Eslam_Ahmed D Sept. 30, 2023, 6:24 p.m. OK Java 21 TESTS 20 795 140595200
226066813 vijay_panwar12 D Sept. 30, 2023, 6:23 p.m. OK Java 8 TESTS 20 109 0
226102835 golions D Oct. 1, 2023, 3:43 a.m. OK Java 8 TESTS 20 124 0
226076342 American_Eagle D Sept. 30, 2023, 7:33 p.m. OK Java 8 TESTS 20 124 0
226076301 diamond5687 D Sept. 30, 2023, 7:32 p.m. OK Java 8 TESTS 20 124 0
226070156 niti.chandra007 D Sept. 30, 2023, 6:40 p.m. OK Java 8 TESTS 20 498 0
226059250 alexpods D Sept. 30, 2023, 5:26 p.m. OK Node.js TESTS 20 873 121036800
226055143 ezahid1662 D Sept. 30, 2023, 5:15 p.m. OK PyPy 3 TESTS 20 171 5427200
226070733 k_ano D Sept. 30, 2023, 6:44 p.m. OK PyPy 3 TESTS 20 217 6041600
226087280 the_last_smilodon D Sept. 30, 2023, 10:09 p.m. OK PyPy 3 TESTS 20 358 9420800
226058984 samriddhjn D Sept. 30, 2023, 5:25 p.m. OK PyPy 3-64 TESTS 20 92 6144000
226075576 ossau_guildo D Sept. 30, 2023, 7:25 p.m. OK PyPy 3-64 TESTS 20 93 5222400
226090907 Kladrr D Sept. 30, 2023, 11:44 p.m. OK PyPy 3-64 TESTS 20 108 5632000
226067709 prashanttholia D Sept. 30, 2023, 6:26 p.m. OK PyPy 3-64 TESTS 20 109 5632000
226067674 momoyao D Sept. 30, 2023, 6:26 p.m. OK PyPy 3-64 TESTS 20 109 9113600
226067888 pratyush155 D Sept. 30, 2023, 6:27 p.m. OK PyPy 3-64 TESTS 20 124 7168000
226067704 codeTester9487 D Sept. 30, 2023, 6:26 p.m. OK PyPy 3-64 TESTS 20 140 5632000
226069024 Remineva D Sept. 30, 2023, 6:33 p.m. OK PyPy 3-64 TESTS 20 155 5632000
226077095 DarkTemplarDrop D Sept. 30, 2023, 7:40 p.m. OK PyPy 3-64 TESTS 20 155 9420800
226074320 grente D Sept. 30, 2023, 7:13 p.m. OK PyPy 3-64 TESTS 20 171 4710400

remove filters

Back to search problems