Educational Codeforces Round 42 (Rated for 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
962 Educational Codeforces Round 42 (Rated for Div. 2) FINISHED False 7200 214154723 April 10, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6992 ) D Merge Equals PROGRAMMING data structures implementation 1600

B'You are given an array of positive integers. While there are at least two equal elements, we will perform the following operation. We choose the smallest value x that occurs in the array 2 or more times. Take the first two occurrences of x in this array (the two leftmost occurrences). Remove the left of these two occurrences, and the right one is replaced by the sum of this two values (that is, 2 cdot x ). Determine how the array will look after described operations are performed. For example, consider the given array looks like [3, 4, 1, 2, 2, 1, 1] . It will be changed in the following way: [3, 4, 1, 2, 2, 1, 1]~ rightarrow~[3, 4, 2, 2, 2, 1]~ rightarrow~[3, 4, 4, 2, 1]~ rightarrow~[3, 8, 2, 1] . If the given array is look like [1, 1, 3, 1, 1] it will be changed in the following way: [1, 1, 3, 1, 1]~ rightarrow~[2, 3, 1, 1]~ rightarrow~[2, 3, 2]~ rightarrow~[3, 4] . The first line contains a single integer n ( 2 <= n <= 150 ,000 ) -- the number of elements in the array. The second line contains a sequence from n elements a_1, a_2, ... , a_n ( 1 <= a_i <= 10^{9} ) -- the elements of the array. In the first line print an integer k -- the number of elements in the array after all the performed operations. In the second line print k integers -- the elements of the array after all the performed operations. The first two examples were considered in the statement. In the third example all integers in the given array are distinct, so it will not change. '...

Tutorials

