Codeforces Round 708 (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
1497 Codeforces Round 708 (Div. 2) FINISHED False 8100 121274663 March 17, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 24667 ) A Meximization PROGRAMMING brute force data structures greedy sortings #Vitaliy and Pie 800

B'You are given an integer n and an array a_1, a_2, ldots, a_n . You should reorder the elements of the array a in such way that the sum of textbf{MEX} on prefixes ( i -th prefix is a_1, a_2, ldots, a_i ) is maximized. Formally, you should find an array b_1, b_2, ldots, b_n , such that the sets of elements of arrays a and b are equal (it is equivalent to array b can be found as an array a with some reordering of its elements) and sum limits_{i=1}^{n} textbf{MEX}(b_1, b_2, ldots, b_i) is maximized. textbf{MEX} of a set of nonnegative integers is the minimal nonnegative integer such that it is not in the set. For example, textbf{MEX}( {1, 2, 3 }) = 0 , textbf{MEX}( {0, 1, 2, 4, 5 }) = 3 . The first line contains a single integer t (1 <= t <= 100) -- the number of test cases. The first line of each test case contains a single integer n (1 <= n <= 100) . The second line of each test case contains n integers a_1, a_2, ldots, a_n (0 <= a_i <= 100) . For each test case print an array b_1, b_2, ldots, b_n -- the optimal reordering of a_1, a_2, ldots, a_n , so the sum of textbf{MEX} on its prefixes is maximized. If there exist multiple optimal answers you can find any. In the first test case in the answer textbf{MEX} for prefixes will be: '...

Tutorials

