Codeforces Round 498 (Div. 3)

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
1006 Codeforces Round 498 (Div. 3) FINISHED False 7200 200071499 July 16, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13346 ) B Polycarp's Practice PROGRAMMING greedy implementation sortings 1200

B"Polycarp is practicing his problem solving skill. He has a list of n problems with difficulties a_1, a_2, ... , a_n , respectively. His plan is to practice for exactly k days. Each day he has to solve at least one problem from his list. Polycarp solves the problems in the order they are given in his list, he cannot skip any problem from his list. He has to solve all n problems in exactly k days. Thus, each day Polycarp solves a contiguous sequence of (consecutive) problems from the start of the list. He can't skip problems or solve them multiple times. As a result, in k days he will solve all the n problems. The profit of the j -th day of Polycarp's practice is the maximum among all the difficulties of problems Polycarp solves during the j -th day (i.e. if he solves problems with indices from l to r during a day, then the profit of the day is max limits_{l <= i <= r}a_i ). The total profit of his practice is the sum of the profits over all k days of his practice. You want to help Polycarp to get the maximum possible total profit over all valid ways to solve problems. Your task is to distribute all n problems between k days satisfying the conditions above in such a way, that the total profit is maximum. For example, if n = 8, k = 3 and a = [5, 4, 2, 6, 5, 1, 9, 2] , one of the possible distributions with maximum total profit is: [5, 4, 2], [6, 5], [1, 9, 2] . Here the total profit equals 5 + 6 + 9 = 20 . The first line of the input contains two integers n and k ( 1 <= k <= n <= 2000 ) -- the number of problems and the number of days, respectively. The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 2000 ) -- difficulties of problems in Polycarp's list, in the order they are placed in the list (i.e. in the order Polycarp will solve them). In the first line of the output print the"...

Tutorials

