Codeforces Round 744 (Div. 3)

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
1579 Codeforces Round 744 (Div. 3) FINISHED False 8100 104426663 Sept. 28, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6786 ) E2 Array Optimization by Deque PROGRAMMING data structures greedy

B'In fact, the problems E1 and E2 do not have much in common. You should probably think of them as two separate problems. You are given an integer array a[1 ldots n] = [a_1, a_2, ldots, a_n] . Let us consider an empty deque (double-ended queue). A deque is a data structure that supports adding elements to both the beginning and the end. So, if there are elements [3, 4, 4] currently in the deque, adding an element 1 to the beginning will produce the sequence [ color{red}{1}, 3, 4, 4] , and adding the same element to the end will produce [3, 4, 4, color{red}{1}] . The elements of the array are sequentially added to the initially empty deque, starting with a_1 and finishing with a_n . Before adding each element to the deque, you may choose whether to add it to the beginning or to the end. For example, if we consider an array a = [3, 7, 5, 5] , one of the possible sequences of actions looks like this: quad 1.add 3 to the beginning of the deque:deque has a sequence [ color{red}{3}] in it; quad 2.add 7 to the end of the deque:deque has a sequence [3, color{red}{7}] in it; quad 3.add 5 to the end of the deque:deque has a sequence [3, 7, color{red}{5}] in it; quad 4.add 5 to the beginning of the deque:deque has a sequence [ color{red}{5}, 3, 7, 5] in it; Find the minimal possible number of inversions in the deque after the whole array is processed. An inversion in sequence d is a pair of indices (i, j) such that i < j and d_i > d_j . For example, the array d = [5, 3, 7, 5] has exactly two inversions -- (1, 2) and (3, 4) , since d_1 = 5 > 3 = d_2 and d_3 = 7 > 5 = d_4 . The first line contains an integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The next 2t lines contain descriptions of the test cases. The first line of each test case description contains an intege'...

Tutorials

