Codeforces Round 894 (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
1862 Codeforces Round 894 (Div. 3) FINISHED False 8100 44292263 Aug. 24, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11162 ) E Kolya and Movie Theatre PROGRAMMING constructive algorithms data structures greedy

B'Recently, Kolya found out that a new movie theatre is going to be opened in his city soon, which will show a new movie every day for n days. So, on the day with the number 1 <= i <= n , the movie theatre will show the premiere of the i -th movie. Also, Kolya found out the schedule of the movies and assigned the entertainment value to each movie, denoted by a_i . However, the longer Kolya stays without visiting a movie theatre, the larger the decrease in entertainment value of the next movie. That decrease is equivalent to d cdot cnt , where d is a predetermined value and cnt is the number of days since the last visit to the movie theatre. It is also known that Kolya managed to visit another movie theatre a day before the new one opened -- the day with the number 0 . So if we visit the movie theatre the first time on the day with the number i , then cnt -- the number of days since the last visit to the movie theatre will be equal to i . For example, if d = 2 and a = [3, 2, 5, 4, 6] , then by visiting movies with indices 1 and 3 , cnt value for the day 1 will be equal to 1 - 0 = 1 and cnt value for the day 3 will be 3 - 1 = 2 , so the total entertainment value of the movies will be a_1 - d cdot 1 + a_3 - d cdot 2 = 3 - 2 cdot 1 + 5 - 2 cdot 2 = 2 . Unfortunately, Kolya only has time to visit at most m movies. Help him create a plan to visit the cinema in such a way that the total entertainment value of all the movies he visits is maximized. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains three integers n , m , and d ( 1 <= n <= 2 cdot 10^5 , 1 <= m <= n , 1 <= d <= 10^9 ). The second line of each set of i'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
220451002 mban259 E Aug. 26, 2023, 2:04 a.m. OK C# 10 TESTS 9 124 22425600
220419339 kellendros95 E Aug. 25, 2023, 5:49 p.m. OK C# 10 TESTS 9 202 30822400
220446570 bluemegane E Aug. 26, 2023, 12:26 a.m. OK C# 8 TESTS 9 170 29081600
220446413 bluemegane E Aug. 26, 2023, 12:23 a.m. OK C# 8 TESTS 9 186 28774400
220452745 Tokai. E Aug. 26, 2023, 2:39 a.m. OK GNU C++14 TESTS 9 61 1126400
220352944 233L E Aug. 25, 2023, 8:05 a.m. OK GNU C++14 TESTS 9 61 1126400
220402364 SuryanshIITP E Aug. 25, 2023, 3:44 p.m. OK GNU C++14 TESTS 9 61 3174400
220353487 233L E Aug. 25, 2023, 8:16 a.m. OK GNU C++14 TESTS 9 62 1126400
220404314 kaustubh_1806 E Aug. 25, 2023, 3:58 p.m. OK GNU C++14 TESTS 9 62 1638400
220378983 Deamer E Aug. 25, 2023, 1:03 p.m. OK GNU C++14 TESTS 9 62 1638400
220372602 more-cheese E Aug. 25, 2023, 12:14 p.m. OK GNU C++14 TESTS 9 62 1638400
220372374 more-cheese E Aug. 25, 2023, 12:12 p.m. OK GNU C++14 TESTS 9 62 1638400
220372011 more-cheese E Aug. 25, 2023, 12:09 p.m. OK GNU C++14 TESTS 9 62 1638400
220352460 YoungJayz E Aug. 25, 2023, 7:57 a.m. OK GNU C++14 TESTS 9 62 1843200
220454213 wibulord E Aug. 26, 2023, 3:06 a.m. OK GNU C++17 TESTS 9 46 1843200
220454274 qiao_bo_shi E Aug. 26, 2023, 3:07 a.m. OK GNU C++17 TESTS 9 61 1126400
220369391 cjnwq E Aug. 25, 2023, 11:48 a.m. OK GNU C++17 TESTS 9 61 1843200
220362821 anugam_jain E Aug. 25, 2023, 10:52 a.m. OK GNU C++17 TESTS 9 61 1843200
220348438 AnthonyZ E Aug. 25, 2023, 7:02 a.m. OK GNU C++17 TESTS 9 61 2662400
220429258 satyji08 E Aug. 25, 2023, 7:19 p.m. OK GNU C++17 TESTS 9 61 3174400
220461085 kilkuwu E Aug. 26, 2023, 5:01 a.m. OK GNU C++17 TESTS 9 62 1126400
220453276 Ali_Azzam E Aug. 26, 2023, 2:49 a.m. OK GNU C++17 TESTS 9 62 1126400
220429937 MostafaY E Aug. 25, 2023, 7:27 p.m. OK GNU C++17 TESTS 9 62 1126400
220422669 _Atharva E Aug. 25, 2023, 6:15 p.m. OK GNU C++17 TESTS 9 62 1126400
220458637 JohanWOW E Aug. 26, 2023, 4:23 a.m. OK GNU C++17 (64) TESTS 9 46 1126400
220446140 akwa_blue E Aug. 26, 2023, 12:15 a.m. OK GNU C++17 (64) TESTS 9 46 1843200
220427607 Wy_g E Aug. 25, 2023, 7:01 p.m. OK GNU C++17 (64) TESTS 9 46 1843200
220401461 Estrus E Aug. 25, 2023, 3:39 p.m. OK GNU C++17 (64) TESTS 9 46 1945600
220406739 Coldmou4 E Aug. 25, 2023, 4:16 p.m. OK GNU C++17 (64) TESTS 9 46 2662400
220364634 deepanshusau E Aug. 25, 2023, 11:08 a.m. OK GNU C++17 (64) TESTS 9 46 2662400
220465826 OTTFF E Aug. 26, 2023, 5:57 a.m. OK GNU C++17 (64) TESTS 9 46 3788800
220449783 Petercc E Aug. 26, 2023, 1:39 a.m. OK GNU C++17 (64) TESTS 9 46 3788800
220366177 wei138 E Aug. 25, 2023, 11:21 a.m. OK GNU C++17 (64) TESTS 9 46 3788800
220401666 prazz_18 E Aug. 25, 2023, 3:40 p.m. OK GNU C++17 (64) TESTS 9 46 7475200
220466269 zhugexiaoxian E Aug. 26, 2023, 6:02 a.m. OK GNU C++20 (64) TESTS 9 31 1126400
220358336 mnasser02 E Aug. 25, 2023, 9:37 a.m. OK GNU C++20 (64) TESTS 9 31 1126400
220422890 cp_boy E Aug. 25, 2023, 6:17 p.m. OK GNU C++20 (64) TESTS 9 31 1843200
220418577 yasar_arafath E Aug. 25, 2023, 5:44 p.m. OK GNU C++20 (64) TESTS 9 31 1843200
220413864 S.A.Y.E.D E Aug. 25, 2023, 5:09 p.m. OK GNU C++20 (64) TESTS 9 31 1843200
220401106 Khoulio E Aug. 25, 2023, 3:37 p.m. OK GNU C++20 (64) TESTS 9 31 1945600
220356304 65_67_77 E Aug. 25, 2023, 9:03 a.m. OK GNU C++20 (64) TESTS 9 31 1945600
220375888 sophy7 E Aug. 25, 2023, 12:40 p.m. OK GNU C++20 (64) TESTS 9 31 2150400
220356331 MCdyc E Aug. 25, 2023, 9:03 a.m. OK GNU C++20 (64) TESTS 9 31 2150400
220440472 andreslel E Aug. 25, 2023, 9:59 p.m. OK GNU C++20 (64) TESTS 9 31 2662400
220448955 iamavalon E Aug. 26, 2023, 1:23 a.m. OK Java 11 TESTS 9 202 0
220365123 Panther369 E Aug. 25, 2023, 11:12 a.m. OK Java 11 TESTS 9 233 0
220431141 legit_123 E Aug. 25, 2023, 7:41 p.m. OK Java 11 TESTS 9 280 8601600
220401050 kasiru_69 E Aug. 25, 2023, 3:37 p.m. OK Java 11 TESTS 9 311 0
220450329 profchi E Aug. 26, 2023, 1:51 a.m. OK Java 11 TESTS 9 390 5529600
220459050 iknownothing13 E Aug. 26, 2023, 4:29 a.m. OK Java 11 TESTS 9 545 0
220408070 codeanand17 E Aug. 25, 2023, 4:25 p.m. OK Java 11 TESTS 9 560 0
220405334 daksh_02 E Aug. 25, 2023, 4:06 p.m. OK Java 17 TESTS 9 233 1433600
220403368 sagnikghoshcr7 E Aug. 25, 2023, 3:51 p.m. OK Java 17 TESTS 9 248 5120000
220358082 American_Eagle E Aug. 25, 2023, 9:33 a.m. OK Java 17 TESTS 9 249 3174400
220358673 _ryan18_ E Aug. 25, 2023, 9:44 a.m. OK Java 17 TESTS 9 249 4198400
220435049 slash0t E Aug. 25, 2023, 8:31 p.m. OK Java 17 TESTS 9 264 819200
220428400 d2s2 E Aug. 25, 2023, 7:09 p.m. OK Java 17 TESTS 9 295 2662400
220441565 imvivekthakur E Aug. 25, 2023, 10:22 p.m. OK Java 17 TESTS 9 327 1843200
220403720 American_Eagle E Aug. 25, 2023, 3:54 p.m. OK Java 17 TESTS 9 374 2252800
220426232 shivamks2712 E Aug. 25, 2023, 6:46 p.m. OK Java 17 TESTS 9 639 614400
220411315 yousef03 E Aug. 25, 2023, 4:49 p.m. OK Java 8 TESTS 9 155 4403200
220464336 wait_rain_stops E Aug. 26, 2023, 5:41 a.m. OK Java 8 TESTS 9 170 0
220360447 Danger_Don E Aug. 25, 2023, 10:18 a.m. OK Java 8 TESTS 9 171 3686400
220365116 Tomatos03 E Aug. 25, 2023, 11:12 a.m. OK Java 8 TESTS 9 233 18329600
220401434 depurador_ik E Aug. 25, 2023, 3:39 p.m. OK Java 8 TESTS 9 265 30617600
220346607 priyaroy3370 E Aug. 25, 2023, 6:39 a.m. OK Java 8 TESTS 9 296 4403200
220369423 QianCCC E Aug. 25, 2023, 11:48 a.m. OK Java 8 TESTS 9 436 0
220368457 QianCCC E Aug. 25, 2023, 11:41 a.m. OK Java 8 TESTS 9 436 0
220406564 Toosid E Aug. 25, 2023, 4:15 p.m. OK Java 8 TESTS 9 482 0
220458320 amit_roy E Aug. 26, 2023, 4:17 a.m. OK Java 8 TESTS 9 483 0
220345626 maxK99 E Aug. 25, 2023, 6:25 a.m. OK MS C++ 2017 TESTS 9 217 3993600
220353655 Antwerp2004 E Aug. 25, 2023, 8:19 a.m. OK MS C++ 2017 TESTS 9 249 4812800
220405927 Nero E Aug. 25, 2023, 4:10 p.m. OK Perl TESTS 9 873 31334400
220430530 Yash_Nandwana E Aug. 25, 2023, 7:34 p.m. OK PyPy 3 TESTS 9 576 19558400
220418114 Imeon E Aug. 25, 2023, 5:41 p.m. OK PyPy 3 TESTS 9 826 17203200
220436615 l0stempl3 E Aug. 25, 2023, 8:53 p.m. OK PyPy 3-64 TESTS 9 187 26931200
220443203 adamjamil E Aug. 25, 2023, 11:01 p.m. OK PyPy 3-64 TESTS 9 233 31129600
220429883 date3k2 E Aug. 25, 2023, 7:26 p.m. OK PyPy 3-64 TESTS 9 264 26931200
220410005 vedantmishra69 E Aug. 25, 2023, 4:39 p.m. OK PyPy 3-64 TESTS 9 280 31129600
220347784 liuaaa E Aug. 25, 2023, 6:54 a.m. OK PyPy 3-64 TESTS 9 295 28364800
220349305 zechri E Aug. 25, 2023, 7:14 a.m. OK PyPy 3-64 TESTS 9 311 26931200
220349833 USYDLDH E Aug. 25, 2023, 7:20 a.m. OK PyPy 3-64 TESTS 9 311 31948800
220347392 tryGrind E Aug. 25, 2023, 6:49 a.m. OK PyPy 3-64 TESTS 9 327 26828800
220409493 vedantmishra69 E Aug. 25, 2023, 4:35 p.m. OK PyPy 3-64 TESTS 9 327 30515200
220365934 deepansh09 E Aug. 25, 2023, 11:19 a.m. OK PyPy 3-64 TESTS 9 342 25907200
220452005 xu3kev E Aug. 26, 2023, 2:25 a.m. OK Python 3 TESTS 9 186 27136000
220378163 lzy-2002 E Aug. 25, 2023, 12:57 p.m. OK Python 3 TESTS 9 249 27033600
220428757 Kding4noledge E Aug. 25, 2023, 7:13 p.m. OK Python 3 TESTS 9 280 27033600
220372232 bony_always E Aug. 25, 2023, 12:11 p.m. OK Python 3 TESTS 9 280 27033600
220440450 sile1000b E Aug. 25, 2023, 9:59 p.m. OK Python 3 TESTS 9 280 28979200
220426680 tan36 E Aug. 25, 2023, 6:51 p.m. OK Python 3 TESTS 9 311 26521600
220354553 humblebose E Aug. 25, 2023, 8:35 a.m. OK Python 3 TESTS 9 358 27955200
220356522 sagarpal1909 E Aug. 25, 2023, 9:06 a.m. OK Python 3 TESTS 9 483 27852800
220448516 DATVN E Aug. 26, 2023, 1:13 a.m. OK Rust 2021 TESTS 9 46 18329600
220374228 Rajveer_100 E Aug. 25, 2023, 12:27 p.m. OK Rust 2021 TESTS 9 46 18329600

remove filters

Back to search problems