Codeforces Round 639 (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
1344 Codeforces Round 639 (Div. 1) FINISHED False 8100 143047499 May 6, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1169 ) D Résumé Review PROGRAMMING binary search greedy math 2700

B"Uh oh! Applications to tech companies are due soon, and you've been procrastinating by doing contests instead! (Let's pretend for now that it is actually possible to get a job in these uncertain times.) You have completed many programming projects. In fact, there are exactly n types of programming projects, and you have completed a_i projects of type i . Your r xc3 xa9sum xc3 xa9 has limited space, but you want to carefully choose them in such a way that maximizes your chances of getting hired. You want to include several projects of the same type to emphasize your expertise, but you also don't want to include so many that the low-quality projects start slipping in. Specifically, you determine the following quantity to be a good indicator of your chances of getting hired: f(b_1, ldots,b_n)= sum limits_{i=1}^n b_i(a_i-b_i^2). Here, b_i denotes the number of projects of type i you include in your r xc3 xa9sum xc3 xa9. Of course, you cannot include more projects than you have completed, so you require 0 <= b_i <= a_i for all i . Your r xc3 xa9sum xc3 xa9 only has enough room for k projects, and you will absolutely not be hired if your r xc3 xa9sum xc3 xa9 has empty space, so you require sum limits_{i=1}^n b_i=k . Find values for b_1, ldots, b_n that maximize the value of f(b_1, ldots,b_n) while satisfying the above two constraints. The first line contains two integers n and k ( 1 <= n <= 10^5 , 1 <= k <= sum limits_{i=1}^n a_i ) -- the number of types of programming projects and the r xc3 xa9sum xc3 xa9 size, respectively. The next line contains n integers a_1, ldots,a_n ( 1 <= a_i <= 10^9 ) -- a_i is equal to the number of completed projects of type i . In a single line, output n integers b_1, ldots, b_n that achieve the maximum value of f(b_1, ldots,b_n) , while satisfying the requirements 0 <= b_i <= a_i and sum limits_{i=1}^n b_i=k . If there are multiple "...

Tutorials