Codeforces Round #744 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
130254318 Eternity_GQM E2 Sept. 29, 2021, 10:47 a.m. OK GNU C++14 TESTS 55 78 6553600
130239860 Kirito_Rivaille E2 Sept. 29, 2021, 7:50 a.m. OK GNU C++14 TESTS 55 93 6963200
130284514 wrlcke E2 Sept. 29, 2021, 4:08 p.m. OK GNU C++14 TESTS 55 108 6963200
130255228 dkhve E2 Sept. 29, 2021, 10:59 a.m. OK GNU C++14 TESTS 55 109 7782400
130237531 liuhanwen E2 Sept. 29, 2021, 7:21 a.m. OK GNU C++14 TESTS 55 109 7782400
130309902 zjkzjkzjk E2 Sept. 30, 2021, 1:38 a.m. OK GNU C++14 TESTS 55 109 8396800
130300056 gauss2718281 E2 Sept. 29, 2021, 7:55 p.m. OK GNU C++14 TESTS 55 124 6144000
130289209 zhujunchao E2 Sept. 29, 2021, 5:10 p.m. OK GNU C++14 TESTS 55 124 6144000
130246238 jxust_hzf E2 Sept. 29, 2021, 9:07 a.m. OK GNU C++14 TESTS 55 124 6144000
130245250 NXYorz E2 Sept. 29, 2021, 8:55 a.m. OK GNU C++14 TESTS 55 124 6144000
130243821 Mahm2od E2 Sept. 29, 2021, 8:38 a.m. OK GNU C++17 TESTS 55 93 6144000
130319528 atodo E2 Sept. 30, 2021, 5:32 a.m. OK GNU C++17 TESTS 55 93 6963200
130233734 TkFox_wa E2 Sept. 29, 2021, 6:35 a.m. OK GNU C++17 TESTS 55 109 6144000
130238787 m371 E2 Sept. 29, 2021, 7:36 a.m. OK GNU C++17 TESTS 55 109 6963200
130278035 Rudraksh E2 Sept. 29, 2021, 2:55 p.m. OK GNU C++17 TESTS 55 109 7782400
130280918 CIiii E2 Sept. 29, 2021, 3:27 p.m. OK GNU C++17 TESTS 55 109 10137600
130227599 no_words_to_sky E2 Sept. 29, 2021, 4:50 a.m. OK GNU C++17 TESTS 55 124 5324800
130227208 no_words_to_sky E2 Sept. 29, 2021, 4:43 a.m. OK GNU C++17 TESTS 55 124 5324800
130311198 liaoshixing E2 Sept. 30, 2021, 2:23 a.m. OK GNU C++17 TESTS 55 124 6144000
130306504 mika_uwu E2 Sept. 29, 2021, 11:04 p.m. OK GNU C++17 TESTS 55 124 6144000
130263642 dechrone E2 Sept. 29, 2021, 12:31 p.m. OK GNU C++17 (64) TESTS 55 78 13926400
130319973 cjtodl E2 Sept. 30, 2021, 5:40 a.m. OK GNU C++17 (64) TESTS 55 93 6758400
130315548 Time_JYF E2 Sept. 30, 2021, 4:10 a.m. OK GNU C++17 (64) TESTS 55 93 6758400
130290823 Omar_Ashour E2 Sept. 29, 2021, 5:31 p.m. OK GNU C++17 (64) TESTS 55 93 6758400
130283491 alwyn E2 Sept. 29, 2021, 3:56 p.m. OK GNU C++17 (64) TESTS 55 93 6758400
130281851 Wonn7 E2 Sept. 29, 2021, 3:37 p.m. OK GNU C++17 (64) TESTS 55 93 6758400
130281529 Wonn7 E2 Sept. 29, 2021, 3:34 p.m. OK GNU C++17 (64) TESTS 55 93 6758400
130267928 Wonn7 E2 Sept. 29, 2021, 1:14 p.m. OK GNU C++17 (64) TESTS 55 93 6758400
130254096 achvanov E2 Sept. 29, 2021, 10:45 a.m. OK GNU C++17 (64) TESTS 55 93 6758400
130223465 dqhungdl E2 Sept. 29, 2021, 3:31 a.m. OK GNU C++17 (64) TESTS 55 93 6758400
130244808 BamgoeSN E2 Sept. 29, 2021, 8:50 a.m. OK Go TESTS 55 358 16076800
130253573 SnacksTime E2 Sept. 29, 2021, 10:39 a.m. OK Java 11 TESTS 55 514 51097600
130236687 vineet16 E2 Sept. 29, 2021, 7:11 a.m. OK Java 11 TESTS 55 576 59699200
130260887 PetrNguyen E2 Sept. 29, 2021, 12:01 p.m. OK Java 11 TESTS 55 592 59904000
130224781 naman5811 E2 Sept. 29, 2021, 3:56 a.m. OK Java 11 TESTS 55 623 55500800
130296918 ryanberg E2 Sept. 29, 2021, 6:56 p.m. OK Java 11 TESTS 55 779 70451200
130285346 sharnit E2 Sept. 29, 2021, 4:19 p.m. OK Java 11 TESTS 55 888 69017600
130234669 ksd_3 E2 Sept. 29, 2021, 6:46 a.m. OK Java 11 TESTS 55 935 64921600
130251224 ak_ankit E2 Sept. 29, 2021, 10:09 a.m. OK Java 11 TESTS 55 982 50585600
130242514 nitin23329 E2 Sept. 29, 2021, 8:22 a.m. OK Java 11 TESTS 55 1372 101683200
130274034 SadFriedRice E2 Sept. 29, 2021, 2:13 p.m. OK Java 11 TESTS 55 1778 185139200
130235891 Lelouch_1 E2 Sept. 29, 2021, 7:01 a.m. OK Java 8 TESTS 55 421 47411200
130235573 Lelouch_1 E2 Sept. 29, 2021, 6:57 a.m. OK Java 8 TESTS 55 421 47411200
130302709 sajibcuet09 E2 Sept. 29, 2021, 8:58 p.m. OK Java 8 TESTS 55 451 43008000
130284872 ganesh_6 E2 Sept. 29, 2021, 4:12 p.m. OK Java 8 TESTS 55 467 40652800
130224464 omar_mohammed E2 Sept. 29, 2021, 3:51 a.m. OK Java 8 TESTS 55 592 46284800
130235657 Swapniltri E2 Sept. 29, 2021, 6:58 a.m. OK Java 8 TESTS 55 624 61952000
130280575 fareedahmaheeb E2 Sept. 29, 2021, 3:23 p.m. OK Java 8 TESTS 55 654 55603200
130301442 smahajan54842 E2 Sept. 29, 2021, 8:26 p.m. OK Java 8 TESTS 55 873 40857600
130301424 Admin07 E2 Sept. 29, 2021, 8:25 p.m. OK Java 8 TESTS 55 873 40857600
130272307 pribic E2 Sept. 29, 2021, 1:56 p.m. OK Java 8 TESTS 55 1590 54988800
130243050 russian_proger E2 Sept. 29, 2021, 8:29 a.m. OK MS C++ 2017 TESTS 55 312 7475200
130242031 russian_proger E2 Sept. 29, 2021, 8:16 a.m. OK MS C++ 2017 TESTS 55 312 10137600
130244253 russian_proger E2 Sept. 29, 2021, 8:43 a.m. OK MS C++ 2017 TESTS 55 327 7475200
130243179 russian_proger E2 Sept. 29, 2021, 8:30 a.m. OK MS C++ 2017 TESTS 55 389 13926400
130243120 russian_proger E2 Sept. 29, 2021, 8:30 a.m. OK MS C++ 2017 TESTS 55 389 174182400
130244216 russian_proger E2 Sept. 29, 2021, 8:43 a.m. OK MS C++ 2017 TESTS 55 421 7475200
130296022 Dead_InsideZXC E2 Sept. 29, 2021, 6:42 p.m. OK MS C++ 2017 TESTS 55 529 13414400
130265876 nor_or E2 Sept. 29, 2021, 12:53 p.m. OK MS C++ 2017 TESTS 55 608 14950400
130254605 KeiTsukishima E2 Sept. 29, 2021, 10:51 a.m. OK PyPy 3 TESTS 55 452 44236800
130311953 coolstreaming E2 Sept. 30, 2021, 2:44 a.m. OK PyPy 3 TESTS 55 452 46182400
130311773 coolstreaming E2 Sept. 30, 2021, 2:40 a.m. OK PyPy 3 TESTS 55 483 45977600
130257495 jcimskgp717 E2 Sept. 29, 2021, 11:24 a.m. OK PyPy 3 TESTS 55 530 42803200
130319791 Siddharth_Mehta1311 E2 Sept. 30, 2021, 5:37 a.m. OK PyPy 3 TESTS 55 545 179712000
130310554 thisiscaau E2 Sept. 30, 2021, 2:02 a.m. OK PyPy 3 TESTS 55 561 40652800
130222688 shiviDON E2 Sept. 29, 2021, 3:14 a.m. OK PyPy 3 TESTS 55 592 43315200
130317934 i8nd5t E2 Sept. 30, 2021, 5:01 a.m. OK PyPy 3 TESTS 55 607 44032000
130234059 hjkim E2 Sept. 29, 2021, 6:39 a.m. OK PyPy 3 TESTS 55 608 41984000
130238490 sarthak_bharadwaj_ E2 Sept. 29, 2021, 7:32 a.m. OK PyPy 3 TESTS 55 811 39936000
130311991 coolstreaming E2 Sept. 30, 2021, 2:45 a.m. OK Python 3 TESTS 55 1699 27238400
130311077 190031512_suhana E2 Sept. 30, 2021, 2:20 a.m. OK Python 3 TESTS 55 1981 27136000
130288184 sh1194 E2 Sept. 29, 2021, 4:55 p.m. OK Python 3 TESTS 55 1996 27136000
130287951 sh1194 E2 Sept. 29, 2021, 4:52 p.m. OK Python 3 TESTS 55 1996 27238400

remove filters

Back to search problems