Codeforces Round 536 (Div. 2)

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
1106 Codeforces Round 536 (Div. 2) FINISHED False 9600 182885099 Jan. 31, 2019, 12:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2582 ) E Lunar New Year and Red Envelopes PROGRAMMING data structures dp 2100

B"Lunar New Year is approaching, and Bob is going to receive some red envelopes with countless money! But collecting money from red envelopes is a time-consuming process itself. Let's describe this problem in a mathematical way. Consider a timeline from time 1 to n . The i -th red envelope will be available from time s_i to t_i , inclusive, and contain w_i coins. If Bob chooses to collect the coins in the i -th red envelope, he can do it only in an integer point of time between s_i and t_i , inclusive, and he can't collect any more envelopes until time d_i (inclusive) after that. Here s_i <= q t_i <= q d_i holds. Bob is a greedy man, he collects coins greedily -- whenever he can collect coins at some integer time x , he collects the available red envelope with the maximum number of coins. If there are multiple envelopes with the same maximum number of coins, Bob would choose the one whose parameter d is the largest. If there are still multiple choices, Bob will choose one from them randomly. However, Alice -- his daughter -- doesn't want her father to get too many coins. She could disturb Bob at no more than m integer time moments. If Alice decides to disturb Bob at time x , he could not do anything at time x and resumes his usual strategy at the time x + 1 (inclusive), which may lead to missing some red envelopes. Calculate the minimum number of coins Bob would get if Alice disturbs him optimally. The first line contains three non-negative integers n , m and k ( 1 <= q n <= q 10^5 , 0 <= q m <= q 200 , 1 <= q k <= q 10^5 ), denoting the length of the timeline, the number of times Alice can disturb Bob and the total number of red envelopes, respectively. The following k lines describe those k red envelopes. The i -th line contains four positive integers s_i , t_i , d_i and w_i ( 1 <= q s_i "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
49271720 nanae1914 E Jan. 31, 2019, 2:12 p.m. OK D TESTS 103 607 233574400 2100
49263470 fluffyowl E Jan. 31, 2019, 1:26 p.m. OK D TESTS 103 686 236339200 2100
50248533 Gassa E Feb. 20, 2019, 4:05 p.m. OK D TESTS 103 2480 228454400 2100
49294396 rainboy E Jan. 31, 2019, 9:18 p.m. OK GNU C11 TESTS 103 234 6041600 2100
49275208 lindalee E Jan. 31, 2019, 2:31 p.m. OK GNU C++11 TESTS 103 155 11878400 2100
49314644 Scut82 E Feb. 1, 2019, 9:45 a.m. OK GNU C++11 TESTS 103 155 166297600 2100
49269184 visitWorld E Jan. 31, 2019, 1:58 p.m. OK GNU C++11 TESTS 103 155 172339200 2100
61351739 luogu_bot3 E Sept. 27, 2019, 8:34 a.m. OK GNU C++11 TESTS 103 155 174182400 2100
61352165 luogu_bot2 E Sept. 27, 2019, 8:47 a.m. OK GNU C++11 TESTS 103 155 174182400 2100
49267815 newbieyzr E Jan. 31, 2019, 1:51 p.m. OK GNU C++11 TESTS 103 155 177254400 2100
49326599 vjudge1 E Feb. 1, 2019, 2:19 p.m. OK GNU C++11 TESTS 103 171 11264000 2100
49300482 maxtir E Feb. 1, 2019, 2:36 a.m. OK GNU C++11 TESTS 103 171 167936000 2100
54012436 luogu_bot2 E May 12, 2019, 3:48 a.m. OK GNU C++11 TESTS 103 171 168345600 2100
49450973 Mirach E Feb. 4, 2019, 7:09 a.m. OK GNU C++11 TESTS 103 171 168448000 2100
49655099 tokitsukaze E Feb. 9, 2019, 9:29 a.m. OK GNU C++14 TESTS 103 202 169267200 2100
50726700 evilbuggy E March 3, 2019, 10:04 a.m. OK GNU C++14 TESTS 103 202 172236800 2100
50622572 zhixiang E March 1, 2019, 3:13 a.m. OK GNU C++14 TESTS 103 202 181043200 2100
49342065 shdut E Feb. 2, 2019, 12:50 a.m. OK GNU C++14 TESTS 103 218 6860800 2100
56045903 pr3pony E June 25, 2019, 4:35 p.m. OK GNU C++14 TESTS 103 218 11468800 2100
49483559 IsmailToukhy E Feb. 5, 2019, 2:36 a.m. OK GNU C++14 TESTS 103 218 15974400 2100
49311584 sweetcookie E Feb. 1, 2019, 8:12 a.m. OK GNU C++14 TESTS 103 218 177971200 2100
49483371 IsmailToukhy E Feb. 5, 2019, 2:20 a.m. OK GNU C++14 TESTS 103 233 16179200 2100
49296059 schtomi97 E Jan. 31, 2019, 10:51 p.m. OK GNU C++14 TESTS 103 233 167116800 2100
49298146 YuChang E Feb. 1, 2019, 12:42 a.m. OK GNU C++14 TESTS 103 233 167526400 2100
49301035 kidddddddddddddddddddddd E Feb. 1, 2019, 3 a.m. OK GNU C++17 TESTS 103 202 172544000 2100
49438133 loyolman E Feb. 3, 2019, 7:43 p.m. OK GNU C++17 TESTS 103 218 7270400 2100
49328645 kobortor E Feb. 1, 2019, 3:11 p.m. OK GNU C++17 TESTS 103 218 172544000 2100
49277461 pbihao E Jan. 31, 2019, 2:48 p.m. OK GNU C++17 TESTS 103 218 175206400 2100
49320099 Evro E Feb. 1, 2019, 11:55 a.m. OK GNU C++17 TESTS 103 233 11673600 2100
49354257 ivan.tudor E Feb. 2, 2019, 10:15 a.m. OK GNU C++17 TESTS 103 233 171008000 2100
49310464 libra9z E Feb. 1, 2019, 7:38 a.m. OK GNU C++17 TESTS 103 249 12902400 2100
54009944 Hi_archer E May 12, 2019, 1 a.m. OK GNU C++17 TESTS 103 249 168345600 2100
50821437 klimmek55 E March 5, 2019, 1:42 p.m. OK GNU C++17 TESTS 103 249 168345600 2100
65026382 tA_O E Nov. 15, 2019, 7:54 a.m. OK GNU C++17 TESTS 103 249 169164800 2100
49500801 polyakoff E Feb. 5, 2019, 3:03 p.m. OK Java 8 TESTS 103 514 259584000 2100
49294412 Dukkha E Jan. 31, 2019, 9:19 p.m. OK Java 8 TESTS 103 560 5017600 2100
49392466 chugh E Feb. 3, 2019, 10:44 a.m. OK Java 8 TESTS 103 577 253132800 2100
50076970 Harbin E Feb. 17, 2019, 10:48 p.m. OK Java 8 TESTS 103 607 259686400 2100
49352689 AJ47 E Feb. 2, 2019, 9:25 a.m. OK Java 8 TESTS 103 608 258969600 2100
49433195 ankurdua15 E Feb. 3, 2019, 5:31 p.m. OK Java 8 TESTS 103 655 40550400 2100
58226997 abdomisan E Aug. 3, 2019, 2:53 p.m. OK Java 8 TESTS 103 670 258867200 2100
49287187 StayAwayFromBitches E Jan. 31, 2019, 6:06 p.m. OK Java 8 TESTS 103 670 268390400 2100
49282928 Ahmed_Diab E Jan. 31, 2019, 5:01 p.m. OK Java 8 TESTS 103 686 268390400 2100
49282421 baobab E Jan. 31, 2019, 4:53 p.m. OK Java 8 TESTS 103 701 268390400 2100
49273294 mircea85 E Jan. 31, 2019, 2:21 p.m. OK Mono C# TESTS 103 608 184729600 2100
57637194 vjudge3 E July 24, 2019, 11:15 a.m. OK MS C++ TESTS 103 264 181452800 2100
51454899 wjfwjfwjf E March 18, 2019, 4:36 p.m. OK MS C++ TESTS 103 280 174387200 2100
52958742 vjudge4 E April 18, 2019, 2:52 p.m. OK MS C++ TESTS 103 295 172748800 2100
57771197 vjudge3 E July 26, 2019, 12:55 a.m. OK MS C++ TESTS 103 311 176537600 2100
54010423 vjudge4 E May 12, 2019, 1:41 a.m. OK MS C++ TESTS 103 311 181350400 2100
49272374 Iaofudasuan E Jan. 31, 2019, 2:16 p.m. OK MS C++ TESTS 103 327 175104000 2100
49279855 youx E Jan. 31, 2019, 3:11 p.m. OK MS C++ TESTS 103 421 195686400 2100
49319089 zhy123 E Feb. 1, 2019, 11:28 a.m. OK MS C++ TESTS 103 1232 198860800 2100
49287139 DavitMarg E Jan. 31, 2019, 6:06 p.m. OK MS C++ 2017 TESTS 103 358 174592000 2100
49371591 aeremin E Feb. 2, 2019, 5:35 p.m. OK MS C++ 2017 TESTS 103 467 181248000 2100
51411778 petko_mitkov E March 17, 2019, 12:20 p.m. OK MS C++ 2017 TESTS 103 530 182374400 2100
49834950 path7inder E Feb. 12, 2019, 3:41 p.m. OK MS C++ 2017 TESTS 103 592 171417600 2100
49366393 siwei E Feb. 2, 2019, 3:14 p.m. OK MS C++ 2017 TESTS 103 592 180019200 2100
49277971 Dmit_riy E Jan. 31, 2019, 2:52 p.m. OK MS C++ 2017 TESTS 103 654 173772800 2100
49279939 PavelChadnov E Jan. 31, 2019, 3:12 p.m. OK MS C++ 2017 TESTS 103 654 188108800 2100
63280425 AleksanderBalobanov E Oct. 24, 2019, 8:30 a.m. OK MS C++ 2017 TESTS 103 1075 179097600 2100
49521888 elvinaa E Feb. 6, 2019, 8:34 a.m. OK MS C++ 2017 TESTS 103 1341 178585600 2100
49519282 min05 E Feb. 6, 2019, 6:36 a.m. OK MS C++ 2017 TESTS 103 2090 171315200 2100
49632819 kobae964 E Feb. 8, 2019, 5:01 p.m. OK Rust TESTS 103 545 176128000 2100
49323383 yakamoto E Feb. 1, 2019, 1:12 p.m. OK Scala TESTS 103 1497 218316800 2100

remove filters

Back to search problems