Educational Codeforces Round 42 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40190704 vjudge5 D July 11, 2018, 6:25 a.m. OK Clang++17 Diagnostics TESTS 26 1513 31948800 1600
40190692 sakurakatana D July 11, 2018, 6:24 a.m. OK Clang++17 Diagnostics TESTS 26 1513 35020800 1600
37677368 agibson D April 28, 2018, 6:15 a.m. OK D TESTS 26 467 57958400 1600
38655829 s97383114 D May 27, 2018, 1:02 p.m. OK FPC TESTS 26 358 3584000 1600
37182174 Slonik D April 10, 2018, 10:17 p.m. OK FPC TESTS 26 468 7884800 1600
52672712 chaorenhaha D April 13, 2019, 8:14 a.m. OK FPC TESTS 26 530 4812800 1600
37328664 AHTOH._. D April 14, 2018, 1:22 p.m. OK FPC TESTS 26 561 6656000 1600
38611511 Sooke D May 25, 2018, 2:12 p.m. OK GNU C++ TESTS 26 93 3379200 1600
40932402 ReaLNero1 D July 30, 2018, 1:46 a.m. OK GNU C++ TESTS 26 93 8294400 1600
37236542 luogu_bot2 D April 12, 2018, 12:26 a.m. OK GNU C++ TESTS 26 93 11776000 1600
37372726 zgyw D April 16, 2018, 12:47 p.m. OK GNU C++ TESTS 26 108 12185600 1600
41904442 vjudge1 D Aug. 20, 2018, 1:51 p.m. OK GNU C++ TESTS 26 109 7372800 1600
37356241 vjudge1 D April 15, 2018, 3:03 p.m. OK GNU C++ TESTS 26 109 10854400 1600
37212766 huas_teble D April 11, 2018, 9:49 a.m. OK GNU C++ TESTS 26 109 10956800 1600
37212403 huas_teble D April 11, 2018, 9:38 a.m. OK GNU C++ TESTS 26 109 10956800 1600
37508450 gggl D April 21, 2018, 8:37 a.m. OK GNU C++ TESTS 26 109 11264000 1600
37173801 tanruidd D April 10, 2018, 4:32 p.m. OK GNU C++ TESTS 26 109 13414400 1600
51868792 rainboy D March 26, 2019, 4:26 p.m. OK GNU C11 TESTS 26 592 4403200 1600
49899994 chenxiaoyan D Feb. 14, 2019, 8:51 a.m. OK GNU C++11 TESTS 26 93 4812800 1600
49893173 MaxYellow D Feb. 14, 2019, 5:33 a.m. OK GNU C++11 TESTS 26 93 6144000 1600
49893293 wangyi444 D Feb. 14, 2019, 5:37 a.m. OK GNU C++11 TESTS 26 93 6144000 1600
46700099 Emma194 D Dec. 7, 2018, 12:53 a.m. OK GNU C++11 TESTS 26 93 7577600 1600
58573080 hs-black D Aug. 11, 2019, 11:08 a.m. OK GNU C++11 TESTS 26 93 8704000 1600
49777269 Juanzhang D Feb. 11, 2019, 4 p.m. OK GNU C++11 TESTS 26 108 7475200 1600
45036377 Exbit D Oct. 29, 2018, 7:57 a.m. OK GNU C++11 TESTS 26 108 7475200 1600
49777392 luogu_bot4 D Feb. 11, 2019, 4:03 p.m. OK GNU C++11 TESTS 26 108 7475200 1600
42819510 tall15421542 D Sept. 13, 2018, 5:05 a.m. OK GNU C++11 TESTS 26 108 8396800 1600
37293340 Jiangxiewei D April 13, 2018, 5:09 p.m. OK GNU C++11 TESTS 26 108 8704000 1600
49897536 NoReGet D Feb. 14, 2019, 7:41 a.m. OK GNU C++14 TESTS 26 93 6144000 1600
38694333 greenblade D May 28, 2018, 12:40 p.m. OK GNU C++14 TESTS 26 109 6348800 1600
41084376 dafeng D Aug. 1, 2018, 1:30 p.m. OK GNU C++14 TESTS 26 109 7782400 1600
49892510 luogu_bot2 D Feb. 14, 2019, 5:05 a.m. OK GNU C++14 TESTS 26 109 8192000 1600
49927384 shifanyiakioi D Feb. 15, 2019, 12:42 a.m. OK GNU C++14 TESTS 26 124 6144000 1600
54452854 AQT D May 21, 2019, 2:24 p.m. OK GNU C++14 TESTS 26 124 7577600 1600
48097091 ...nEhrA D Jan. 8, 2019, 5:34 p.m. OK GNU C++14 TESTS 26 124 7577600 1600
39749796 aeternalis1 D June 28, 2018, 5:32 p.m. OK GNU C++14 TESTS 26 124 7577600 1600
56242146 itisNotMe D June 28, 2019, 7 p.m. OK GNU C++14 TESTS 26 124 7577600 1600
51745979 vjudge2 D March 23, 2019, 7:39 a.m. OK GNU C++14 TESTS 26 124 8704000 1600
49894454 ppap_love D Feb. 14, 2019, 6:13 a.m. OK GNU C++17 TESTS 26 93 6144000 1600
49892503 sir.kay D Feb. 14, 2019, 5:04 a.m. OK GNU C++17 TESTS 26 93 8192000 1600
49892506 vjudge1 D Feb. 14, 2019, 5:05 a.m. OK GNU C++17 TESTS 26 108 8192000 1600
49894306 ppap_love D Feb. 14, 2019, 6:08 a.m. OK GNU C++17 TESTS 26 109 6144000 1600
49897111 eddysboy D Feb. 14, 2019, 7:28 a.m. OK GNU C++17 TESTS 26 109 6144000 1600
48419941 vjudge4 D Jan. 15, 2019, 12:26 p.m. OK GNU C++17 TESTS 26 109 7782400 1600
49892264 Alphagocc D Feb. 14, 2019, 4:51 a.m. OK GNU C++17 TESTS 26 109 9523200 1600
49896602 BlahDuckling747 D Feb. 14, 2019, 7:14 a.m. OK GNU C++17 TESTS 26 124 6144000 1600
49893116 zekun D Feb. 14, 2019, 5:30 a.m. OK GNU C++17 TESTS 26 124 7577600 1600
48420017 Pisces0311 D Jan. 15, 2019, 12:28 p.m. OK GNU C++17 TESTS 26 124 7782400 1600
46694823 ak_j17_258749 D Dec. 6, 2018, 6:49 p.m. OK Go TESTS 26 124 9728000 1600
43645027 Marii D Oct. 1, 2018, 1:23 p.m. OK Go TESTS 26 498 14233600 1600
37795834 snu_snu D May 1, 2018, 10:53 a.m. OK Go TESTS 26 561 34304000 1600
37389710 sl0th D April 17, 2018, 7:59 a.m. OK Haskell TESTS 26 1559 96460800 1600
38116050 nieru D May 11, 2018, 1:53 p.m. OK Haskell TESTS 26 1590 95436800 1600
45651089 m1_k3 D Nov. 13, 2018, 1:26 a.m. OK Java 8 TESTS 26 217 14848000 1600
69548731 Katushechka D Jan. 26, 2020, 5:10 a.m. OK Java 8 TESTS 26 233 10854400 1600
37211859 umang._.panchal D April 11, 2018, 9:16 a.m. OK Java 8 TESTS 26 233 27443200 1600
46714476 kusomushi D Dec. 7, 2018, 10:17 a.m. OK Java 8 TESTS 26 234 14131200 1600
37346258 i_m_Shakil D April 15, 2018, 7:08 a.m. OK Java 8 TESTS 26 234 26726400 1600
37417900 tyuan73 D April 17, 2018, 7:09 p.m. OK Java 8 TESTS 26 248 26624000 1600
37211803 umang._.panchal D April 11, 2018, 9:14 a.m. OK Java 8 TESTS 26 249 27443200 1600
37223601 Mihir_Gajera1 D April 11, 2018, 12:47 p.m. OK Java 8 TESTS 26 249 41267200 1600
40252148 prabhat236218 D July 13, 2018, 6:51 a.m. OK Java 8 TESTS 26 265 50995200 1600
37180335 mDziewanowski D April 10, 2018, 7:55 p.m. OK Java 8 TESTS 26 280 27545600 1600
37244851 juztoss D April 12, 2018, 9:58 a.m. OK Kotlin TESTS 26 592 37068800 1600
48421489 vjudge3 D Jan. 15, 2019, 1:01 p.m. OK Kotlin TESTS 26 935 2560000 1600
48421433 lumia_li D Jan. 15, 2019, 12:59 p.m. OK Kotlin TESTS 26 951 2560000 1600
37289981 AnatolyTolstobrov D April 13, 2018, 3:39 p.m. OK Mono C# TESTS 26 109 35020800 1600
57196383 og.kostya D July 17, 2019, 12:20 p.m. OK Mono C# TESTS 26 202 31744000 1600
38976835 dharm0us D June 5, 2018, 6:42 p.m. OK Mono C# TESTS 26 374 40960000 1600
37373078 liomvse D April 16, 2018, 12:59 p.m. OK Mono C# TESTS 26 389 40960000 1600
37174828 nixmulta D April 10, 2018, 4:38 p.m. OK Mono C# TESTS 26 452 61030400 1600
42313724 mid_or_feed D Aug. 31, 2018, 3:54 p.m. OK Mono C# TESTS 26 483 53145600 1600
37835686 BullSprite D May 2, 2018, 9:44 a.m. OK Mono C# TESTS 26 514 31539200 1600
37222803 YiZhang-Paul D April 11, 2018, 12:26 p.m. OK Mono C# TESTS 26 514 62054400 1600
37227723 YiZhang-Paul D April 11, 2018, 3:05 p.m. OK Mono C# TESTS 26 545 62054400 1600
37221153 YiZhang-Paul D April 11, 2018, 11:36 a.m. OK Mono C# TESTS 26 576 62054400 1600
48420112 vjudge5 D Jan. 15, 2019, 12:30 p.m. OK MS C++ TESTS 26 109 7270400 1600
37185901 lanran2001 D April 11, 2018, 4:03 a.m. OK MS C++ TESTS 26 139 8192000 1600
46760030 vjudge4 D Dec. 8, 2018, 12:58 p.m. OK MS C++ TESTS 26 139 9216000 1600
37420569 MOVSES1 D April 17, 2018, 9:55 p.m. OK MS C++ TESTS 26 139 10752000 1600
46406476 vjudge3 D Nov. 30, 2018, 2:51 p.m. OK MS C++ TESTS 26 139 22016000 1600
37420604 MOVSES1 D April 17, 2018, 9:58 p.m. OK MS C++ TESTS 26 140 10752000 1600
46767844 vjudge3 D Dec. 8, 2018, 3:17 p.m. OK MS C++ TESTS 26 140 12390400 1600
52291083 vjudge2 D April 4, 2019, 1:47 a.m. OK MS C++ TESTS 26 155 8499200 1600
53307553 vjudge5 D April 26, 2019, 4:09 a.m. OK MS C++ TESTS 26 155 8806400 1600
46744604 vjudge5 D Dec. 8, 2018, 6:05 a.m. OK MS C++ TESTS 26 155 9011200 1600
54005924 Extraordinary_ D May 11, 2019, 7:58 p.m. OK MS C++ 2017 TESTS 26 451 31027200 1600
37458794 dfxgfdh D April 19, 2018, 11:04 a.m. OK PascalABC.NET TESTS 26 811 23859200 1600
37458812 dfxgfdh D April 19, 2018, 11:05 a.m. OK PascalABC.NET TESTS 26 841 23859200 1600
68986209 vjudge2 D Jan. 17, 2020, 12:35 p.m. OK PyPy 2 TESTS 26 217 25804800 1600
37383706 amr.magdy D April 16, 2018, 10:31 p.m. OK PyPy 2 TESTS 26 702 51712000 1600
41468530 Onesh0t D Aug. 11, 2018, 12:19 p.m. OK PyPy 2 TESTS 26 1325 19968000 1600
37174136 fromexptolog D April 10, 2018, 4:33 p.m. OK PyPy 2 TESTS 26 1559 51609600 1600
39762538 jst_forfun D June 29, 2018, 8:20 a.m. OK PyPy 3 TESTS 26 436 39424000 1600
69091779 shubham26857 D Jan. 19, 2020, 10:25 a.m. OK PyPy 3 TESTS 26 499 19968000 1600
37179947 Soul_Silver D April 10, 2018, 7:33 p.m. OK PyPy 3 TESTS 26 701 52121600 1600
68986783 vjudge4 D Jan. 17, 2020, 12:47 p.m. OK PyPy 3 TESTS 26 872 22425600 1600
37178902 and800 D April 10, 2018, 6:39 p.m. OK PyPy 3 TESTS 26 1356 67993600 1600
37173906 fromexptolog D April 10, 2018, 4:32 p.m. OK PyPy 3 TESTS 26 1575 54784000 1600
37235809 davidzhou D April 11, 2018, 10:43 p.m. OK Python 2 TESTS 26 530 24576000 1600
37309381 nealzane D April 14, 2018, 6:13 a.m. OK Python 2 TESTS 26 592 29388800 1600
41468539 Onesh0t D Aug. 11, 2018, 12:19 p.m. OK Python 2 TESTS 26 639 20070400 1600
56395536 soumyasarkar1998 D July 1, 2019, 2:26 p.m. OK Python 2 TESTS 26 1606 15257600 1600
37176702 dream_on D April 10, 2018, 5:15 p.m. OK Python 2 TESTS 26 1700 27443200 1600
37176730 itachi D April 10, 2018, 5:15 p.m. OK Python 2 TESTS 26 1731 27648000 1600
37243490 KkJj D April 12, 2018, 8:56 a.m. OK Python 2 TESTS 26 1964 35225600 1600
38607063 omarnvidia D May 25, 2018, 11:18 a.m. OK Python 3 TESTS 26 249 25395200 1600
37177025 MartiBook D April 10, 2018, 5:25 p.m. OK Python 3 TESTS 26 296 27033600 1600
37211136 joe_joe D April 11, 2018, 8:48 a.m. OK Python 3 TESTS 26 343 29286400 1600
48310661 saku7 D Jan. 13, 2019, 1:09 a.m. OK Python 3 TESTS 26 405 13926400 1600
47774638 jisuangailun D Dec. 31, 2018, 2:29 a.m. OK Python 3 TESTS 26 420 13004800 1600
37177130 thisishaoyu D April 10, 2018, 5:29 p.m. OK Python 3 TESTS 26 436 28262400 1600
37377461 crysoberil D April 16, 2018, 3:51 p.m. OK Python 3 TESTS 26 467 70246400 1600
37705713 mHr029 D April 29, 2018, 10:15 a.m. OK Python 3 TESTS 26 483 20889600 1600
39001608 chinababka D June 6, 2018, 6:14 p.m. OK Python 3 TESTS 26 498 13004800 1600
39449894 Vasiliy_48 D June 21, 2018, 3:13 a.m. OK Python 3 TESTS 26 498 16486400 1600
37547670 Emerson D April 23, 2018, 9:57 a.m. OK Rust TESTS 26 109 20172800 1600
37658129 vamsi1281977 D April 27, 2018, 11:08 a.m. OK Rust TESTS 26 124 12800000 1600
37653370 vamsi1281977 D April 27, 2018, 7:22 a.m. OK Rust TESTS 26 140 12800000 1600
37731879 pschuprikov D April 29, 2018, 6:45 p.m. OK Rust TESTS 26 202 28364800 1600
41575963 kobae964 D Aug. 14, 2018, 4:47 a.m. OK Rust TESTS 26 280 121958400 1600

remove filters

Back to search problems