Codeforces Round 431 (Div. 1)

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
848 Codeforces Round 431 (Div. 1) FINISHED False 7200 232907063 Sept. 1, 2017, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5186 ) A From Y to Y PROGRAMMING constructive algorithms 1600

B'From beginning till end, this message has been waiting to be conveyed. For a given unordered multiset of n lowercase English letters ("multi" means that a letter may appear more than once), we treat all letters as strings of length 1, and repeat the following operation n xe2 x80 x89- xe2 x80 x891 times: The cost of such operation is defined to be , where f(s, xe2 x80 x89c) denotes the number of times character c appears in string s. Given a non-negative integer k, construct any valid non-empty set of no more than 100 xe2 x80 x89000 letters, such that the minimum accumulative cost of the whole process is exactly k. It can be shown that a solution always exists. The first and only line of input contains a non-negative integer k (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000) -- the required minimum cost. Output a non-empty string of no more than 100 xe2 x80 x89000 lowercase English letters -- any multiset satisfying the requirements, concatenated to be a string. Note that the printed string doesn 't need to be the final concatenated string. It only needs to represent an unordered multiset of letters. For the multiset { 'a ', 'b ', 'a ', 'b ', 'a ', 'b ', 'a ', 'b '}, one of the ways to complete the process is as follows: The total cost is 12, and it can be proved to be the minimum cost of the process. '...

Tutorials

