Codeforces Round 339 (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
613 Codeforces Round 339 (Div. 1) FINISHED False 7200 279033899 Jan. 14, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2236 ) B Skills PROGRAMMING binary search brute force dp greedy sortings two pointers 2200

B"Lesha plays the recently published new version of the legendary game hacknet. In this version character skill mechanism was introduced. Now, each player character has exactly n skills. Each skill is represented by a non-negative integer ai -- the current skill level. All skills have the same maximum level A. Along with the skills, global ranking of all players was added. Players are ranked according to the so-called Force. The Force of a player is the sum of the following values: Now Lesha has m hacknetian currency units, which he is willing to spend. Each currency unit can increase the current level of any skill by 1 (if it's not equal to A yet). Help him spend his money in order to achieve the maximum possible value of the Force. The first line of the input contains five space-separated integers n, A, cf, cm and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89A xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89cf, xe2 x80 x89cm xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891015). The second line contains exactly n integers ai (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89A), separated by spaces, -- the current levels of skills. On the first line print the maximum value of the Force that the character can achieve using no more than m currency units. On the second line print n integers a'i (ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a'i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89A), skill levels which one must achieve in order to reach the specified value of the Force, while using no more than m currency units. Numbers should be separated by spaces. In the first test the optimal strategy is to increase the second skill to its maximum, and increase the two others by 1. In the second test one should increase all skills to maximum."...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
15375818 Gassa B Jan. 14, 2016, 7:56 p.m. OK D TESTS 35 514 12390400 2200
18869317 Gray_58 B July 3, 2016, 3:12 p.m. OK FPC TESTS 35 249 8192000 2200
15780884 ez_zkj B Feb. 4, 2016, 4:10 a.m. OK FPC TESTS 35 327 3174400 2200
15752261 hardworkingtush B Feb. 2, 2016, 2:37 p.m. OK GNU C TESTS 35 77 1638400 2200
17980641 jszyxw B May 18, 2016, 1:43 p.m. OK GNU C++ TESTS 35 46 5324800 2200
17979653 __debug B May 18, 2016, 12:36 p.m. OK GNU C++ TESTS 35 46 5324800 2200
17979673 vjtest B May 18, 2016, 12:37 p.m. OK GNU C++ TESTS 35 46 5427200 2200
22926568 vjudge1 B Dec. 13, 2016, 12:52 p.m. OK GNU C++ TESTS 35 46 7270400 2200
15452026 chitanda B Jan. 20, 2016, 11:11 a.m. OK GNU C++ TESTS 35 62 1433600 2200
15827294 sfiction B Feb. 5, 2016, 2:33 p.m. OK GNU C++ TESTS 35 62 1843200 2200
15379096 Lightning34 B Jan. 14, 2016, 11:14 p.m. OK GNU C++ TESTS 35 62 2048000 2200
16866460 kevinkitty B March 22, 2016, 6:03 a.m. OK GNU C++ TESTS 35 62 3072000 2200
15549542 1243France B Jan. 24, 2016, 7:33 a.m. OK GNU C++ TESTS 35 62 3174400 2200
18437495 Andrew_Makar B June 13, 2016, 9:05 p.m. OK GNU C++ TESTS 35 62 4198400 2200
59626025 rainboy B Aug. 28, 2019, 3:58 p.m. OK GNU C11 TESTS 35 405 1638400 2200
41414896 Scut82 B Aug. 10, 2018, 1:37 a.m. OK GNU C++11 TESTS 35 46 2048000 2200
15394266 khatribiru B Jan. 15, 2016, 7:23 p.m. OK GNU C++11 TESTS 35 46 7987200 2200
22126361 Meowww B Nov. 9, 2016, 8:53 a.m. OK GNU C++11 TESTS 35 61 2969600 2200
15838496 dhh1995 B Feb. 6, 2016, 7:51 a.m. OK GNU C++11 TESTS 35 62 1331200 2200
15380987 johnathan79717 B Jan. 15, 2016, 3:14 a.m. OK GNU C++11 TESTS 35 62 1945600 2200
15406735 SandTea B Jan. 16, 2016, 5:04 p.m. OK GNU C++11 TESTS 35 62 2048000 2200
15427290 etfl B Jan. 18, 2016, 1:03 p.m. OK GNU C++11 TESTS 35 62 2048000 2200
15367045 lavin B Jan. 14, 2016, 5:59 p.m. OK GNU C++11 TESTS 35 62 2252800 2200
15369064 kb. B Jan. 14, 2016, 6:11 p.m. OK GNU C++11 TESTS 35 62 2457600 2200
15373944 12121005 B Jan. 14, 2016, 7:14 p.m. OK GNU C++11 TESTS 35 62 2764800 2200
35106417 majk B Feb. 9, 2018, 9:51 p.m. OK GNU C++14 TESTS 35 62 5529600 2200
54545078 walht B May 24, 2019, 5:38 a.m. OK GNU C++14 TESTS 35 77 1638400 2200
22193301 NiroBC B Nov. 13, 2016, 1:03 p.m. OK GNU C++14 TESTS 35 77 1945600 2200
32601571 ekzhang B Nov. 23, 2017, 6:16 p.m. OK GNU C++14 TESTS 35 77 3072000 2200
30299575 193s B Sept. 13, 2017, 5:34 a.m. OK GNU C++14 TESTS 35 77 3686400 2200
24269796 ccsnoopy B Jan. 30, 2017, 2:45 p.m. OK GNU C++14 TESTS 35 77 3891200 2200
28693446 Deanamic_Programming B July 19, 2017, 10:28 a.m. OK GNU C++14 TESTS 35 77 4710400 2200
20960095 abdullah009 B Sept. 28, 2016, 4:55 a.m. OK GNU C++14 TESTS 35 78 3174400 2200
68033923 hkyiitd B Jan. 1, 2020, 10:56 a.m. OK GNU C++14 TESTS 35 78 3174400 2200
23385615 Ali.Pi B Dec. 28, 2016, 7:31 p.m. OK GNU C++14 TESTS 35 78 3891200 2200
67387004 Rahul B Dec. 21, 2019, 6:09 p.m. OK GNU C++17 TESTS 35 78 2048000 2200
52586458 KevinWan B April 11, 2019, 12:38 a.m. OK GNU C++17 TESTS 35 78 3993600 2200
37704759 q234rty B April 29, 2018, 9:16 a.m. OK GNU C++17 TESTS 35 78 16588800 2200
67386391 Rahul B Dec. 21, 2019, 5:58 p.m. OK GNU C++17 TESTS 35 93 2048000 2200
39697473 pushpendra1997 B June 27, 2018, 9:44 a.m. OK GNU C++17 TESTS 35 93 2457600 2200
51162173 XiaoWu B March 11, 2019, 12:51 p.m. OK GNU C++17 TESTS 35 93 2457600 2200
50145177 vjudge1 B Feb. 19, 2019, 3:14 a.m. OK GNU C++17 TESTS 35 93 3174400 2200
65546642 fgt B Nov. 22, 2019, 5:22 p.m. OK GNU C++17 TESTS 35 93 3174400 2200
56747297 Felerius B July 9, 2019, 10:22 a.m. OK GNU C++17 TESTS 35 93 3174400 2200
40778481 Ashishgup B July 26, 2018, 12:31 p.m. OK GNU C++17 TESTS 35 93 3174400 2200
15360875 Petr B Jan. 14, 2016, 5:28 p.m. OK Java 7 TESTS 35 202 716800 2200
17804778 228 B May 8, 2016, 8:26 a.m. OK Java 7 TESTS 35 264 44544000 2200
16965263 niting112 B March 27, 2016, 5:20 a.m. OK Java 7 TESTS 35 748 39526400 2200
15688874 donli B Jan. 31, 2016, 4:09 a.m. OK Java 8 TESTS 35 186 0 2200
15365414 Egor B Jan. 14, 2016, 5:50 p.m. OK Java 8 TESTS 35 187 0 2200
15352004 pashka B Jan. 14, 2016, 4:54 p.m. OK Java 8 TESTS 35 187 0 2200
15378051 AlexFetisov B Jan. 14, 2016, 9:30 p.m. OK Java 8 TESTS 35 202 0 2200
15368071 edorundo B Jan. 14, 2016, 6:05 p.m. OK Java 8 TESTS 35 218 0 2200
42757870 ShowStopper728 B Sept. 11, 2018, 8:34 a.m. OK Java 8 TESTS 35 233 0 2200
15370433 pitfall B Jan. 14, 2016, 6:19 p.m. OK Java 8 TESTS 35 233 307200 2200
15373849 qwerty787788 B Jan. 14, 2016, 7:10 p.m. OK Java 8 TESTS 35 234 0 2200
16223440 Sinner B Feb. 20, 2016, 6:26 a.m. OK Java 8 TESTS 35 249 0 2200
50566150 hongquanntct B Feb. 27, 2019, 1:14 p.m. OK Java 8 TESTS 35 265 4096000 2200
15384788 og.kostya B Jan. 15, 2016, 8:15 a.m. OK MS C# TESTS 35 93 5734400 2200
15373710 og.kostya B Jan. 14, 2016, 7:05 p.m. OK MS C# TESTS 35 108 5734400 2200
17697010 camypaper B May 3, 2016, 10:11 a.m. OK MS C# TESTS 35 935 22835200 2200
15387622 vanvector B Jan. 15, 2016, 11:41 a.m. OK MS C++ TESTS 35 77 2048000 2200
15361282 Hasan0540 B Jan. 14, 2016, 5:30 p.m. OK MS C++ TESTS 35 77 2048000 2200
15366356 MrKaStep B Jan. 14, 2016, 5:56 p.m. OK MS C++ TESTS 35 77 2457600 2200
15361409 TonySnark B Jan. 14, 2016, 5:30 p.m. OK MS C++ TESTS 35 78 1638400 2200
16054133 vjudge3 B Feb. 16, 2016, 10:40 a.m. OK MS C++ TESTS 35 78 2457600 2200
15633145 Mushegh B Jan. 28, 2016, 4:39 p.m. OK MS C++ TESTS 35 78 3174400 2200
15451857 yungchienliu B Jan. 20, 2016, 10:59 a.m. OK MS C++ TESTS 35 78 3993600 2200
15374112 dergach B Jan. 14, 2016, 7:22 p.m. OK MS C++ TESTS 35 93 1228800 2200
15369866 Taube B Jan. 14, 2016, 6:16 p.m. OK MS C++ TESTS 35 93 2048000 2200
50147376 vjudge1 B Feb. 19, 2019, 5:17 a.m. OK MS C++ TESTS 35 93 2457600 2200
56643186 wjhwjhn B July 7, 2019, 4:02 a.m. OK MS C++ 2017 TESTS 35 436 2048000 2200
56643215 wjhwjhn B July 7, 2019, 4:04 a.m. OK MS C++ 2017 TESTS 35 452 2048000 2200
35895804 ______n______ B March 3, 2018, 4:52 p.m. OK PyPy 3 TESTS 35 1169 37888000 2200
35895726 ______u______ B March 3, 2018, 4:52 p.m. OK PyPy 3 TESTS 35 1169 37888000 2200
35895557 _____i_____ B March 3, 2018, 4:47 p.m. OK PyPy 3 TESTS 35 1169 37888000 2200
35893285 ______i______ B March 3, 2018, 3:47 p.m. OK PyPy 3 TESTS 35 1169 37888000 2200
35887589 ______h______ B March 3, 2018, 2:07 p.m. OK PyPy 3 TESTS 35 1169 37888000 2200
35887182 ______k______ B March 3, 2018, 1:59 p.m. OK PyPy 3 TESTS 35 1169 37888000 2200
35884334 ______M______ B March 3, 2018, 1:09 p.m. OK PyPy 3 TESTS 35 1169 37888000 2200
33277741 yugle7 B Dec. 15, 2017, 9:56 p.m. OK PyPy 3 TESTS 35 1372 46182400 2200
15438013 orailly B Jan. 19, 2016, 9:49 a.m. OK Python 3 TESTS 35 405 17510400 2200
42128223 Mk_Python_v1 B Aug. 26, 2018, 4:39 p.m. OK Python 3 TESTS 35 529 17715200 2200
15377652 cugel B Jan. 14, 2016, 9:03 p.m. OK Python 3 TESTS 35 1045 16486400 2200

remove filters

Back to search problems