Codeforces Round #639 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
79208473 Gassa D May 6, 2020, 9:07 p.m. OK D TESTS 50 1669 10854400 2700
79380797 Gassa D May 8, 2020, 1:13 p.m. OK D TESTS 50 1716 10854400 2700
79188668 hos.lyric D May 6, 2020, 3:45 p.m. OK D TESTS 50 3244 18227200 2700
79190850 physics0523 D May 6, 2020, 3:50 p.m. OK GNU C11 TESTS 50 2418 20480000 2700
79350373 suncongbo D May 8, 2020, 6:29 a.m. OK GNU C++11 TESTS 50 218 6348800 2700
79267708 myx12345 D May 7, 2020, 12:17 p.m. OK GNU C++11 TESTS 50 249 9318400 2700
79226265 Qza_AC D May 7, 2020, 3:48 a.m. OK GNU C++11 TESTS 50 265 6144000 2700
79245441 Lagoon_ D May 7, 2020, 7:49 a.m. OK GNU C++11 TESTS 50 327 6348800 2700
79430500 1tthinking D May 9, 2020, 4:37 a.m. OK GNU C++11 TESTS 50 327 8396800 2700
79215653 JoviAlitY D May 6, 2020, 11:52 p.m. OK GNU C++11 TESTS 50 327 11878400 2700
79368831 PedyD D May 8, 2020, 10:41 a.m. OK GNU C++11 TESTS 50 358 7065600 2700
79446459 stevenzhang D May 9, 2020, 8:55 a.m. OK GNU C++11 TESTS 50 483 7168000 2700
79196879 jxdxhy D May 6, 2020, 4:13 p.m. OK GNU C++11 TESTS 50 701 7065600 2700
79263765 xtqqwq D May 7, 2020, 11:32 a.m. OK GNU C++11 TESTS 50 857 7065600 2700
79322167 Will_Dearborn D May 7, 2020, 7:35 p.m. OK GNU C++14 TESTS 50 140 6963200 2700
79450839 fa_555 D May 9, 2020, 9:53 a.m. OK GNU C++14 TESTS 50 249 5939200 2700
79324380 Motarack D May 7, 2020, 8:11 p.m. OK GNU C++14 TESTS 50 249 6144000 2700
79258716 yan-zp D May 7, 2020, 10:32 a.m. OK GNU C++14 TESTS 50 280 8499200 2700
79304114 thebes D May 7, 2020, 3:47 p.m. OK GNU C++14 TESTS 50 312 5324800 2700
79304193 thebes D May 7, 2020, 3:47 p.m. OK GNU C++14 TESTS 50 312 5324800 2700
79334860 cz_xuyixuan D May 8, 2020, 12:44 a.m. OK GNU C++14 TESTS 50 327 4505600 2700
79237132 ainta D May 7, 2020, 6:20 a.m. OK GNU C++14 TESTS 50 389 10137600 2700
79307627 ekrem MURAT_ECEM_EKICI D May 7, 2020, 4:22 p.m. OK GNU C++14 TESTS 50 842 10137600 2700
79312205 vsriram1012 D May 7, 2020, 5:18 p.m. OK GNU C++14 TESTS 50 920 10342400 2700
79197612 squarepants D May 6, 2020, 4:17 p.m. OK GNU C++17 TESTS 50 155 10137600 2700
79273618 KostasKostil D May 7, 2020, 1:25 p.m. OK GNU C++17 TESTS 50 233 10649600 2700
79346939 tloinuy D May 8, 2020, 5:40 a.m. OK GNU C++17 TESTS 50 249 5017600 2700
79253857 nickIuo D May 7, 2020, 9:29 a.m. OK GNU C++17 TESTS 50 249 5120000 2700
79258141 okwedook D May 7, 2020, 10:24 a.m. OK GNU C++17 TESTS 50 249 5324800 2700
79363464 abcdefghi_j D May 8, 2020, 9:28 a.m. OK GNU C++17 TESTS 50 249 10035200 2700
79229167 Pa.Nic D May 7, 2020, 4:34 a.m. OK GNU C++17 TESTS 50 264 6451200 2700
79253893 lqs2015 D May 7, 2020, 9:29 a.m. OK GNU C++17 TESTS 50 265 5017600 2700
79212291 IsaacMoris D May 6, 2020, 10:27 p.m. OK GNU C++17 TESTS 50 280 5632000 2700
79294871 VietaFan D May 7, 2020, 2:41 p.m. OK GNU C++17 TESTS 50 280 6144000 2700
79258109 okwedook D May 7, 2020, 10:24 a.m. OK GNU C++17 (64) TESTS 50 62 5939200 2700
79257534 okwedook D May 7, 2020, 10:16 a.m. OK GNU C++17 (64) TESTS 50 92 5939200 2700
79210745 Temotoloraia D May 6, 2020, 9:55 p.m. OK GNU C++17 (64) TESTS 50 93 7475200 2700
79349050 autoint D May 8, 2020, 6:11 a.m. OK GNU C++17 (64) TESTS 50 109 5120000 2700
79209984 ecnerwala D May 6, 2020, 9:41 p.m. OK GNU C++17 (64) TESTS 50 124 7577600 2700
79303089 RiverHamster D May 7, 2020, 3:38 p.m. OK GNU C++17 (64) TESTS 50 155 6758400 2700
79190663 aryanc403 D May 6, 2020, 3:50 p.m. OK GNU C++17 (64) TESTS 50 156 10342400 2700
79227668 emengdeath D May 7, 2020, 4:10 a.m. OK GNU C++17 (64) TESTS 50 171 5836800 2700
79200953 Swistakk D May 6, 2020, 4:39 p.m. OK GNU C++17 (64) TESTS 50 186 12288000 2700
79219543 iaNTU D May 7, 2020, 1:36 a.m. OK GNU C++17 (64) TESTS 50 187 10137600 2700
79355476 VArtem D May 8, 2020, 7:40 a.m. OK Java 11 TESTS 50 514 24064000 2700
79346568 uwi D May 8, 2020, 5:36 a.m. OK Java 11 TESTS 50 2245 24268800 2700
79221860 cwise D May 7, 2020, 2:31 a.m. OK Java 8 TESTS 50 1715 26009600 2700
79215100 SecondThread D May 6, 2020, 11:37 p.m. OK Java 8 TESTS 50 2043 26419200 2700
79208588 Harpae D May 6, 2020, 9:11 p.m. OK Java 8 TESTS 50 2839 24883200 2700
79211812 Tlatoani D May 6, 2020, 10:16 p.m. OK Kotlin TESTS 50 3993 28672000 2700
79431785 P___ D May 9, 2020, 5:08 a.m. OK MS C++ 2017 TESTS 50 2792 5632000 2700
79211928 pajenegod D May 6, 2020, 10:19 p.m. OK PyPy 2 TESTS 50 3260 35225600 2700
79211985 pajenegod D May 6, 2020, 10:20 p.m. OK PyPy 2 TESTS 50 3821 34508800 2700

remove filters

Back to search problems