60672

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
61391290 vjudge4 B Sept. 27, 2019, 9:41 p.m. OK Clang++17 Diagnostics TESTS 37 62 11571200 1200
40605727 Bear.-. B July 21, 2018, 11:18 a.m. OK FPC TESTS 37 31 0 1200
41198117 DSZBR B Aug. 4, 2018, 3:02 a.m. OK GNU C TESTS 37 31 0 1200
40634448 ankan B July 22, 2018, 11:45 a.m. OK GNU C TESTS 37 31 0 1200
40635437 stacssenitpme B July 22, 2018, 12:32 p.m. OK GNU C TESTS 37 31 0 1200
40665914 DerelictX B July 23, 2018, 9:43 a.m. OK GNU C TESTS 37 31 0 1200
40781301 peeyushbh1998 B July 26, 2018, 1:57 p.m. OK GNU C TESTS 37 31 0 1200
41095095 letmefinish B Aug. 1, 2018, 6:56 p.m. OK GNU C TESTS 37 31 0 1200
40581285 Muntaseer_Hafiz_Sazid B July 20, 2018, 2:32 p.m. OK GNU C TESTS 37 31 0 1200
40528120 newbieski B July 18, 2018, 11:49 p.m. OK GNU C TESTS 37 31 0 1200
40592765 pilium2 B July 21, 2018, 2:13 a.m. OK GNU C TESTS 37 31 0 1200
40634330 nbdyn B July 22, 2018, 11:39 a.m. OK GNU C TESTS 37 31 0 1200
42263066 vjudge1 B Aug. 30, 2018, 5:03 a.m. OK GNU C++ TESTS 37 15 0 1200
40495484 Holland_Pig B July 18, 2018, 2:02 a.m. OK GNU C++ TESTS 37 15 102400 1200
41961528 vjudge4 B Aug. 22, 2018, 9:43 a.m. OK GNU C++ TESTS 37 30 0 1200
42330103 vjudge3 B Sept. 1, 2018, 9:14 a.m. OK GNU C++ TESTS 37 30 0 1200
41996521 vjudge5 B Aug. 23, 2018, 12:27 p.m. OK GNU C++ TESTS 37 30 0 1200
41527856 vjudge5 B Aug. 12, 2018, 12:56 p.m. OK GNU C++ TESTS 37 30 0 1200
41024103 vjudge3 B July 31, 2018, 1:52 p.m. OK GNU C++ TESTS 37 30 0 1200
41010570 wangzheaos B July 31, 2018, 12:25 p.m. OK GNU C++ TESTS 37 30 0 1200
40993268 Scut82 B July 31, 2018, 1:52 a.m. OK GNU C++ TESTS 37 30 0 1200
40721213 vjudge1 B July 25, 2018, 1:24 a.m. OK GNU C++ TESTS 37 30 0 1200
42127530 Christeen.Hallak B Aug. 26, 2018, 4:14 p.m. OK GNU C11 TESTS 37 31 0 1200
40519612 LudwigVanBeethoven B July 18, 2018, 3:18 p.m. OK GNU C11 TESTS 37 31 0 1200
68481844 yigezhe B Jan. 10, 2020, 8:04 a.m. OK GNU C11 TESTS 37 31 0 1200
56058276 gregr B June 26, 2019, 2:55 a.m. OK GNU C11 TESTS 37 31 0 1200
53877579 Overstars B May 8, 2019, 12:49 p.m. OK GNU C11 TESTS 37 31 0 1200
53770609 gabrielfern B May 5, 2019, 4:54 a.m. OK GNU C11 TESTS 37 31 0 1200
53117951 Sarica B April 22, 2019, 9:26 a.m. OK GNU C11 TESTS 37 31 0 1200
46683815 NoSoul B Dec. 6, 2018, 1:10 p.m. OK GNU C11 TESTS 37 31 0 1200
44354249 Siwar_Mh B Oct. 15, 2018, 11:43 a.m. OK GNU C11 TESTS 37 31 0 1200
43846574 tanvirbd B Oct. 5, 2018, 3:22 p.m. OK GNU C11 TESTS 37 31 0 1200
40524001 its_Atrap B July 18, 2018, 6:42 p.m. OK GNU C++11 TESTS 37 15 0 1200
47177043 w_t B Dec. 17, 2018, 6:06 p.m. OK GNU C++11 TESTS 37 15 102400 1200
42140307 The-Lion B Aug. 27, 2018, 4:48 a.m. OK GNU C++11 TESTS 37 15 102400 1200
61449224 vjudge5 B Sept. 29, 2019, 12:43 a.m. OK GNU C++11 TESTS 37 30 0 1200
57851752 Frame233 B July 27, 2019, 1:24 p.m. OK GNU C++11 TESTS 37 30 0 1200
47790550 nh_dantz B Dec. 31, 2018, 1:07 p.m. OK GNU C++11 TESTS 37 30 0 1200
47024763 JHSeng B Dec. 15, 2018, 6:08 a.m. OK GNU C++11 TESTS 37 30 0 1200
44743097 pishbeenZ B Oct. 23, 2018, 3:34 p.m. OK GNU C++11 TESTS 37 30 0 1200
42130055 Haru. B Aug. 26, 2018, 5:53 p.m. OK GNU C++11 TESTS 37 30 0 1200
41915502 Arnon B Aug. 20, 2018, 9:03 p.m. OK GNU C++11 TESTS 37 30 0 1200
52509107 gihewapos B April 8, 2019, 8:46 p.m. OK GNU C++14 TESTS 37 15 0 1200
66642831 gooddoog B Dec. 11, 2019, 3:26 p.m. OK GNU C++14 TESTS 37 15 0 1200
63788801 raj_mehta B Oct. 30, 2019, 1:03 p.m. OK GNU C++14 TESTS 37 15 0 1200
58250774 Sakudo B Aug. 4, 2019, 7:45 a.m. OK GNU C++14 TESTS 37 15 0 1200
53862655 ronnyldo B May 7, 2019, 10:56 p.m. OK GNU C++14 TESTS 37 15 0 1200
52910553 chiraagmittal05 B April 17, 2019, 1:59 p.m. OK GNU C++14 TESTS 37 15 0 1200
50504805 habedi B Feb. 25, 2019, 7:03 p.m. OK GNU C++14 TESTS 37 15 0 1200
41285514 MicGor B Aug. 6, 2018, 7:31 p.m. OK GNU C++14 TESTS 37 15 0 1200
41264319 dobryninivan B Aug. 6, 2018, 5:59 a.m. OK GNU C++14 TESTS 37 15 0 1200
40934746 jalousie B July 30, 2018, 3:55 a.m. OK GNU C++14 TESTS 37 15 0 1200
56763351 Salman69 B July 9, 2019, 4:59 p.m. OK GNU C++17 TESTS 37 15 0 1200
69548769 _____yash_garg B Jan. 26, 2020, 5:12 a.m. OK GNU C++17 TESTS 37 15 0 1200
68358368 DevJewel B Jan. 7, 2020, 1:05 p.m. OK GNU C++17 TESTS 37 15 0 1200
66809218 hdsingharora99 B Dec. 14, 2019, 12:42 a.m. OK GNU C++17 TESTS 37 15 0 1200
62392441 Boy_of_KutBilim B Oct. 12, 2019, 3:16 a.m. OK GNU C++17 TESTS 37 15 0 1200
58261457 Maybach B Aug. 4, 2019, 12:28 p.m. OK GNU C++17 TESTS 37 15 0 1200
57289023 cyg_Alex_codegician B July 18, 2019, 3:49 p.m. OK GNU C++17 TESTS 37 15 0 1200
50910055 Ahmed_Diab B March 7, 2019, 12:47 a.m. OK GNU C++17 TESTS 37 15 0 1200
51324213 charlotte26 B March 15, 2019, 8:52 a.m. OK GNU C++17 TESTS 37 15 0 1200
53876311 edmond_Y Houbunsha B May 8, 2019, 12:11 p.m. OK GNU C++17 TESTS 37 15 0 1200
40541219 yoyoyo_t B July 19, 2018, 8:45 a.m. OK GNU C++17 Diagnostics TESTS 37 1014 5120000 1200
40709565 leonarda_ B July 24, 2018, 3:05 p.m. OK GNU C++17 Diagnostics TESTS 37 1060 0 1200
40481625 lemonYu B July 17, 2018, 2:23 p.m. OK GNU C++17 Diagnostics TESTS 37 1153 2048000 1200
40541238 yoyoyo_t B July 19, 2018, 8:46 a.m. OK GNU C++17 Diagnostics TESTS 37 1154 5120000 1200
40545360 syhhh B July 19, 2018, 11:22 a.m. OK GNU C++17 Diagnostics TESTS 37 1169 5017600 1200
40557084 Kallaf B July 19, 2018, 7:07 p.m. OK GNU C++17 Diagnostics TESTS 37 1232 2150400 1200
41314561 KAALIOSTRO B Aug. 7, 2018, 6:33 p.m. OK GNU C++17 Diagnostics TESTS 37 1310 3584000 1200
40600438 vjudge1 B July 21, 2018, 8:16 a.m. OK Go TESTS 37 61 102400 1200
40750683 deSigntheClutch B July 25, 2018, 5:33 p.m. OK Go TESTS 37 62 204800 1200
59228381 garnacha B Aug. 21, 2019, 2:32 p.m. OK Java 8 TESTS 37 109 0 1200
45891392 m1_k3 B Nov. 17, 2018, 6:51 p.m. OK Java 8 TESTS 37 109 0 1200
45138171 ingenuitive B Oct. 31, 2018, 1:18 p.m. OK Java 8 TESTS 37 109 0 1200
52777885 mikkk B April 15, 2019, 12:51 p.m. OK Java 8 TESTS 37 124 0 1200
68212860 fundamentals B Jan. 4, 2020, 8:24 p.m. OK Java 8 TESTS 37 124 0 1200
66243462 Agnimandur B Dec. 3, 2019, 7:13 p.m. OK Java 8 TESTS 37 124 0 1200
58111597 Vatsal53 B Aug. 1, 2019, 7:23 a.m. OK Java 8 TESTS 37 124 0 1200
57614242 MohammadHossam B July 24, 2019, 12:02 a.m. OK Java 8 TESTS 37 124 0 1200
55316009 caoash B June 8, 2019, 9:57 p.m. OK Java 8 TESTS 37 124 0 1200
53466704 icpc_loser B April 28, 2019, 10:31 a.m. OK Java 8 TESTS 37 124 0 1200
40558907 benjani B July 19, 2018, 9:06 p.m. OK JavaScript TESTS 37 46 1740800 1200
59329481 david_varela B Aug. 22, 2019, 11:33 p.m. OK Kotlin TESTS 37 187 1433600 1200
40526960 Rushan B July 18, 2018, 9:53 p.m. OK Kotlin TESTS 37 217 1228800 1200
40535406 Winner_oK B July 19, 2018, 5:59 a.m. OK Kotlin TESTS 37 218 1228800 1200
41287980 andrew.albert B Aug. 6, 2018, 10:33 p.m. OK Kotlin TESTS 37 218 1228800 1200
41972493 gg89 B Aug. 22, 2018, 4:03 p.m. OK Kotlin TESTS 37 233 1228800 1200
54721965 og.kostya B May 27, 2019, 5:54 p.m. OK Mono C# TESTS 37 46 102400 1200
41645063 Skndr801 B Aug. 16, 2018, 8:06 a.m. OK Mono C# TESTS 37 46 204800 1200
41065635 keep.deep B July 31, 2018, 6:43 p.m. OK Mono C# TESTS 37 62 204800 1200
40699522 Areyou B July 24, 2018, 9:52 a.m. OK Mono C# TESTS 37 62 204800 1200
44231944 nemars B Oct. 13, 2018, 1:10 a.m. OK Mono C# TESTS 37 62 3891200 1200
40742881 DoesNotExist B July 25, 2018, 1:07 p.m. OK Mono C# TESTS 37 77 6758400 1200
41966475 chkhetiani B Aug. 22, 2018, 12:35 p.m. OK Mono C# TESTS 37 78 3891200 1200
44230956 vjudge1 B Oct. 12, 2018, 11:59 p.m. OK MS C++ TESTS 37 30 0 1200
40766686 jiangjiashi B July 26, 2018, 6:46 a.m. OK MS C++ TESTS 37 30 0 1200
40644843 32.64.128 B July 22, 2018, 3:11 p.m. OK MS C++ TESTS 37 30 0 1200
40635086 _mactep B July 22, 2018, 12:15 p.m. OK MS C++ TESTS 37 30 0 1200
48411626 vjudge4 B Jan. 15, 2019, 8:06 a.m. OK MS C++ TESTS 37 30 0 1200
40498247 j4357j B July 18, 2018, 3:56 a.m. OK MS C++ TESTS 37 30 102400 1200
42027490 George2004 B Aug. 24, 2018, 1:21 p.m. OK MS C++ TESTS 37 30 102400 1200
45055340 Volpe B Oct. 29, 2018, 12:29 p.m. OK MS C++ TESTS 37 30 102400 1200
58206706 vjudge1 B Aug. 3, 2019, 7:16 a.m. OK MS C++ TESTS 37 30 1638400 1200
42412401 vjudge1 B Sept. 3, 2018, 3:03 a.m. OK MS C++ TESTS 37 30 2252800 1200
58316463 vjudge2 B Aug. 5, 2019, 3:11 a.m. OK MS C++ 2017 TESTS 37 31 0 1200
64458120 vjudge2 B Nov. 7, 2019, 9:23 a.m. OK MS C++ 2017 TESTS 37 31 0 1200
61102038 shio B Sept. 23, 2019, 7:19 a.m. OK MS C++ 2017 TESTS 37 31 0 1200
60351427 Mad112233 B Sept. 10, 2019, 2:27 p.m. OK MS C++ 2017 TESTS 37 31 0 1200
58316384 vjudge3 B Aug. 5, 2019, 3:09 a.m. OK MS C++ 2017 TESTS 37 31 0 1200
58211127 vjudge4 B Aug. 3, 2019, 8:52 a.m. OK MS C++ 2017 TESTS 37 31 0 1200
58207277 vjudge5 B Aug. 3, 2019, 7:31 a.m. OK MS C++ 2017 TESTS 37 31 0 1200
58207241 vjudge3 B Aug. 3, 2019, 7:30 a.m. OK MS C++ 2017 TESTS 37 31 0 1200
58205397 vjudge1 B Aug. 3, 2019, 6:43 a.m. OK MS C++ 2017 TESTS 37 31 0 1200
55734405 JuicyCloud12609 B June 19, 2019, 2:21 a.m. OK MS C++ 2017 TESTS 37 31 0 1200
44353621 Lucky_cat777 B Oct. 15, 2018, 11:25 a.m. OK PascalABC.NET TESTS 37 77 10956800 1200
40617200 sasasagagaga B July 21, 2018, 7:38 p.m. OK PyPy 2 TESTS 37 140 409600 1200
55650223 shafwanur010 B June 16, 2019, 2:12 p.m. OK PyPy 2 TESTS 37 155 2048000 1200
55650056 vjudge4 B June 16, 2019, 2:07 p.m. OK PyPy 2 TESTS 37 155 2048000 1200
45667141 c1729 B Nov. 13, 2018, 8:18 a.m. OK PyPy 2 TESTS 37 155 2048000 1200
40980001 EON_KID B July 30, 2018, 5:20 p.m. OK PyPy 2 TESTS 37 156 921600 1200
43801551 soumyasarkar1998 B Oct. 4, 2018, 5:37 p.m. OK PyPy 2 TESTS 37 170 1024000 1200
40988738 BurntArgonPancakes B July 30, 2018, 10:18 p.m. OK PyPy 2 TESTS 37 186 1024000 1200
46284820 pavankatta B Nov. 27, 2018, 3:28 p.m. OK PyPy 2 TESTS 37 187 2355200 1200
40483458 Jota B July 17, 2018, 3:16 p.m. OK PyPy 2 TESTS 37 202 2048000 1200
54831608 iamprayush B May 30, 2019, 9:08 a.m. OK PyPy 3 TESTS 37 140 1331200 1200
53483260 yfo B April 28, 2019, 11:06 p.m. OK PyPy 3 TESTS 37 140 1536000 1200
59436382 kopok2 B Aug. 25, 2019, 9 a.m. OK PyPy 3 TESTS 37 140 1945600 1200
42859849 wadissimo B Sept. 14, 2018, 12:13 p.m. OK PyPy 3 TESTS 37 155 307200 1200
53862216 juan.barros B May 7, 2019, 10:08 p.m. OK PyPy 3 TESTS 37 155 1024000 1200
41155250 Zombarian B Aug. 3, 2018, 11:44 a.m. OK PyPy 3 TESTS 37 155 1331200 1200
55649174 vjudge3 B June 16, 2019, 1:42 p.m. OK PyPy 3 TESTS 37 155 1536000 1200
51854053 vjudge1 B March 26, 2019, 9:41 a.m. OK PyPy 3 TESTS 37 155 1536000 1200
49925486 Zombie358 B Feb. 14, 2019, 10:08 p.m. OK PyPy 3 TESTS 37 155 1843200 1200
59556516 repper B Aug. 27, 2019, 6:28 a.m. OK PyPy 3 TESTS 37 155 2252800 1200
40620408 nealzane B July 22, 2018, 12:48 a.m. OK Python 2 TESTS 37 155 102400 1200
54076279 jrobsonjr B May 13, 2019, 8:17 p.m. OK Python 2 TESTS 37 171 102400 1200
49176946 scambret B Jan. 29, 2019, 9:21 p.m. OK Python 2 TESTS 37 171 102400 1200
46461302 thenewguy39 B Dec. 1, 2018, 8:26 p.m. OK Python 2 TESTS 37 171 102400 1200
40686580 vguo B July 24, 2018, 2:36 a.m. OK Python 2 TESTS 37 171 102400 1200
41415563 franckmy B Aug. 10, 2018, 2:20 a.m. OK Python 2 TESTS 37 171 409600 1200
41328413 shnamacedev B Aug. 8, 2018, 7:12 a.m. OK Python 2 TESTS 37 171 409600 1200
47864888 Luxo B Jan. 3, 2019, 9:01 a.m. OK Python 2 TESTS 37 186 102400 1200
40599040 vjudge2 B July 21, 2018, 7:27 a.m. OK Python 2 TESTS 37 186 102400 1200
40490854 elistark B July 17, 2018, 8:26 p.m. OK Python 2 TESTS 37 187 0 1200
40556629 chinababka B July 19, 2018, 6:40 p.m. OK Python 3 TESTS 37 108 409600 1200
52232841 galim665 B April 2, 2019, 12:35 p.m. OK Python 3 TESTS 37 108 512000 1200
51838081 Lamborgini B March 25, 2019, 7:30 p.m. OK Python 3 TESTS 37 108 512000 1200
48761275 myway_82 B Jan. 22, 2019, 5:30 p.m. OK Python 3 TESTS 37 108 512000 1200
48096775 nethish B Jan. 8, 2019, 5:22 p.m. OK Python 3 TESTS 37 108 512000 1200
40763094 acordero B July 26, 2018, 5:02 a.m. OK Python 3 TESTS 37 109 102400 1200
40624114 MidAndFeed B July 22, 2018, 4:32 a.m. OK Python 3 TESTS 37 109 102400 1200
41315511 Shamsutdin B Aug. 7, 2018, 7:15 p.m. OK Python 3 TESTS 37 109 204800 1200
40892023 sajalanand97 B July 28, 2018, 4:41 p.m. OK Python 3 TESTS 37 109 204800 1200
56070069 bluexleoxgreen B June 26, 2019, 9:57 a.m. OK Python 3 TESTS 37 109 307200 1200
41440028 betrue12 B Aug. 10, 2018, 5:38 p.m. OK Ruby TESTS 37 62 102400 1200
40856632 clupasq B July 27, 2018, 5:42 p.m. OK Ruby TESTS 37 62 204800 1200
60767976 matijap B Sept. 18, 2019, 11:41 a.m. OK Rust TESTS 37 31 0 1200
46406852 yakamoto B Nov. 30, 2018, 3:03 p.m. OK Scala TESTS 37 468 0 1200
40484860 sam.ninja B July 17, 2018, 4:01 p.m. OK Scala TESTS 37 577 512000 1200
40575043 phatruhi B July 20, 2018, 10:47 a.m. OK Scala TESTS 37 623 0 1200

remove filters

Back to search problems