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 |
---|---|---|---|---|---|---|
1914 | Codeforces Round 916 (Div. 3) | FINISHED | False | 9000 | 34183463 | Dec. 19, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 23596 ) | D | Three Activities | PROGRAMMING | brute force dp implementation sortings |
B"Winter holidays are coming up. They are going to last for n days. During the holidays, Monocarp wants to try all of these activities exactly once with his friends: Monocarp knows that, on the i -th day, exactly a_i friends will join him for skiing, b_i friends will join him for a movie and c_i friends will join him for board games. Monocarp also knows that he can't try more than one activity in a single day. Thus, he asks you to help him choose three distinct days x, y, z in such a way that the total number of friends to join him for the activities ( a_x + b_y + c_z ) is maximized. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The first line of each testcase contains a single integer n ( 3 <= n <= 10^5 ) -- the duration of the winter holidays in days. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^8 ) -- the number of friends that will join Monocarp for skiing on the i -th day. The third line contains n integers b_1, b_2, ... , b_n ( 1 <= b_i <= 10^8 ) -- the number of friends that will join Monocarp for a movie on the i -th day. The fourth line contains n integers c_1, c_2, ... , c_n ( 1 <= c_i <= 10^8 ) -- the number of friends that will join Monocarp for board games on the i -th day. The sum of n over all testcases doesn't exceed 10^5 . For each testcase, print a single integer -- the maximum total number of friends that can join Monocarp for the activities on three distinct days. In the first testcase, Monocarp can choose day 2 for skiing, day 1 for a movie and day 3 for board games. This way, a_2 = 10 friends will join him for skiing, b_1 = 10 friends will join him for a movie and c_3 = 10 friends will join him for board games. The total number of friends is 30 . In the second testcase,"... |
Codeforces Round 916 (Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
238052286 | Masud-Parvez | D | Dec. 19, 2023, 5:07 p.m. | OK | C# 10 | TESTS | 19 | 155 | 32870400 | ||
238068172 | volhalink | D | Dec. 19, 2023, 7:15 p.m. | OK | C# 10 | TESTS | 19 | 156 | 30310400 | ||
238083529 | bluemegane | D | Dec. 20, 2023, 1:10 a.m. | OK | C# 8 | TESTS | 19 | 187 | 36556800 | ||
238085306 | dead00 | D | Dec. 20, 2023, 1:55 a.m. | OK | Clang++20 Diagnostics | TESTS | 19 | 1887 | 5632000 | ||
238049397 | HLJU_23_wangxilong | D | Dec. 19, 2023, 5 p.m. | OK | GNU C11 | TESTS | 19 | 124 | 3993600 | ||
238061641 | khadkeshwar_789 | D | Dec. 19, 2023, 6:08 p.m. | OK | GNU C++14 | TESTS | 19 | 93 | 1228800 | ||
238087270 | RichardLau | D | Dec. 20, 2023, 2:40 a.m. | OK | GNU C++14 | TESTS | 19 | 93 | 2457600 | ||
238084819 | 18612631378 | D | Dec. 20, 2023, 1:43 a.m. | OK | GNU C++14 | TESTS | 19 | 93 | 2457600 | ||
238087292 | RichardLau | D | Dec. 20, 2023, 2:41 a.m. | OK | GNU C++14 | TESTS | 19 | 93 | 2457600 | ||
238081393 | jr_inf | D | Dec. 19, 2023, 11:57 p.m. | OK | GNU C++14 | TESTS | 19 | 93 | 2560000 | ||
238064812 | _rishikatiwari | D | Dec. 19, 2023, 6:39 p.m. | OK | GNU C++14 | TESTS | 19 | 93 | 3584000 | ||
238079807 | Parallel_Retrogression | D | Dec. 19, 2023, 11:01 p.m. | OK | GNU C++14 | TESTS | 19 | 93 | 8806400 | ||
238096818 | tahoangquan2 | D | Dec. 20, 2023, 5:14 a.m. | OK | GNU C++14 | TESTS | 19 | 93 | 8806400 | ||
238053772 | Nullcout | D | Dec. 19, 2023, 5:13 p.m. | OK | GNU C++14 | TESTS | 19 | 93 | 15564800 | ||
238066422 | 228r1a62h3 | D | Dec. 19, 2023, 6:56 p.m. | OK | GNU C++14 | TESTS | 19 | 108 | 2457600 | ||
238055682 | tomoyocedar | D | Dec. 19, 2023, 5:24 p.m. | OK | GNU C++17 | TESTS | 19 | 78 | 3993600 | ||
238086828 | Hamza_2305101680 | D | Dec. 20, 2023, 2:31 a.m. | OK | GNU C++17 | TESTS | 19 | 93 | 0 | ||
238093364 | Roberth_G | D | Dec. 20, 2023, 4:26 a.m. | OK | GNU C++17 | TESTS | 19 | 93 | 102400 | ||
238060235 | shivam2002 | D | Dec. 19, 2023, 5:56 p.m. | OK | GNU C++17 | TESTS | 19 | 93 | 204800 | ||
238085522 | Surendra_22 | D | Dec. 20, 2023, 2:01 a.m. | OK | GNU C++17 | TESTS | 19 | 93 | 1228800 | ||
238084790 | Abdohefny | D | Dec. 20, 2023, 1:43 a.m. | OK | GNU C++17 | TESTS | 19 | 93 | 1228800 | ||
238055199 | serious_af | D | Dec. 19, 2023, 5:21 p.m. | OK | GNU C++17 | TESTS | 19 | 93 | 1228800 | ||
238053170 | Abeke08 | D | Dec. 19, 2023, 5:10 p.m. | OK | GNU C++17 | TESTS | 19 | 93 | 1228800 | ||
238086790 | shoshoshom | D | Dec. 20, 2023, 2:30 a.m. | OK | GNU C++17 | TESTS | 19 | 93 | 1228800 | ||
238082098 | you-jin-plus | D | Dec. 20, 2023, 12:25 a.m. | OK | GNU C++17 | TESTS | 19 | 93 | 2355200 | ||
238076859 | enslaved | D | Dec. 19, 2023, 9:38 p.m. | OK | GNU C++17 (64) | TESTS | 19 | 62 | 1228800 | ||
238096079 | qdhys | D | Dec. 20, 2023, 5:05 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 62 | 1228800 | ||
238094813 | Proaes | D | Dec. 20, 2023, 4:47 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 62 | 1638400 | ||
238054934 | manishjha91 | D | Dec. 19, 2023, 5:20 p.m. | OK | GNU C++17 (64) | TESTS | 19 | 62 | 2048000 | ||
238097105 | shiva51 | D | Dec. 20, 2023, 5:18 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 62 | 2457600 | ||
238081607 | aword | D | Dec. 20, 2023, 12:05 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 62 | 3584000 | ||
238048369 | divyam_raj | D | Dec. 19, 2023, 4:58 p.m. | OK | GNU C++17 (64) | TESTS | 19 | 62 | 8806400 | ||
238091081 | bjjvsrjjt | D | Dec. 20, 2023, 3:51 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 62 | 11264000 | ||
238093068 | lengmuzhaxi | D | Dec. 20, 2023, 4:21 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 77 | 2457600 | ||
238085399 | daud04 | D | Dec. 20, 2023, 1:58 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 77 | 2457600 | ||
238046637 | Omqr | D | Dec. 19, 2023, 4:54 p.m. | OK | GNU C++20 (64) | TESTS | 19 | 46 | 1228800 | ||
238050017 | osama_sakr | D | Dec. 19, 2023, 5:01 p.m. | OK | GNU C++20 (64) | TESTS | 19 | 46 | 1228800 | ||
238052358 | Bharath_Cheppala | D | Dec. 19, 2023, 5:07 p.m. | OK | GNU C++20 (64) | TESTS | 19 | 46 | 1228800 | ||
238069565 | skr_7269 | D | Dec. 19, 2023, 7:34 p.m. | OK | GNU C++20 (64) | TESTS | 19 | 46 | 1228800 | ||
238098891 | DaNiSiM0S | D | Dec. 20, 2023, 5:39 a.m. | OK | GNU C++20 (64) | TESTS | 19 | 46 | 2355200 | ||
238081822 | hanifchdn | D | Dec. 20, 2023, 12:13 a.m. | OK | GNU C++20 (64) | TESTS | 19 | 46 | 2457600 | ||
238097643 | Akshat.Jain | D | Dec. 20, 2023, 5:24 a.m. | OK | GNU C++20 (64) | TESTS | 19 | 46 | 2457600 | ||
238088405 | avi_coder | D | Dec. 20, 2023, 3:04 a.m. | OK | GNU C++20 (64) | TESTS | 19 | 46 | 2457600 | ||
238073415 | _Sherbiny | D | Dec. 19, 2023, 8:30 p.m. | OK | GNU C++20 (64) | TESTS | 19 | 46 | 2457600 | ||
238053637 | ttamx | D | Dec. 19, 2023, 5:13 p.m. | OK | GNU C++20 (64) | TESTS | 19 | 46 | 2457600 | ||
238053500 | chonchon2605 | D | Dec. 19, 2023, 5:12 p.m. | OK | Go | TESTS | 19 | 93 | 13619200 | ||
238056618 | ajayg3059 | D | Dec. 19, 2023, 5:30 p.m. | OK | Go | TESTS | 19 | 202 | 7475200 | ||
238057032 | ajayg3059 | D | Dec. 19, 2023, 5:32 p.m. | OK | Go | TESTS | 19 | 217 | 7475200 | ||
238055732 | ajayg3059 | D | Dec. 19, 2023, 5:24 p.m. | OK | Go | TESTS | 19 | 233 | 7475200 | ||
238055920 | ajayg3059 | D | Dec. 19, 2023, 5:25 p.m. | OK | Go | TESTS | 19 | 233 | 7475200 | ||
238055567 | ajayg3059 | D | Dec. 19, 2023, 5:23 p.m. | OK | Go | TESTS | 19 | 249 | 7475200 | ||
238054433 | Bipul70701 | D | Dec. 19, 2023, 5:17 p.m. | OK | Java 11 | TESTS | 19 | 265 | 0 | ||
238055969 | Nekronishe | D | Dec. 19, 2023, 5:26 p.m. | OK | Java 11 | TESTS | 19 | 280 | 0 | ||
238058552 | mattr | D | Dec. 19, 2023, 5:42 p.m. | OK | Java 11 | TESTS | 19 | 342 | 9830400 | ||
238099502 | kasiru_69 | D | Dec. 20, 2023, 5:47 a.m. | OK | Java 11 | TESTS | 19 | 358 | 6041600 | ||
238095095 | ahanasaha01 | D | Dec. 20, 2023, 4:52 a.m. | OK | Java 11 | TESTS | 19 | 685 | 6348800 | ||
238053462 | PlayDate | D | Dec. 19, 2023, 5:12 p.m. | OK | Java 11 | TESTS | 19 | 686 | 0 | ||
238066236 | vedjaiswal | D | Dec. 19, 2023, 6:54 p.m. | OK | Java 11 | TESTS | 19 | 686 | 6348800 | ||
238071343 | mkaran | D | Dec. 19, 2023, 7:58 p.m. | OK | Java 11 | TESTS | 19 | 1513 | 143769600 | ||
238059622 | snowyrsb | D | Dec. 19, 2023, 5:51 p.m. | OK | Java 17 | TESTS | 19 | 296 | 2252800 | ||
238050374 | snowyrsb | D | Dec. 19, 2023, 5:02 p.m. | OK | Java 17 | TESTS | 19 | 296 | 2560000 | ||
238093809 | AKhacks | D | Dec. 20, 2023, 4:32 a.m. | OK | Java 17 | TESTS | 19 | 327 | 28876800 | ||
238099015 | NatsuDragoneel | D | Dec. 20, 2023, 5:41 a.m. | OK | Java 17 | TESTS | 19 | 374 | 1638400 | ||
238095222 | BrisS | D | Dec. 20, 2023, 4:53 a.m. | OK | Java 17 | TESTS | 19 | 483 | 8908800 | ||
238046775 | anand_mishra_ | D | Dec. 19, 2023, 4:55 p.m. | OK | Java 17 | TESTS | 19 | 545 | 33484800 | ||
238064726 | afasano4 | D | Dec. 19, 2023, 6:38 p.m. | OK | Java 17 | TESTS | 19 | 733 | 307200 | ||
238056062 | prac_123 | D | Dec. 19, 2023, 5:26 p.m. | OK | Java 17 | TESTS | 19 | 763 | 21196800 | ||
238070839 | BleedBlue | D | Dec. 19, 2023, 7:51 p.m. | OK | Java 17 | TESTS | 19 | 811 | 6963200 | ||
238077984 | prathamesh_204 | D | Dec. 19, 2023, 10:05 p.m. | OK | Java 17 | TESTS | 19 | 826 | 35737600 | ||
238087305 | Ligh0x74 | D | Dec. 20, 2023, 2:41 a.m. | OK | Java 21 | TESTS | 19 | 343 | 819200 | ||
238061705 | rated21 | D | Dec. 19, 2023, 6:09 p.m. | OK | Java 21 | TESTS | 19 | 389 | 4812800 | ||
238060988 | newborn_23 | D | Dec. 19, 2023, 6:03 p.m. | OK | Java 21 | TESTS | 19 | 389 | 4812800 | ||
238086118 | Ligh0x74 | D | Dec. 20, 2023, 2:16 a.m. | OK | Java 21 | TESTS | 19 | 436 | 2560000 | ||
238076295 | darshanjan-entrepreneur | D | Dec. 19, 2023, 9:25 p.m. | OK | Java 21 | TESTS | 19 | 467 | 9830400 | ||
238067677 | wintersoldier2004 | D | Dec. 19, 2023, 7:10 p.m. | OK | Java 21 | TESTS | 19 | 467 | 10444800 | ||
238050003 | durgeshpoint111 | D | Dec. 19, 2023, 5:01 p.m. | OK | Java 21 | TESTS | 19 | 858 | 6860800 | ||
238076179 | rivaldo0608 | D | Dec. 19, 2023, 9:22 p.m. | OK | Java 21 | TESTS | 19 | 873 | 6758400 | ||
238064996 | Rachhh_04 | D | Dec. 19, 2023, 6:41 p.m. | OK | Java 21 | TESTS | 19 | 889 | 1331200 | ||
238047734 | whitespace07 | D | Dec. 19, 2023, 4:57 p.m. | OK | Java 21 | TESTS | 19 | 920 | 819200 | ||
238070693 | Sumitsingh7 | D | Dec. 19, 2023, 7:50 p.m. | OK | Java 8 | TESTS | 19 | 202 | 5939200 | ||
238051172 | yadavDipesh | D | Dec. 19, 2023, 5:04 p.m. | OK | Java 8 | TESTS | 19 | 217 | 3788800 | ||
238086229 | mohamedhassan_c | D | Dec. 20, 2023, 2:18 a.m. | OK | Java 8 | TESTS | 19 | 217 | 41472000 | ||
238084843 | id_294091u4 | D | Dec. 20, 2023, 1:44 a.m. | OK | Java 8 | TESTS | 19 | 218 | 5529600 | ||
238059218 | American_Eagle | D | Dec. 19, 2023, 5:48 p.m. | OK | Java 8 | TESTS | 19 | 296 | 16588800 | ||
238049224 | SparkX | D | Dec. 19, 2023, 5 p.m. | OK | Java 8 | TESTS | 19 | 358 | 9420800 | ||
238048633 | faresbadr316 | D | Dec. 19, 2023, 4:59 p.m. | OK | Java 8 | TESTS | 19 | 451 | 20684800 | ||
238094823 | coderman2004 | D | Dec. 20, 2023, 4:47 a.m. | OK | Java 8 | TESTS | 19 | 748 | 32972800 | ||
238091501 | HiddenMoon | D | Dec. 20, 2023, 3:58 a.m. | OK | MS C++ 2017 | TESTS | 19 | 296 | 1638400 | ||
238055315 | mounikakasa72 | D | Dec. 19, 2023, 5:22 p.m. | OK | MS C++ 2017 | TESTS | 19 | 311 | 2457600 | ||
238063735 | ng_jahkhanh39 | D | Dec. 19, 2023, 6:27 p.m. | OK | MS C++ 2017 | TESTS | 19 | 327 | 1228800 | ||
238088343 | ShadowDrunk | D | Dec. 20, 2023, 3:03 a.m. | OK | MS C++ 2017 | TESTS | 19 | 327 | 2457600 | ||
238051766 | joyboy00329 | D | Dec. 19, 2023, 5:04 p.m. | OK | MS C++ 2017 | TESTS | 19 | 373 | 2457600 | ||
238050031 | amit_shinde | D | Dec. 19, 2023, 5:02 p.m. | OK | MS C++ 2017 | TESTS | 19 | 1575 | 187084800 | ||
238053773 | Aqassem2004 | D | Dec. 19, 2023, 5:13 p.m. | OK | PyPy 3 | TESTS | 19 | 249 | 14336000 | ||
238056949 | Kvazarus | D | Dec. 19, 2023, 5:31 p.m. | OK | PyPy 3 | TESTS | 19 | 842 | 17920000 | ||
238064504 | brimstone | D | Dec. 19, 2023, 6:35 p.m. | OK | PyPy 3 | TESTS | 19 | 888 | 18124800 | ||
238095107 | lisashi | D | Dec. 20, 2023, 4:52 a.m. | OK | PyPy 3 | TESTS | 19 | 1029 | 17203200 | ||
238062024 | porker2008 | D | Dec. 19, 2023, 6:11 p.m. | OK | PyPy 3 | TESTS | 19 | 1091 | 17305600 | ||
238054281 | seeforty4040 | D | Dec. 19, 2023, 5:16 p.m. | OK | PyPy 3 | TESTS | 19 | 1107 | 23244800 | ||
238050817 | zhdanovich | D | Dec. 19, 2023, 5:03 p.m. | OK | PyPy 3 | TESTS | 19 | 1122 | 17203200 | ||
238069837 | skr_7269 | D | Dec. 19, 2023, 7:38 p.m. | OK | PyPy 3 | TESTS | 19 | 1138 | 17408000 | ||
238055313 | diden14 | D | Dec. 19, 2023, 5:22 p.m. | OK | PyPy 3 | TESTS | 19 | 1169 | 23449600 | ||
238069975 | skr_7269 | D | Dec. 19, 2023, 7:40 p.m. | OK | PyPy 3 | TESTS | 19 | 1185 | 19660800 | ||
238053744 | Ermit05 | D | Dec. 19, 2023, 5:13 p.m. | OK | PyPy 3-64 | TESTS | 19 | 186 | 23654400 | ||
238064394 | Pimple | D | Dec. 19, 2023, 6:34 p.m. | OK | PyPy 3-64 | TESTS | 19 | 187 | 29286400 | ||
238062220 | pythonist_viking | D | Dec. 19, 2023, 6:13 p.m. | OK | PyPy 3-64 | TESTS | 19 | 233 | 29491200 | ||
238064818 | Pimple | D | Dec. 19, 2023, 6:39 p.m. | OK | PyPy 3-64 | TESTS | 19 | 248 | 29696000 | ||
238049943 | Ghaulehm | D | Dec. 19, 2023, 5:01 p.m. | OK | PyPy 3-64 | TESTS | 19 | 264 | 30515200 | ||
238086507 | gardengnome | D | Dec. 20, 2023, 2:24 a.m. | OK | PyPy 3-64 | TESTS | 19 | 265 | 28057600 | ||
238055548 | Noteeeeeee | D | Dec. 19, 2023, 5:23 p.m. | OK | PyPy 3-64 | TESTS | 19 | 311 | 23347200 | ||
238047396 | kefolen | D | Dec. 19, 2023, 4:56 p.m. | OK | PyPy 3-64 | TESTS | 19 | 311 | 27545600 | ||
238057335 | 479 | D | Dec. 19, 2023, 5:34 p.m. | OK | PyPy 3-64 | TESTS | 19 | 405 | 24268800 | ||
238080023 | GodZhere | D | Dec. 19, 2023, 11:08 p.m. | OK | PyPy 3-64 | TESTS | 19 | 405 | 28876800 | ||
238073829 | malekbahr | D | Dec. 19, 2023, 8:36 p.m. | OK | Python 3 | TESTS | 19 | 296 | 22937600 | ||
238053121 | Oreo99 | D | Dec. 19, 2023, 5:10 p.m. | OK | Python 3 | TESTS | 19 | 327 | 22220800 | ||
238050557 | vakenris | D | Dec. 19, 2023, 5:03 p.m. | OK | Python 3 | TESTS | 19 | 374 | 22937600 | ||
238097353 | wwgjy | D | Dec. 20, 2023, 5:21 a.m. | OK | Python 3 | TESTS | 19 | 405 | 45977600 | ||
238072333 | StealthyPanda | D | Dec. 19, 2023, 8:13 p.m. | OK | Python 3 | TESTS | 19 | 420 | 50073600 | ||
238058463 | learnerdaily5 | D | Dec. 19, 2023, 5:42 p.m. | OK | Python 3 | TESTS | 19 | 420 | 51302400 | ||
238055223 | harshs_21 | D | Dec. 19, 2023, 5:21 p.m. | OK | Python 3 | TESTS | 19 | 420 | 51302400 | ||
238062687 | abhijit07cf | D | Dec. 19, 2023, 6:17 p.m. | OK | Python 3 | TESTS | 19 | 436 | 28262400 | ||
238064601 | rishabhxchoudhary | D | Dec. 19, 2023, 6:36 p.m. | OK | Python 3 | TESTS | 19 | 436 | 44441600 | ||
238050333 | K.siddartha | D | Dec. 19, 2023, 5:02 p.m. | OK | Python 3 | TESTS | 19 | 436 | 45158400 | ||
238097203 | 0x81 | D | Dec. 20, 2023, 5:19 a.m. | OK | Ruby 3 | TESTS | 19 | 1060 | 51609600 | ||
238097591 | 0x81 | D | Dec. 20, 2023, 5:24 a.m. | OK | Ruby 3 | TESTS | 19 | 1091 | 33792000 | ||
238066344 | matheusdacach | D | Dec. 19, 2023, 6:56 p.m. | OK | Rust 2021 | TESTS | 19 | 31 | 2457600 | ||
238066621 | liut | D | Dec. 19, 2023, 6:58 p.m. | OK | Rust 2021 | TESTS | 19 | 46 | 4403200 | ||
238055411 | emiliopeju | D | Dec. 19, 2023, 5:22 p.m. | OK | Rust 2021 | TESTS | 19 | 140 | 15257600 | ||
238047516 | Rajveer_100 | D | Dec. 19, 2023, 4:56 p.m. | OK | Rust 2021 | TESTS | 19 | 140 | 18227200 |
Back to search problems