Codeforces Round 521 (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
1077 Codeforces Round 521 (Div. 3) FINISHED False 7200 195146724 Nov. 16, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9189 ) D Cutting Out PROGRAMMING binary search sortings 1600

B'You are given an array s consisting of n integers. You have to find any array t of length k such that you can cut out maximum number of copies of array t from array s . Cutting out the copy of t means that for each element t_i of array t you have to find t_i in s and remove it from s . If for some t_i you cannot find such element in s , then you cannot cut out one more copy of t . The both arrays can contain duplicate elements. For example, if s = [1, 2, 3, 2, 4, 3, 1] and k = 3 then one of the possible answers is t = [1, 2, 3] . This array t can be cut out 2 times. Your task is to find such array t that you can cut out the copy of t from s maximum number of times. If there are multiple answers, you may choose any of them. The first line of the input contains two integers n and k ( 1 <= k <= n <= 2 cdot 10^5 ) -- the number of elements in s and the desired number of elements in t , respectively. The second line of the input contains exactly n integers s_1, s_2, ... , s_n ( 1 <= s_i <= 2 cdot 10^5 ). Print k integers -- the elements of array t such that you can cut out maximum possible number of copies of this array from s . If there are multiple answers, print any of them. The required array t can contain duplicate elements. All the elements of t ( t_1, t_2, ... , t_k ) should satisfy the following condition: 1 <= t_i <= 2 cdot 10^5 . The first example is described in the problem statement. In the second example the only answer is [7, 3, 1, 3] and any its permutations. It can be shown that you cannot choose any other array such that the maximum number of copies you can cut out would be equal to 2 . In the third example the array t can be cut out 5 times. '...

Tutorials