Codeforces Round #431 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
29976460 yosupo A Sept. 1, 2017, 1:46 p.m. OK D TESTS 25 15 0 1600
29976749 fluffyowl A Sept. 1, 2017, 1:47 p.m. OK D TESTS 25 15 0 1600
30018868 FalseMirror A Sept. 2, 2017, 6:37 p.m. OK D TESTS 25 15 102400 1600
29975725 Gassa A Sept. 1, 2017, 1:43 p.m. OK D TESTS 25 31 4198400 1600
31267098 KagamiharaNadeshiko A Oct. 13, 2017, 7:03 a.m. OK FPC TESTS 25 15 0 1600
46707185 zjhqg2005 A Dec. 7, 2018, 7:55 a.m. OK FPC TESTS 25 31 0 1600
31030407 shivanya A Oct. 5, 2017, 11:24 a.m. OK GNU C TESTS 25 15 1024000 1600
32323070 llpeace A Nov. 15, 2017, 2:56 a.m. OK GNU C++ TESTS 25 15 0 1600
31705960 vjudge1 A Oct. 25, 2017, 10:50 a.m. OK GNU C++ TESTS 25 15 0 1600
32323058 vjudge5 A Nov. 15, 2017, 2:55 a.m. OK GNU C++ TESTS 25 15 0 1600
31012244 yypurpose12345 A Oct. 5, 2017, 7:14 a.m. OK GNU C++ TESTS 25 15 0 1600
31005233 sunyouth A Oct. 5, 2017, 1:20 a.m. OK GNU C++ TESTS 25 15 0 1600
30836116 PolyAtomicIon Bardell A Sept. 29, 2017, 4:55 p.m. OK GNU C++ TESTS 25 15 0 1600
30513216 090647 A Sept. 19, 2017, 3:59 p.m. OK GNU C++ TESTS 25 15 0 1600
30378699 koPerNik A Sept. 16, 2017, 8 a.m. OK GNU C++ TESTS 25 15 0 1600
30292958 arishadahmed A Sept. 12, 2017, 6:04 p.m. OK GNU C++ TESTS 25 15 0 1600
30292922 Kimia.H A Sept. 12, 2017, 6:02 p.m. OK GNU C++ TESTS 25 15 0 1600
36441525 rishu_cool A March 20, 2018, 7:53 p.m. OK GNU C11 TESTS 25 31 3276800 1600
39182917 ysf A June 12, 2018, 7:02 a.m. OK GNU C++11 TESTS 25 15 0 1600
54408154 bojverdict2 A May 20, 2019, 7:52 a.m. OK GNU C++11 TESTS 25 15 0 1600
39458117 Stepavly A June 21, 2018, 10:10 a.m. OK GNU C++11 TESTS 25 15 0 1600
32288408 edisonhello A Nov. 13, 2017, 3:40 p.m. OK GNU C++11 TESTS 25 15 0 1600
32183001 ericxu0 A Nov. 9, 2017, 11:17 p.m. OK GNU C++11 TESTS 25 15 0 1600
32007224 gregorinio A Nov. 3, 2017, 12:32 p.m. OK GNU C++11 TESTS 25 15 0 1600
31982277 MZuenni A Nov. 2, 2017, 1:55 p.m. OK GNU C++11 TESTS 25 15 0 1600
31216953 vjudge2 A Oct. 11, 2017, 1:04 p.m. OK GNU C++11 TESTS 25 15 0 1600
31187988 yp0413150208 A Oct. 10, 2017, 11:29 a.m. OK GNU C++11 TESTS 25 15 0 1600
31104151 black_horse2014 A Oct. 7, 2017, 7:40 a.m. OK GNU C++11 TESTS 25 15 0 1600
59856510 lazycoder1412 A Sept. 1, 2019, 1:45 p.m. OK GNU C++14 TESTS 25 15 0 1600
60586416 i_love_abacabadabacaba A Sept. 14, 2019, 9:36 p.m. OK GNU C++14 TESTS 25 15 0 1600
56523648 piyush123 A July 4, 2019, 4:07 p.m. OK GNU C++14 TESTS 25 15 0 1600
54830501 vasu2907 A May 30, 2019, 8:42 a.m. OK GNU C++14 TESTS 25 15 0 1600
68827188 _dragon A Jan. 14, 2020, 7:44 p.m. OK GNU C++14 TESTS 25 15 0 1600
54827422 code_name123 A May 30, 2019, 7:15 a.m. OK GNU C++14 TESTS 25 15 0 1600
52875210 akshay_1 A April 16, 2019, 7:12 p.m. OK GNU C++14 TESTS 25 15 0 1600
49552575 DystoriaX A Feb. 7, 2019, 7:13 a.m. OK GNU C++14 TESTS 25 15 0 1600
44967293 Gazra A Oct. 27, 2018, 8:08 p.m. OK GNU C++14 TESTS 25 15 0 1600
60430528 awishkar.ghimire A Sept. 12, 2019, 9:15 a.m. OK GNU C++14 TESTS 25 15 0 1600
52367836 89264270823 A April 6, 2019, 3:39 a.m. OK GNU C++17 TESTS 25 15 0 1600
56886135 5555iq A July 12, 2019, 12:40 p.m. OK GNU C++17 TESTS 25 15 0 1600
56135133 exe A June 26, 2019, 9:12 p.m. OK GNU C++17 TESTS 25 15 0 1600
52016621 AmanGupta_ A March 30, 2019, 10:51 a.m. OK GNU C++17 TESTS 25 15 0 1600
46760193 aki167yuuki A Dec. 8, 2018, 1:03 p.m. OK GNU C++17 TESTS 25 15 0 1600
61104802 mikeleven A Sept. 23, 2019, 8:40 a.m. OK GNU C++17 TESTS 25 15 409600 1600
46022641 zhangjiusi A Nov. 21, 2018, 9:05 a.m. OK GNU C++17 TESTS 25 15 409600 1600
37645047 hmpf A April 26, 2018, 6:35 p.m. OK GNU C++17 TESTS 25 15 3379200 1600
37546987 Notbesidemoon A April 23, 2018, 9:12 a.m. OK GNU C++17 TESTS 25 15 3379200 1600
69153758 Igor_2017 A Jan. 19, 2020, 6:35 p.m. OK GNU C++17 TESTS 25 30 0 1600
30029011 stczhc A Sept. 3, 2017, 10:15 a.m. OK Haskell TESTS 25 15 0 1600
30228348 adnanistics A Sept. 9, 2017, 2:51 p.m. OK Java 8 TESTS 25 93 0 1600
58134279 ajkdrag A Aug. 1, 2019, 3:27 p.m. OK Java 8 TESTS 25 108 0 1600
29996639 antkhorin A Sept. 1, 2017, 8:07 p.m. OK Java 8 TESTS 25 109 0 1600
29978533 Kammola A Sept. 1, 2017, 1:56 p.m. OK Java 8 TESTS 25 109 0 1600
29978469 dusty.and.rusty A Sept. 1, 2017, 1:56 p.m. OK Java 8 TESTS 25 109 0 1600
29978122 gpita A Sept. 1, 2017, 1:54 p.m. OK Java 8 TESTS 25 109 0 1600
29977133 tmwilliamlin168 A Sept. 1, 2017, 1:48 p.m. OK Java 8 TESTS 25 109 0 1600
29976542 fetetriste A Sept. 1, 2017, 1:46 p.m. OK Java 8 TESTS 25 109 0 1600
29975768 uwi A Sept. 1, 2017, 1:43 p.m. OK Java 8 TESTS 25 109 0 1600
29975202 Lewin A Sept. 1, 2017, 1:40 p.m. OK Java 8 TESTS 25 109 0 1600
29978878 .o. A Sept. 1, 2017, 1:58 p.m. OK JavaScript TESTS 25 31 0 1600
29977014 leign A Sept. 1, 2017, 1:48 p.m. OK Mono C# TESTS 25 46 102400 1600
29983782 riantkb A Sept. 1, 2017, 2:37 p.m. OK Mono C# TESTS 25 46 204800 1600
31929265 og.kostya A Oct. 31, 2017, 5:40 p.m. OK MS C# TESTS 25 46 102400 1600
34634347 hitorijanai A Jan. 28, 2018, 1:43 p.m. OK MS C# TESTS 25 46 9318400 1600
29981118 AlexanderL A Sept. 1, 2017, 2:15 p.m. OK MS C# TESTS 25 61 0 1600
29976956 AleksanderBalobanov A Sept. 1, 2017, 1:48 p.m. OK MS C++ TESTS 25 15 0 1600
30817751 Irishmoonshine A Sept. 28, 2017, 11:48 p.m. OK MS C++ TESTS 25 15 0 1600
30015792 ac2496 A Sept. 2, 2017, 3:19 p.m. OK MS C++ TESTS 25 15 0 1600
29978408 xcdxcdxcd A Sept. 1, 2017, 1:55 p.m. OK MS C++ TESTS 25 15 102400 1600
30150583 egj1996 A Sept. 6, 2017, 2:11 p.m. OK MS C++ TESTS 25 15 102400 1600
29998384 KobetheGOAT A Sept. 1, 2017, 11 p.m. OK MS C++ TESTS 25 15 102400 1600
29978833 ferc A Sept. 1, 2017, 1:58 p.m. OK MS C++ TESTS 25 15 204800 1600
29976096 amethyst3 A Sept. 1, 2017, 1:44 p.m. OK MS C++ TESTS 25 15 512000 1600
29977259 miha715lev A Sept. 1, 2017, 1:49 p.m. OK MS C++ TESTS 25 15 921600 1600
57254492 vjudge4 A July 18, 2019, 1:47 a.m. OK MS C++ TESTS 25 31 0 1600
52678434 index_ A April 13, 2019, 10:57 a.m. OK MS C++ 2017 TESTS 25 31 0 1600
51878174 sohailk1999 A March 26, 2019, 8:56 p.m. OK MS C++ 2017 TESTS 25 31 0 1600
33866513 mayakin A Jan. 2, 2018, 3:17 p.m. OK PHP TESTS 25 31 6041600 1600
29995703 Noureldin A Sept. 1, 2017, 7:06 p.m. OK PyPy 2 TESTS 25 77 0 1600
30045168 masonsbro A Sept. 4, 2017, 1:08 a.m. OK PyPy 2 TESTS 25 77 0 1600
30003161 the_silliest A Sept. 2, 2017, 6:39 a.m. OK PyPy 3 TESTS 25 93 0 1600
52678159 hrustim25 A April 13, 2019, 10:48 a.m. OK PyPy 3 TESTS 25 124 0 1600
61298565 luogu_bot4 A Sept. 26, 2019, 3:24 a.m. OK PyPy 3 TESTS 25 140 0 1600
56561104 111vad111 A July 5, 2019, 3:01 p.m. OK PyPy 3 TESTS 25 140 102400 1600
30041733 characterx A Sept. 3, 2017, 6:53 p.m. OK Python 2 TESTS 25 46 0 1600
30039890 tmanohar02 A Sept. 3, 2017, 4:52 p.m. OK Python 2 TESTS 25 61 0 1600
29996131 nealzane A Sept. 1, 2017, 7:34 p.m. OK Python 2 TESTS 25 62 0 1600
29996142 nealzane A Sept. 1, 2017, 7:35 p.m. OK Python 2 TESTS 25 62 0 1600
34992816 laoliumang A Feb. 7, 2018, 8:37 a.m. OK Python 2 TESTS 25 62 4608000 1600
32745570 andryej A Nov. 28, 2017, 9:41 a.m. OK Python 2 TESTS 25 62 4608000 1600
29975111 chaotic_iak A Sept. 1, 2017, 1:39 p.m. OK Python 3 TESTS 25 46 0 1600
30761254 Yusufawzy44 A Sept. 26, 2017, 7:24 p.m. OK Python 3 TESTS 25 61 0 1600
31221080 patrikos A Oct. 11, 2017, 3:49 p.m. OK Python 3 TESTS 25 62 0 1600
30914129 Kuroneko-san A Oct. 1, 2017, 4:38 p.m. OK Python 3 TESTS 25 62 0 1600
29991501 Vosatorp A Sept. 1, 2017, 4:10 p.m. OK Python 3 TESTS 25 62 0 1600
29980093 Boterphile A Sept. 1, 2017, 2:07 p.m. OK Python 3 TESTS 25 62 0 1600
29977403 Iriskinn A Sept. 1, 2017, 1:50 p.m. OK Python 3 TESTS 25 62 0 1600
31124258 StinsonOvO A Oct. 7, 2017, 5:42 p.m. OK Python 3 TESTS 25 77 921600 1600
32082133 pedrofreire A Nov. 5, 2017, 7:04 p.m. OK Python 3 TESTS 25 78 921600 1600
49098609 saku7 A Jan. 28, 2019, 10:37 a.m. OK Python 3 TESTS 25 108 0 1600
30211417 limed A Sept. 8, 2017, 7:18 p.m. OK Scala TESTS 25 295 0 1600

remove filters

Back to search problems