Codeforces Round #708 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
110274935 mengxing1 A March 18, 2021, 4:07 a.m. OK Clang++17 Diagnostics TESTS 10 31 0 800
110273567 pavantankala A March 18, 2021, 3:39 a.m. OK GNU C11 TESTS 10 46 0 800
110274398 pratyushgupta102 A March 18, 2021, 3:56 a.m. OK GNU C11 TESTS 10 46 0 800
110276414 Rohan78512 A March 18, 2021, 4:36 a.m. OK GNU C11 TESTS 10 46 0 800
110245775 pratham0909 A March 17, 2021, 4:43 p.m. OK GNU C11 TESTS 10 46 0 800
110277735 SajibKC_19 A March 18, 2021, 4:58 a.m. OK GNU C11 TESTS 10 61 819200 800
110249719 MouazBudier A March 17, 2021, 6:06 p.m. OK GNU C++11 TESTS 10 15 0 800
110269839 Epiphanyi A March 18, 2021, 2:15 a.m. OK GNU C++11 TESTS 10 15 0 800
110268838 MCAdam A March 18, 2021, 1:42 a.m. OK GNU C++11 TESTS 10 15 0 800
110268719 kmyiu A March 18, 2021, 1:38 a.m. OK GNU C++11 TESTS 10 15 0 800
110267064 xxhlbetter A March 18, 2021, 12:33 a.m. OK GNU C++11 TESTS 10 15 0 800
110266280 train2004 A March 17, 2021, 11:58 p.m. OK GNU C++11 TESTS 10 15 0 800
110265814 limpid A March 17, 2021, 11:38 p.m. OK GNU C++11 TESTS 10 15 0 800
110281941 vandoor A March 18, 2021, 5:57 a.m. OK GNU C++11 TESTS 10 15 0 800
110277358 shn.. A March 18, 2021, 4:52 a.m. OK GNU C++11 TESTS 10 15 0 800
110270573 StarGaz1ng A March 18, 2021, 2:36 a.m. OK GNU C++11 TESTS 10 15 0 800
110265569 sanketn A March 17, 2021, 11:27 p.m. OK GNU C++14 TESTS 10 15 0 800
110262827 rainy_day A March 17, 2021, 9:36 p.m. OK GNU C++14 TESTS 10 15 0 800
110258224 Andreibatman A March 17, 2021, 7:49 p.m. OK GNU C++14 TESTS 10 15 0 800
110255863 MackanSven A March 17, 2021, 7:11 p.m. OK GNU C++14 TESTS 10 15 0 800
110251367 ss_15 A March 17, 2021, 6:18 p.m. OK GNU C++14 TESTS 10 15 0 800
110249134 Opcode A March 17, 2021, 6:03 p.m. OK GNU C++14 TESTS 10 15 0 800
110276348 thaizhenleng A March 18, 2021, 4:35 a.m. OK GNU C++14 TESTS 10 15 0 800
110269748 raghavkhanna687 A March 18, 2021, 2:13 a.m. OK GNU C++14 TESTS 10 15 0 800
110269407 _Plague_ A March 18, 2021, 2:01 a.m. OK GNU C++14 TESTS 10 15 0 800
110268191 hachuochuo. A March 18, 2021, 1:17 a.m. OK GNU C++14 TESTS 10 15 0 800
110255006 tetat A March 17, 2021, 6:59 p.m. OK GNU C++17 TESTS 10 15 0 800
110282565 minhquaningenious A March 18, 2021, 6:05 a.m. OK GNU C++17 TESTS 10 15 0 800
110281915 BOB_YYSH A March 18, 2021, 5:57 a.m. OK GNU C++17 TESTS 10 15 0 800
110280312 Kukarekus A March 18, 2021, 5:35 a.m. OK GNU C++17 TESTS 10 15 0 800
110280224 201901432 A March 18, 2021, 5:34 a.m. OK GNU C++17 TESTS 10 15 0 800
110280001 Praney A March 18, 2021, 5:31 a.m. OK GNU C++17 TESTS 10 15 0 800
110276815 rb_rb A March 18, 2021, 4:43 a.m. OK GNU C++17 TESTS 10 15 0 800
110276460 ch.sadik A March 18, 2021, 4:37 a.m. OK GNU C++17 TESTS 10 15 0 800
110269545 jzdx A March 18, 2021, 2:06 a.m. OK GNU C++17 TESTS 10 15 0 800
110266592 Sagida2514 A March 18, 2021, 12:13 a.m. OK GNU C++17 TESTS 10 15 0 800
110278198 Warriors_Cat A March 18, 2021, 5:05 a.m. OK GNU C++17 (64) TESTS 10 15 0 800
110276648 notFastButFurious A March 18, 2021, 4:40 a.m. OK GNU C++17 (64) TESTS 10 15 0 800
110276321 Zeroo0iq A March 18, 2021, 4:35 a.m. OK GNU C++17 (64) TESTS 10 15 0 800
110273888 harsh1919 A March 18, 2021, 3:46 a.m. OK GNU C++17 (64) TESTS 10 15 0 800
110273443 Continued_Story A March 18, 2021, 3:36 a.m. OK GNU C++17 (64) TESTS 10 15 0 800
110272088 CodigoL A March 18, 2021, 3:07 a.m. OK GNU C++17 (64) TESTS 10 15 0 800
110278737 Rh370170 A March 18, 2021, 5:14 a.m. OK GNU C++17 (64) TESTS 10 15 0 800
110279171 raghhavdturki A March 18, 2021, 5:19 a.m. OK GNU C++17 (64) TESTS 10 15 0 800
110279632 ssquare_07 A March 18, 2021, 5:25 a.m. OK GNU C++17 (64) TESTS 10 15 0 800
110282101 SorryNaCN A March 18, 2021, 5:59 a.m. OK GNU C++17 (64) TESTS 10 15 0 800
110260002 TomazGomes A March 17, 2021, 8:22 p.m. OK Haskell TESTS 10 31 102400 800
110261372 folsatraptai A March 17, 2021, 8:52 p.m. OK Java 11 TESTS 10 171 0 800
110274586 Nick A March 18, 2021, 3:59 a.m. OK Java 11 TESTS 10 186 0 800
110265567 BlackpinkLisa A March 17, 2021, 11:27 p.m. OK Java 11 TESTS 10 187 0 800
110267671 Is2ac A March 18, 2021, 12:57 a.m. OK Java 11 TESTS 10 202 0 800
110272929 Helloworld_shorya A March 18, 2021, 3:25 a.m. OK Java 11 TESTS 10 202 0 800
110260420 soumit915 A March 17, 2021, 8:30 p.m. OK Java 11 TESTS 10 218 0 800
110254677 adhi_2311 A March 17, 2021, 6:55 p.m. OK Java 11 TESTS 10 218 0 800
110252802 DetoAce A March 17, 2021, 6:33 p.m. OK Java 11 TESTS 10 218 0 800
110251439 MoonCoder1234 A March 17, 2021, 6:19 p.m. OK Java 11 TESTS 10 218 0 800
110262002 twinklaxia A March 17, 2021, 9:11 p.m. OK Java 11 TESTS 10 233 0 800
110276494 parascoding A March 18, 2021, 4:38 a.m. OK Java 8 TESTS 10 108 0 800
110265103 shojin_pro A March 17, 2021, 11:08 p.m. OK Java 8 TESTS 10 109 0 800
110259376 mkosm A March 17, 2021, 8:10 p.m. OK Java 8 TESTS 10 109 0 800
110254398 nandit A March 17, 2021, 6:51 p.m. OK Java 8 TESTS 10 124 0 800
110277580 ssd17 A March 18, 2021, 4:56 a.m. OK Java 8 TESTS 10 124 0 800
110277199 O-Infinity A March 18, 2021, 4:50 a.m. OK Java 8 TESTS 10 124 0 800
110276716 Aeratian A March 18, 2021, 4:42 a.m. OK Java 8 TESTS 10 124 0 800
110253598 TheSawan A March 17, 2021, 6:42 p.m. OK Java 8 TESTS 10 124 0 800
110256794 Digvijaysingh0707 A March 17, 2021, 7:25 p.m. OK Java 8 TESTS 10 139 0 800
110255173 ezraft A March 17, 2021, 7:01 p.m. OK Java 8 TESTS 10 139 0 800
110269801 yudedako A March 18, 2021, 2:14 a.m. OK Kotlin TESTS 10 187 1740800 800
110250483 TRR A March 17, 2021, 6:11 p.m. OK Mono C# TESTS 10 93 819200 800
110250019 nik2005 A March 17, 2021, 6:08 p.m. OK MS C++ 2017 TESTS 10 31 0 800
110245223 rjrstuewfyg A March 17, 2021, 4:40 p.m. OK MS C++ 2017 TESTS 10 31 0 800
110262233 Anurag2806 A March 17, 2021, 9:18 p.m. OK MS C++ 2017 TESTS 10 31 0 800
110274612 Anurag2806 A March 18, 2021, 4 a.m. OK MS C++ 2017 TESTS 10 31 0 800
110268101 Albertplus007 A March 18, 2021, 1:14 a.m. OK MS C++ 2017 TESTS 10 31 0 800
110250842 nik2005 A March 17, 2021, 6:14 p.m. OK MS C++ 2017 TESTS 10 31 0 800
110267534 _Rimjhim_36 A March 18, 2021, 12:52 a.m. OK MS C++ 2017 TESTS 10 31 307200 800
110260813 Friska A March 17, 2021, 8:38 p.m. OK MS C++ 2017 TESTS 10 31 307200 800
110272311 e_ve A March 18, 2021, 3:12 a.m. OK MS C++ 2017 TESTS 10 46 0 800
110277980 Harshita_0304 A March 18, 2021, 5:02 a.m. OK MS C++ 2017 TESTS 10 46 0 800
110262686 ansergeyg A March 17, 2021, 9:31 p.m. OK .NET Core C# TESTS 10 93 1228800 800
110267836 YMSeah A March 18, 2021, 1:03 a.m. OK PyPy 3 TESTS 10 108 2457600 800
110253392 peels A March 17, 2021, 6:39 p.m. OK PyPy 3 TESTS 10 109 2048000 800
110252986 kalp.s.vyas A March 17, 2021, 6:35 p.m. OK PyPy 3 TESTS 10 109 2150400 800
110275617 athirai_s A March 18, 2021, 4:21 a.m. OK PyPy 3 TESTS 10 109 2252800 800
110250648 vanutp A March 17, 2021, 6:12 p.m. OK PyPy 3 TESTS 10 124 1536000 800
110280286 rvarian A March 18, 2021, 5:34 a.m. OK PyPy 3 TESTS 10 124 1638400 800
110260390 nkorobkov A March 17, 2021, 8:29 p.m. OK PyPy 3 TESTS 10 124 2048000 800
110254188 rajbit A March 17, 2021, 6:49 p.m. OK PyPy 3 TESTS 10 124 2457600 800
110255803 armsusman A March 17, 2021, 7:10 p.m. OK PyPy 3 TESTS 10 124 2560000 800
110269397 Ilsa A March 18, 2021, 2:01 a.m. OK PyPy 3 TESTS 10 124 2662400 800
110266127 Hitik A March 17, 2021, 11:51 p.m. OK Python 2 TESTS 10 77 102400 800
110254772 elistark A March 17, 2021, 6:57 p.m. OK Python 2 TESTS 10 92 102400 800
110265717 ChristerNilsson A March 17, 2021, 11:34 p.m. OK Python 3 TESTS 10 62 0 800
110282049 Bhaumik A March 18, 2021, 5:58 a.m. OK Python 3 TESTS 10 62 307200 800
110281762 alcohol_fu A March 18, 2021, 5:54 a.m. OK Python 3 TESTS 10 62 307200 800
110275687 halrybhalodia17 A March 18, 2021, 4:23 a.m. OK Python 3 TESTS 10 62 307200 800
110272340 Airths A March 18, 2021, 3:13 a.m. OK Python 3 TESTS 10 62 307200 800
110268270 lucifer1004 A March 18, 2021, 1:21 a.m. OK Python 3 TESTS 10 62 307200 800
110257269 armsusman A March 17, 2021, 7:32 p.m. OK Python 3 TESTS 10 62 307200 800
110249361 shubham_409 A March 17, 2021, 6:04 p.m. OK Python 3 TESTS 10 62 307200 800
110255646 ericsoderstrom A March 17, 2021, 7:08 p.m. OK Python 3 TESTS 10 62 409600 800
110275675 S_i_n_c_h_a_n A March 18, 2021, 4:22 a.m. OK Python 3 TESTS 10 77 0 800
110278376 tanyifan A March 18, 2021, 5:08 a.m. OK Rust TESTS 10 31 102400 800
110281469 sansen A March 18, 2021, 5:51 a.m. OK Rust TESTS 10 31 307200 800

remove filters

Back to search problems