Codeforces Round #521 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46040195 mihaipriboi D Nov. 21, 2018, 7:06 p.m. OK Clang++17 Diagnostics TESTS 53 155 0 1600
50668837 Minasenayuki D March 2, 2019, 5:57 a.m. OK Clang++17 Diagnostics TESTS 53 202 921600 1600
46470928 adityareddy22 D Dec. 2, 2018, 7:25 a.m. OK Clang++17 Diagnostics TESTS 53 857 3174400 1600
47025022 hkyiitd D Dec. 15, 2018, 6:18 a.m. OK Clang++17 Diagnostics TESTS 53 1638 20684800 1600
47856766 toysmars D Jan. 2, 2019, 11:36 p.m. OK Clang++17 Diagnostics TESTS 53 1762 25190400 1600
46058427 grinrag D Nov. 22, 2018, 12:07 p.m. OK Clang++17 Diagnostics TESTS 53 1777 21401600 1600
47856780 vjudge3 D Jan. 2, 2019, 11:37 p.m. OK Clang++17 Diagnostics TESTS 53 1778 25190400 1600
46124180 rr_ D Nov. 23, 2018, 6:02 p.m. OK D TESTS 53 140 11571200 1600
54995975 Denor D June 2, 2019, 11:41 p.m. OK Delphi TESTS 53 108 1740800 1600
46358235 hoangmaicongdat2001 D Nov. 29, 2018, 9:35 a.m. OK FPC TESTS 53 623 4096000 1600
51673710 chaorenhaha D March 22, 2019, 9:24 a.m. OK FPC TESTS 53 624 3481600 1600
46320640 chenyung D Nov. 28, 2018, 3:05 p.m. OK GNU C11 TESTS 53 654 819200 1600
46321070 chenyung D Nov. 28, 2018, 3:06 p.m. OK GNU C11 TESTS 53 670 819200 1600
46321850 chenyung D Nov. 28, 2018, 3:09 p.m. OK GNU C11 TESTS 53 686 819200 1600
46319726 chenyung D Nov. 28, 2018, 3:02 p.m. OK GNU C11 TESTS 53 686 819200 1600
46541806 zarif_2002 D Dec. 3, 2018, 12:25 p.m. OK GNU C11 TESTS 53 686 1638400 1600
46305051 mranjan7 D Nov. 28, 2018, 9:36 a.m. OK GNU C11 TESTS 53 686 3174400 1600
46545100 shreya_2004 D Dec. 3, 2018, 2:07 p.m. OK GNU C11 TESTS 53 701 1638400 1600
46541850 shreya_2004 D Dec. 3, 2018, 12:26 p.m. OK GNU C11 TESTS 53 780 1638400 1600
52239759 lyzqs D April 2, 2019, 3:18 p.m. OK GNU C++11 TESTS 53 46 1638400 1600
46049166 201512203501018 D Nov. 22, 2018, 5:53 a.m. OK GNU C++11 TESTS 53 46 1638400 1600
46968192 Scut82 D Dec. 13, 2018, 12:27 p.m. OK GNU C++11 TESTS 53 46 2457600 1600
46175797 Jyf624761709 D Nov. 24, 2018, 3:04 p.m. OK GNU C++11 TESTS 53 46 2457600 1600
46059154 luogu_bot3 D Nov. 22, 2018, 12:28 p.m. OK GNU C++11 TESTS 53 46 2457600 1600
46968275 Scut82 D Dec. 13, 2018, 12:30 p.m. OK GNU C++11 TESTS 53 46 2662400 1600
46173835 luogu_bot1 D Nov. 24, 2018, 2:08 p.m. OK GNU C++11 TESTS 53 46 4096000 1600
46239790 memset0c D Nov. 26, 2018, 7:01 a.m. OK GNU C++11 TESTS 53 46 4198400 1600
46114027 Itst D Nov. 23, 2018, 1:07 p.m. OK GNU C++11 TESTS 53 61 819200 1600
46096247 ZredXNy D Nov. 23, 2018, 12:37 a.m. OK GNU C++11 TESTS 53 61 2457600 1600
46432639 vjudge4 D Dec. 1, 2018, 6:52 a.m. OK GNU C++14 TESTS 53 62 1638400 1600
58917308 karan2dec D Aug. 16, 2019, 3:32 p.m. OK GNU C++14 TESTS 53 77 2457600 1600
61918463 AK-JXUSTNC D Oct. 5, 2019, 12:43 p.m. OK GNU C++14 TESTS 53 77 2457600 1600
69617331 MahmoudAbdul_Ghaffar D Jan. 27, 2020, 1:29 p.m. OK GNU C++14 TESTS 53 78 819200 1600
69929810 Mari000 D Jan. 31, 2020, 10:47 p.m. OK GNU C++14 TESTS 53 78 819200 1600
55555286 amber0820 D June 14, 2019, 9:33 a.m. OK GNU C++14 TESTS 53 78 819200 1600
55327831 slappy D June 9, 2019, 9:10 a.m. OK GNU C++14 TESTS 53 78 819200 1600
49909937 Kirito D Feb. 14, 2019, 1:43 p.m. OK GNU C++14 TESTS 53 78 819200 1600
49775555 zhaoy1ping D Feb. 11, 2019, 3:18 p.m. OK GNU C++14 TESTS 53 78 819200 1600
48460845 Sashka_proger D Jan. 16, 2019, 2:35 p.m. OK GNU C++14 TESTS 53 78 819200 1600
46031795 Q_Qgao D Nov. 21, 2018, 2:07 p.m. OK GNU C++17 TESTS 53 77 1024000 1600
58708915 Qusai_Hroub D Aug. 13, 2019, 11:30 a.m. OK GNU C++17 TESTS 53 77 2457600 1600
55802491 vjudge2 D June 19, 2019, 7:48 p.m. OK GNU C++17 TESTS 53 77 3481600 1600
50581351 EliasMera D Feb. 27, 2019, 9:46 p.m. OK GNU C++17 TESTS 53 78 819200 1600
46031225 Q_Qgao D Nov. 21, 2018, 1:50 p.m. OK GNU C++17 TESTS 53 78 1024000 1600
46203793 yuiko0819 D Nov. 25, 2018, 1:04 p.m. OK GNU C++17 TESTS 53 78 1638400 1600
46472953 white_156 D Dec. 2, 2018, 7:47 a.m. OK GNU C++17 TESTS 53 78 1638400 1600
47368800 hOhok44 D Dec. 22, 2018, 1:03 p.m. OK GNU C++17 TESTS 53 78 1638400 1600
47616825 vjudge1 D Dec. 28, 2018, 10:55 a.m. OK GNU C++17 TESTS 53 78 1638400 1600
47352042 zhujiacheng D Dec. 22, 2018, 3:42 a.m. OK GNU C++17 TESTS 53 78 1843200 1600
61892468 synapse D Oct. 5, 2019, 6:14 a.m. OK Go TESTS 53 171 4505600 1600
61893328 synapse D Oct. 5, 2019, 6:30 a.m. OK Go TESTS 53 186 4505600 1600
65937837 bleh0.5 D Nov. 29, 2019, 3:46 a.m. OK Java 11 TESTS 53 420 6451200 1600
69926683 GiantTornado D Jan. 31, 2020, 8:46 p.m. OK Java 11 TESTS 53 483 15155200 1600
68623943 cribabby D Jan. 11, 2020, 8:27 p.m. OK Java 11 TESTS 53 779 8499200 1600
46187701 Ahmad D Nov. 25, 2018, 12:47 a.m. OK Java 8 TESTS 53 140 0 1600
46839170 sooraj10 D Dec. 10, 2018, 6:06 a.m. OK Java 8 TESTS 53 155 0 1600
46041714 m1_k3 D Nov. 21, 2018, 8:23 p.m. OK Java 8 TESTS 53 171 2150400 1600
46041547 m1_k3 D Nov. 21, 2018, 8:15 p.m. OK Java 8 TESTS 53 171 2150400 1600
50099791 mikkk D Feb. 18, 2019, 2:23 p.m. OK Java 8 TESTS 53 171 2969600 1600
46743811 dyhu083 D Dec. 8, 2018, 5:36 a.m. OK Java 8 TESTS 53 171 3788800 1600
46524695 kusomushi D Dec. 2, 2018, 8:18 p.m. OK Java 8 TESTS 53 171 6451200 1600
63286296 yaoct D Oct. 24, 2019, 10:27 a.m. OK Java 8 TESTS 53 186 2969600 1600
69650747 luchy0120 D Jan. 28, 2020, 5:03 a.m. OK Java 8 TESTS 53 186 5427200 1600
46839903 amolpratap007 D Dec. 10, 2018, 6:43 a.m. OK Java 8 TESTS 53 187 1024000 1600
58540078 og.kostya D Aug. 10, 2019, 1:45 p.m. OK Mono C# TESTS 53 140 16793600 1600
69027700 hibatibati D Jan. 18, 2020, 7:31 a.m. OK Mono C# TESTS 53 171 32563200 1600
46572738 vjudge4 D Dec. 4, 2018, 6:53 a.m. OK MS C++ TESTS 53 62 1638400 1600
50712044 vjudge5 D March 3, 2019, 7:08 a.m. OK MS C++ TESTS 53 77 819200 1600
51619305 vjudge4 D March 21, 2019, 1:40 p.m. OK MS C++ TESTS 53 77 819200 1600
47617781 vjudge1 D Dec. 28, 2018, 11:24 a.m. OK MS C++ TESTS 53 77 1638400 1600
47616769 vjudge5 D Dec. 28, 2018, 10:52 a.m. OK MS C++ TESTS 53 77 1638400 1600
46432057 vjudge5 D Dec. 1, 2018, 6:24 a.m. OK MS C++ TESTS 53 77 2457600 1600
47090227 vjudge4 D Dec. 16, 2018, 5:14 a.m. OK MS C++ TESTS 53 77 3174400 1600
46933042 vjudge1 D Dec. 12, 2018, 12:33 p.m. OK MS C++ TESTS 53 77 3993600 1600
59641615 vjudge5 D Aug. 29, 2019, 2:12 a.m. OK MS C++ TESTS 53 78 819200 1600
47617276 vjudge5 D Dec. 28, 2018, 11:08 a.m. OK MS C++ TESTS 53 78 1638400 1600
55999586 petko_mitkov D June 24, 2019, 12:22 p.m. OK MS C++ 2017 TESTS 53 108 3379200 1600
50920786 work_hard. D March 7, 2019, 9:05 a.m. OK MS C++ 2017 TESTS 53 109 1638400 1600
63122704 pmitkov D Oct. 22, 2019, 11:51 a.m. OK MS C++ 2017 TESTS 53 124 3379200 1600
55201611 hwangganzi D June 6, 2019, 10:50 a.m. OK MS C++ 2017 TESTS 53 140 7577600 1600
69883304 vjudge3 D Jan. 31, 2020, 7:13 a.m. OK MS C++ 2017 TESTS 53 249 5632000 1600
66624771 akhila_2799 D Dec. 11, 2019, 8:29 a.m. OK MS C++ 2017 TESTS 53 265 2457600 1600
55395225 Skeef79 D June 10, 2019, 11:28 a.m. OK MS C++ 2017 TESTS 53 265 4198400 1600
50939763 tiendat3550 D March 7, 2019, 3:25 p.m. OK MS C++ 2017 TESTS 53 280 4505600 1600
59477546 Ti_Rex D Aug. 25, 2019, 4:07 p.m. OK MS C++ 2017 TESTS 53 311 4915200 1600
54096637 DODIK_228 D May 14, 2019, 1:23 p.m. OK MS C++ 2017 TESTS 53 327 3788800 1600
51334669 rnd D March 15, 2019, 1:38 p.m. OK Ocaml TESTS 53 171 14131200 1600
47091004 wateret D Dec. 16, 2018, 5:55 a.m. OK PyPy 2 TESTS 53 327 20377600 1600
54852200 gatsko D May 30, 2019, 5:11 p.m. OK PyPy 2 TESTS 53 685 26828800 1600
51542486 kill-z D March 19, 2019, 6:50 p.m. OK PyPy 3 TESTS 53 436 20582400 1600
46005774 cgfs10000 D Nov. 20, 2018, 4:52 p.m. OK PyPy 3 TESTS 53 436 24780800 1600
52474882 mihalykoandras D April 7, 2019, 9:30 p.m. OK PyPy 3 TESTS 53 467 19558400 1600
46092901 yagami3566 D Nov. 22, 2018, 8:31 p.m. OK PyPy 3 TESTS 53 467 20480000 1600
53563266 yfo D April 30, 2019, 10:58 a.m. OK PyPy 3 TESTS 53 483 20172800 1600
57280997 brosucks D July 18, 2019, 12:46 p.m. OK PyPy 3 TESTS 53 514 20480000 1600
60740231 Sevlll D Sept. 17, 2019, 7:35 p.m. OK PyPy 3 TESTS 53 514 21913600 1600
68627358 beethoven97 D Jan. 11, 2020, 11:24 p.m. OK PyPy 3 TESTS 53 529 22937600 1600
68313654 latter0206 D Jan. 6, 2020, 12:21 p.m. OK PyPy 3 TESTS 53 623 25804800 1600
46421641 kinte D Nov. 30, 2018, 10 p.m. OK PyPy 3 TESTS 53 717 32358400 1600
46043649 fanzhang D Nov. 21, 2018, 10:28 p.m. OK Python 2 TESTS 53 576 16793600 1600
47450479 vjudge1 D Dec. 24, 2018, 9:18 a.m. OK Python 2 TESTS 53 623 22118400 1600
47450633 vjudge5 D Dec. 24, 2018, 9:24 a.m. OK Python 2 TESTS 53 638 22118400 1600
47669198 wateret D Dec. 29, 2018, 4:15 a.m. OK Python 2 TESTS 53 639 22118400 1600
47967836 wateret D Jan. 5, 2019, 1:01 p.m. OK Python 2 TESTS 53 654 22118400 1600
47453772 vjudge3 D Dec. 24, 2018, 11:22 a.m. OK Python 2 TESTS 53 655 22118400 1600
47330424 vjudge2 D Dec. 21, 2018, 12:38 p.m. OK Python 2 TESTS 53 780 22118400 1600
47090990 wateret D Dec. 16, 2018, 5:54 a.m. OK Python 2 TESTS 53 795 22118400 1600
47532539 nealzane D Dec. 26, 2018, 8:29 p.m. OK Python 2 TESTS 53 810 15974400 1600
46054808 sainath_iiti D Nov. 22, 2018, 10:15 a.m. OK Python 2 TESTS 53 1185 24576000 1600
48194036 nowyyz D Jan. 10, 2019, 7:59 p.m. OK Python 3 TESTS 53 514 20889600 1600
46052946 skateboard_p D Nov. 22, 2018, 9 a.m. OK Python 3 TESTS 53 545 18227200 1600
47542729 whatshisbucket D Dec. 27, 2018, 8:09 a.m. OK Python 3 TESTS 53 576 23654400 1600
56292732 vjudge1 D June 30, 2019, 2:57 a.m. OK Python 3 TESTS 53 577 26214400 1600
47542696 whatshisbucket D Dec. 27, 2018, 8:08 a.m. OK Python 3 TESTS 53 592 24985600 1600
56292712 rainerh D June 30, 2019, 2:55 a.m. OK Python 3 TESTS 53 592 26214400 1600
56284098 vjudge5 D June 29, 2019, 6:30 p.m. OK Python 3 TESTS 53 607 26624000 1600
46055526 Riron D Nov. 22, 2018, 10:41 a.m. OK Python 3 TESTS 53 670 20377600 1600
46421633 kinte D Nov. 30, 2018, 9:59 p.m. OK Python 3 TESTS 53 670 24268800 1600
46770978 problem_solved D Dec. 8, 2018, 4:57 p.m. OK Python 3 TESTS 53 701 22220800 1600
46117454 nikitoz D Nov. 23, 2018, 2:34 p.m. OK Rust TESTS 53 124 8806400 1600
46538643 sparshgunner12 D Dec. 3, 2018, 10:39 a.m. OK Rust TESTS 53 1762 9728000 1600
46247815 yakamoto D Nov. 26, 2018, 12:28 p.m. OK Scala TESTS 53 607 14336000 1600
57918420 dcordb D July 29, 2019, 3:01 a.m. OK Scala TESTS 53 655 15155200 1600
57918348 dcordb D July 29, 2019, 2:59 a.m. OK Scala TESTS 53 670 15155200 1600
57914083 dcordb D July 28, 2019, 11:16 p.m. OK Scala TESTS 53 716 17510400 1600
57914100 dcordb D July 28, 2019, 11:17 p.m. OK Scala TESTS 53 717 17510400 1600
57918166 dcordb D July 29, 2019, 2:53 a.m. OK Scala TESTS 53 1106 15257600 1600
57914027 dcordb D July 28, 2019, 11:12 p.m. OK Scala TESTS 53 1326 17510400 1600
46886703 hot_yoghurt D Dec. 11, 2018, 1:32 a.m. OK Scala TESTS 53 1544 100556800 1600

remove filters

Back to search problems