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 |
---|---|---|---|---|---|---|
1428 | Codeforces Raif Round 1 (Div. 1 + Div. 2) | FINISHED | False | 9000 | 128883299 | Oct. 17, 2020, 1:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 580 ) | G1 | Lucky Numbers (Easy Version) | PROGRAMMING | dp greedy |
B"This is the easy version of the problem. The only difference is that in this version q=1 . You can make hacks only if all versions of the problem are solved. Zookeeper has been teaching his q sheep how to write and how to add. The i -th sheep has to write exactly k non-negative integers with the sum n_i . Strangely, sheep have superstitions about digits and believe that the digits 3 , 6 , and 9 are lucky. To them, the fortune of a number depends on the decimal representation of the number; the fortune of a number is equal to the sum of fortunes of its digits, and the fortune of a digit depends on its value and position and can be described by the following table. For example, the number 319 has fortune F_{2} + 3F_{0} . Each sheep wants to maximize the sum of fortune among all its k written integers. Can you help them? The first line contains a single integer k ( 1 <= q k <= q 999999 ): the number of numbers each sheep has to write. The next line contains six integers F_0 , F_1 , F_2 , F_3 , F_4 , F_5 ( 1 <= q F_i <= q 10^9 ): the fortune assigned to each digit. The next line contains a single integer q ( q = 1 ): the number of sheep. Each of the next q lines contains a single integer n_i ( 1 <= q n_i <= q 999999 ): the sum of numbers that i -th sheep has to write. In this version, there is only one line. Print q lines, where the i -th line contains the maximum sum of fortune of all numbers of the i -th sheep. In this version, you should print only one line. In the first test case, 57 = 9 + 9 + 39 . The three 9 's contribute 1 cdot 3 and 3 at the tens position contributes 2 cdot 1 . Hence the sum of fortune is 11 . In the second test case, 63 = 35 + 19 + 9 . The sum of fortune is 8 . "... |
Codeforces Raif Round 1 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
95810552 | lqs2015 | G1 | Oct. 17, 2020, 4:25 p.m. | OK | GNU C++11 | TESTS | 44 | 62 | 62361600 | ||
95832314 | EmptySoulist | G1 | Oct. 18, 2020, 12:21 a.m. | OK | GNU C++11 | TESTS | 46 | 93 | 24064000 | ||
95810399 | yet_another_EmptySoulist | G1 | Oct. 17, 2020, 4:24 p.m. | OK | GNU C++11 | TESTS | 44 | 93 | 24064000 | ||
95837761 | zhoukangyang | G1 | Oct. 18, 2020, 3:44 a.m. | OK | GNU C++11 | TESTS | 46 | 156 | 7987200 | ||
95813804 | s_r_f | G1 | Oct. 17, 2020, 4:57 p.m. | OK | GNU C++11 | TESTS | 44 | 296 | 44134400 | ||
95813545 | jhknmj | G1 | Oct. 17, 2020, 4:54 p.m. | OK | GNU C++11 | TESTS | 44 | 358 | 7987200 | ||
95802693 | duality | G1 | Oct. 17, 2020, 3:21 p.m. | OK | GNU C++11 | TESTS | 44 | 919 | 58777600 | ||
95816642 | BigBag | G1 | Oct. 17, 2020, 5:36 p.m. | OK | GNU C++11 | TESTS | 44 | 1871 | 41267200 | ||
95801257 | ynsm | G1 | Oct. 17, 2020, 3:17 p.m. | OK | GNU C++11 | TESTS | 44 | 2277 | 56934400 | ||
95831500 | MagicSpark | G1 | Oct. 17, 2020, 11:34 p.m. | OK | GNU C++14 | TESTS | 46 | 78 | 48128000 | ||
95843439 | jairadheyshyam | G1 | Oct. 18, 2020, 5:57 a.m. | OK | GNU C++14 | TESTS | 46 | 108 | 7987200 | ||
95824907 | BlueDiamond | G1 | Oct. 17, 2020, 7:58 p.m. | OK | GNU C++14 | TESTS | 46 | 218 | 7987200 | ||
95824998 | BlueDiamond | G1 | Oct. 17, 2020, 8 p.m. | OK | GNU C++14 | TESTS | 46 | 249 | 7987200 | ||
95804199 | jumpmelon | G1 | Oct. 17, 2020, 3:26 p.m. | OK | GNU C++14 | TESTS | 44 | 327 | 32051200 | ||
95815417 | zeliboba | G1 | Oct. 17, 2020, 5:19 p.m. | OK | GNU C++14 | TESTS | 44 | 483 | 19353600 | ||
95811828 | TadijaSebez | G1 | Oct. 17, 2020, 4:35 p.m. | OK | GNU C++14 | TESTS | 44 | 592 | 16076800 | ||
95799755 | 800iq | G1 | Oct. 17, 2020, 3:12 p.m. | OK | GNU C++14 | TESTS | 44 | 1247 | 67788800 | ||
95814779 | mHuman | G1 | Oct. 17, 2020, 5:10 p.m. | OK | GNU C++14 | TESTS | 44 | 2261 | 160358400 | ||
95814270 | Motarack | G1 | Oct. 17, 2020, 5:03 p.m. | OK | GNU C++14 | TESTS | 44 | 2994 | 88883200 | ||
95810268 | ikatanic | G1 | Oct. 17, 2020, 4:24 p.m. | OK | GNU C++17 | TESTS | 44 | 78 | 20377600 | ||
95799106 | huhaoo | G1 | Oct. 17, 2020, 3:11 p.m. | OK | GNU C++17 | TESTS | 44 | 93 | 50380800 | ||
95805856 | chenkuowen | G1 | Oct. 17, 2020, 3:30 p.m. | OK | GNU C++17 | TESTS | 44 | 108 | 64102400 | ||
95811040 | jonathanirvings | G1 | Oct. 17, 2020, 4:29 p.m. | OK | GNU C++17 | TESTS | 44 | 155 | 7987200 | ||
95806224 | antontrygubO_o | G1 | Oct. 17, 2020, 3:31 p.m. | OK | GNU C++17 | TESTS | 44 | 155 | 7987200 | ||
95810571 | Soulist_s | G1 | Oct. 17, 2020, 4:25 p.m. | OK | GNU C++17 | TESTS | 44 | 155 | 24064000 | ||
95838338 | gzhffIThh | G1 | Oct. 18, 2020, 4 a.m. | OK | GNU C++17 | TESTS | 46 | 217 | 80179200 | ||
95799914 | kdh9949 | G1 | Oct. 17, 2020, 3:13 p.m. | OK | GNU C++17 | TESTS | 44 | 233 | 56115200 | ||
95823990 | Martin53 | G1 | Oct. 17, 2020, 7:39 p.m. | OK | GNU C++17 | TESTS | 46 | 249 | 7987200 | ||
95802313 | Sooke | G1 | Oct. 17, 2020, 3:20 p.m. | OK | GNU C++17 | TESTS | 44 | 249 | 84172800 | ||
95810512 | Maripium | G1 | Oct. 17, 2020, 4:25 p.m. | OK | GNU C++17 (64) | TESTS | 44 | 61 | 10649600 | ||
95840581 | Toxel | G1 | Oct. 18, 2020, 5:01 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 109 | 17510400 | ||
95805114 | KevinWan | G1 | Oct. 17, 2020, 3:28 p.m. | OK | GNU C++17 (64) | TESTS | 44 | 109 | 79872000 | ||
95804801 | mtsd | G1 | Oct. 17, 2020, 3:27 p.m. | OK | GNU C++17 (64) | TESTS | 44 | 155 | 15974400 | ||
95828375 | VEGAnn | G1 | Oct. 17, 2020, 9:24 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 171 | 7987200 | ||
95817847 | sumitacchan | G1 | Oct. 17, 2020, 5:54 p.m. | OK | GNU C++17 (64) | TESTS | 45 | 171 | 7987200 | ||
95803210 | dreamoon_love_AA | G1 | Oct. 17, 2020, 3:23 p.m. | OK | GNU C++17 (64) | TESTS | 44 | 171 | 36044800 | ||
95832699 | rama_pang | G1 | Oct. 18, 2020, 12:42 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 186 | 7987200 | ||
95810058 | Nebuchadnezzar | G1 | Oct. 17, 2020, 4:23 p.m. | OK | GNU C++17 (64) | TESTS | 44 | 187 | 18739200 | ||
95839625 | tute7627 | G1 | Oct. 18, 2020, 4:38 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 218 | 64204800 | ||
95812578 | Tlatoani | G1 | Oct. 17, 2020, 4:42 p.m. | OK | Kotlin | TESTS | 44 | 2354 | 24268800 |
Back to search problems