Codeforces Round 645 (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
1358 Codeforces Round 645 (Div. 2) FINISHED False 7200 141319499 May 26, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8199 ) D The Best Vacation PROGRAMMING binary search brute force greedy implementation two pointers 1900

B"You've been in love with Coronavirus-chan for a long time, but you didn't know where she lived until now. And just now you found out that she lives in a faraway place called Naha. You immediately decided to take a vacation and visit Coronavirus-chan. Your vacation lasts exactly x days and that's the exact number of days you will spend visiting your friend. You will spend exactly x consecutive (successive) days visiting Coronavirus-chan. They use a very unusual calendar in Naha: there are n months in a year, i -th month lasts exactly d_i days. Days in the i -th month are numbered from 1 to d_i . There are no leap years in Naha. The mood of Coronavirus-chan (and, accordingly, her desire to hug you) depends on the number of the day in a month. In particular, you get j hugs if you visit Coronavirus-chan on the j -th day of the month. You know about this feature of your friend and want to plan your trip to get as many hugs as possible (and then maybe you can win the heart of Coronavirus-chan). Please note that your trip should not necessarily begin and end in the same year. The first line of input contains two integers n and x ( 1 <= n <= 2 cdot 10^5 ) -- the number of months in the year and the number of days you can spend with your friend. The second line contains n integers d_1, d_2, ldots, d_n , d_i is the number of days in the i -th month ( 1 <= d_i <= 10^6 ). It is guaranteed that 1 <= x <= d_1 + d_2 + ldots + d_n . Print one integer -- the maximum number of hugs that you can get from Coronavirus-chan during the best vacation in your life. In the first test case, the numbers of the days in a year are (indices of days in a corresponding month) {1,1,2,3,1 } . Coronavirus-chan will hug you the most if you come on the third day of the year: 2+3=5 hugs. In the second test case, the numbers of the days are {1,2,3,1,2,3,1,2,3 } . "...

Tutorials

Codeforces Round #645 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
81550904 daut-dlang D May 26, 2020, 5:34 p.m. OK D TESTS 106 140 38400000 1900
81526925 ruban D May 26, 2020, 3:48 p.m. OK Delphi TESTS 106 93 67686400 1900
81529572 function_of_zero D May 26, 2020, 3:55 p.m. OK GNU C++11 TESTS 106 46 1433600 1900
81535258 Angel_Demon D May 26, 2020, 4:08 p.m. OK GNU C++11 TESTS 106 46 3174400 1900
81644444 songhn233 D May 27, 2020, 5:33 p.m. OK GNU C++11 TESTS 107 46 3481600 1900
81549660 YuanZhizheng D May 26, 2020, 5:29 p.m. OK GNU C++11 TESTS 106 46 6451200 1900
81588677 wasa855 D May 27, 2020, 6:37 a.m. OK GNU C++11 TESTS 107 46 6656000 1900
81543495 zhaoleyi1 D May 26, 2020, 4:27 p.m. OK GNU C++11 TESTS 106 46 6656000 1900
81576394 spnooyseed D May 27, 2020, 3:19 a.m. OK GNU C++11 TESTS 107 46 7987200 1900
81576425 spnooyseed D May 27, 2020, 3:19 a.m. OK GNU C++11 TESTS 107 46 8294400 1900
81572775 Logey D May 27, 2020, 1:51 a.m. OK GNU C++11 TESTS 107 46 8294400 1900
81570219 msuwakow D May 27, 2020, 12:29 a.m. OK GNU C++11 TESTS 107 46 8499200 1900
81554038 fractal D May 26, 2020, 6:11 p.m. OK GNU C++14 TESTS 106 46 9216000 1900
81591915 idxcalcal D May 27, 2020, 7:18 a.m. OK GNU C++14 TESTS 107 62 33177600 1900
81543443 InsaneNerd D May 26, 2020, 4:27 p.m. OK GNU C++14 TESTS 106 77 1843200 1900
81540403 KhaledFarhat D May 26, 2020, 4:21 p.m. OK GNU C++14 TESTS 106 77 1843200 1900
81530081 PauloMiranda98 D May 26, 2020, 3:56 p.m. OK GNU C++14 TESTS 106 77 1843200 1900
81573270 dy2000 D May 27, 2020, 2:07 a.m. OK GNU C++14 TESTS 107 77 3379200 1900
81531734 HipHop D May 26, 2020, 4 p.m. OK GNU C++14 TESTS 106 77 4198400 1900
81593355 squirrel123 D May 27, 2020, 7:36 a.m. OK GNU C++14 TESTS 107 78 819200 1900
81601056 sherlocked_1 D May 27, 2020, 9:09 a.m. OK GNU C++14 TESTS 107 78 1638400 1900
81679812 Amel_ D May 28, 2020, 7:15 a.m. OK GNU C++14 TESTS 107 78 1843200 1900
81575201 guithin2 D May 27, 2020, 2:55 a.m. OK GNU C++17 TESTS 107 62 1843200 1900
81529861 Mint_Choco D May 26, 2020, 3:55 p.m. OK GNU C++17 TESTS 106 62 5120000 1900
81570398 goodnight007 D May 27, 2020, 12:35 a.m. OK GNU C++17 TESTS 107 62 8294400 1900
81606638 cormacc D May 27, 2020, 10:22 a.m. OK GNU C++17 TESTS 107 77 1024000 1900
81601077 trainDOGGO D May 27, 2020, 9:10 a.m. OK GNU C++17 TESTS 107 77 24064000 1900
81572335 Eureka17 D May 27, 2020, 1:37 a.m. OK GNU C++17 TESTS 107 78 819200 1900
81590687 GOODGOODNOTBAD D May 27, 2020, 7:02 a.m. OK GNU C++17 TESTS 107 78 1024000 1900
81534527 Sadra D May 26, 2020, 4:07 p.m. OK GNU C++17 TESTS 106 78 1024000 1900
81593683 salehsargolzaee D May 27, 2020, 7:41 a.m. OK GNU C++17 TESTS 107 78 1638400 1900
81579483 wysoowek D May 27, 2020, 4:20 a.m. OK GNU C++17 TESTS 107 78 1638400 1900
81540099 xiaofan7 D May 26, 2020, 4:20 p.m. OK GNU C++17 (64) TESTS 106 46 32460800 1900
81535566 yashar_sb_sb D May 26, 2020, 4:09 p.m. OK GNU C++17 (64) TESTS 106 61 1843200 1900
81650166 Lrt1088 D May 27, 2020, 7:11 p.m. OK GNU C++17 (64) TESTS 107 61 12800000 1900
81572325 Eureka17 D May 27, 2020, 1:37 a.m. OK GNU C++17 (64) TESTS 107 62 1024000 1900
81660192 smax D May 28, 2020, 12:15 a.m. OK GNU C++17 (64) TESTS 107 62 1638400 1900
81561840 Lite_Clique D May 26, 2020, 8:03 p.m. OK GNU C++17 (64) TESTS 107 62 1638400 1900
81551135 sayanmedya D May 26, 2020, 5:46 p.m. OK GNU C++17 (64) TESTS 106 62 1638400 1900
81550271 marksman_ D May 26, 2020, 5:31 p.m. OK GNU C++17 (64) TESTS 106 62 1638400 1900
81546795 Mohammad_Yasser D May 26, 2020, 4:33 p.m. OK GNU C++17 (64) TESTS 106 62 1843200 1900
81537364 Stiff_Subset D May 26, 2020, 4:13 p.m. OK GNU C++17 (64) TESTS 106 62 1843200 1900
81597003 synapse D May 27, 2020, 8:22 a.m. OK Go TESTS 107 202 17510400 1900
81641021 maguroguma D May 27, 2020, 4:51 p.m. OK Go TESTS 107 1169 48844800 1900
81550779 buj D May 26, 2020, 5:34 p.m. OK Haskell TESTS 106 717 53555200 1900
81538134 Russell_Emerine D May 26, 2020, 4:15 p.m. OK Haskell TESTS 106 888 86220800 1900
81563629 saikaushik333 D May 26, 2020, 8:38 p.m. OK Java 11 TESTS 107 187 0 1900
81558109 Mann_27__ D May 26, 2020, 7:01 p.m. OK Java 11 TESTS 107 218 0 1900
81532478 wackloner D May 26, 2020, 4:02 p.m. OK Java 11 TESTS 106 218 1843200 1900
81621945 In_The_Name_Of_Love D May 27, 2020, 1:16 p.m. OK Java 11 TESTS 107 233 4915200 1900
81577475 avijit_agarwal D May 27, 2020, 3:39 a.m. OK Java 11 TESTS 107 233 4915200 1900
81598070 pgupta9830 D May 27, 2020, 8:33 a.m. OK Java 11 TESTS 107 233 5222400 1900
81567746 Apass.Jack D May 26, 2020, 10:46 p.m. OK Java 11 TESTS 107 234 3276800 1900
81540788 byorgey D May 26, 2020, 4:21 p.m. OK Java 11 TESTS 106 234 4300800 1900
81577673 avijit_agarwal D May 27, 2020, 3:43 a.m. OK Java 11 TESTS 107 234 4915200 1900
81546319 Tatsuyaaaa D May 26, 2020, 4:33 p.m. OK Java 11 TESTS 106 249 0 1900
81685661 bluesky111 D May 28, 2020, 8:29 a.m. OK Java 8 TESTS 107 140 0 1900
81594468 te_amo D May 27, 2020, 7:50 a.m. OK Java 8 TESTS 107 140 0 1900
81596681 Faizan D May 27, 2020, 8:18 a.m. OK Java 8 TESTS 107 155 0 1900
81552096 mei_hu_don D May 26, 2020, 5:53 p.m. OK Java 8 TESTS 106 155 0 1900
81545824 priyesh001 D May 26, 2020, 4:32 p.m. OK Java 8 TESTS 106 156 0 1900
81656586 pavel.v.shlyk D May 27, 2020, 9:37 p.m. OK Java 8 TESTS 107 171 0 1900
81620451 devang1998 D May 27, 2020, 12:58 p.m. OK Java 8 TESTS 107 171 0 1900
81707534 sunnycarlos D May 28, 2020, 1:04 p.m. OK Java 8 TESTS 107 171 2662400 1900
81560967 arnav_mandal D May 26, 2020, 7:48 p.m. OK Java 8 TESTS 107 171 2764800 1900
81550400 bwang1008 D May 26, 2020, 5:32 p.m. OK Java 8 TESTS 106 171 2764800 1900
81595855 Spheniscine D May 27, 2020, 8:09 a.m. OK Kotlin TESTS 107 155 2560000 1900
81596534 Spheniscine D May 27, 2020, 8:16 a.m. OK Kotlin TESTS 107 156 2560000 1900
81578748 liouzhou_101 D May 27, 2020, 4:04 a.m. OK Kotlin TESTS 107 171 13414400 1900
81557524 Tlatoani D May 26, 2020, 6:53 p.m. OK Kotlin TESTS 107 249 16076800 1900
81562643 songsinger D May 26, 2020, 8:18 p.m. OK Kotlin TESTS 107 265 13824000 1900
81533995 gleb.astashkin D May 26, 2020, 4:05 p.m. OK Kotlin TESTS 106 358 19456000 1900
81578921 batkhuyag D May 27, 2020, 4:08 a.m. OK Kotlin TESTS 107 389 20992000 1900
81547137 amelentev D May 26, 2020, 4:34 p.m. OK Kotlin TESTS 106 405 4096000 1900
81546558 arsh1598 D May 26, 2020, 4:33 p.m. OK Kotlin TESTS 106 436 5017600 1900
81569010 speshuric D May 26, 2020, 11:46 p.m. OK Kotlin TESTS 107 592 38297600 1900
81600144 avtoruxadze D May 27, 2020, 8:58 a.m. OK Mono C# TESTS 107 155 27545600 1900
81552345 mban259 D May 26, 2020, 5:55 p.m. OK Mono C# TESTS 106 156 32972800 1900
81618701 _Trung_Nguyen D May 27, 2020, 12:40 p.m. OK Mono C# TESTS 107 186 34304000 1900
81654087 teru D May 27, 2020, 8:27 p.m. OK Mono C# TESTS 107 186 34611200 1900
81541138 hibatibati D May 26, 2020, 4:22 p.m. OK Mono C# TESTS 106 202 36352000 1900
81543234 fancy_lettuce D May 26, 2020, 4:27 p.m. OK Mono C# TESTS 106 202 37478400 1900
81574842 terry_u16 D May 27, 2020, 2:48 a.m. OK Mono C# TESTS 107 218 40755200 1900
81527691 Arnyev D May 26, 2020, 3:50 p.m. OK Mono C# TESTS 106 218 41881600 1900
81619660 Paranoid19 D May 27, 2020, 12:50 p.m. OK MS C++ TESTS 107 78 33382400 1900
81538218 zzq233 D May 26, 2020, 4:15 p.m. OK MS C++ TESTS 106 93 7987200 1900
81550515 dundae D May 26, 2020, 5:32 p.m. OK MS C++ 2017 TESTS 106 78 3174400 1900
81601265 lwd-haki D May 27, 2020, 9:12 a.m. OK MS C++ 2017 TESTS 107 93 3174400 1900
81527443 P___ D May 26, 2020, 3:50 p.m. OK MS C++ 2017 TESTS 106 93 7987200 1900
81708332 Accelerating D May 28, 2020, 1:14 p.m. OK MS C++ 2017 TESTS 107 93 12083200 1900
81707862 Accelerating D May 28, 2020, 1:08 p.m. OK MS C++ 2017 TESTS 107 93 12083200 1900
81708417 Accelerating D May 28, 2020, 1:15 p.m. OK MS C++ 2017 TESTS 107 93 12800000 1900
81616359 ZA139 D May 27, 2020, 12:16 p.m. OK MS C++ 2017 TESTS 107 109 8294400 1900
81551616 ningBr D May 26, 2020, 5:49 p.m. OK MS C++ 2017 TESTS 106 109 9625600 1900
81557233 deuslovelt D May 26, 2020, 6:49 p.m. OK MS C++ 2017 TESTS 107 187 9932800 1900
81551404 Baharevim D May 26, 2020, 5:48 p.m. OK MS C++ 2017 TESTS 106 202 1843200 1900
81654815 yumtam D May 27, 2020, 8:45 p.m. OK PyPy 2 TESTS 107 405 14848000 1900
81566757 realnimish D May 26, 2020, 10:03 p.m. OK PyPy 2 TESTS 107 561 58265600 1900
81533371 IndianSnakeCharmer D May 26, 2020, 4:04 p.m. OK PyPy 2 TESTS 106 670 56832000 1900
81565377 c1729 D May 26, 2020, 9:20 p.m. OK PyPy 2 TESTS 107 701 56832000 1900
81671219 anshuman16423 D May 28, 2020, 5:16 a.m. OK PyPy 2 TESTS 107 872 57139200 1900
81671592 anshuman16423 D May 28, 2020, 5:23 a.m. OK PyPy 2 TESTS 107 951 57344000 1900
81528284 Gaurav1 D May 26, 2020, 3:51 p.m. OK PyPy 2 TESTS 106 966 91545600 1900
81593477 Arpanjain.g D May 27, 2020, 7:38 a.m. OK PyPy 3 TESTS 107 327 16691200 1900
81708446 jaastha86 D May 28, 2020, 1:16 p.m. OK PyPy 3 TESTS 107 389 17408000 1900
81557853 dominator1234 D May 26, 2020, 6:57 p.m. OK PyPy 3 TESTS 107 389 19456000 1900
81661075 340951987 D May 28, 2020, 12:49 a.m. OK PyPy 3 TESTS 107 390 17408000 1900
81633410 Nit1n D May 27, 2020, 3:23 p.m. OK PyPy 3 TESTS 107 390 17408000 1900
81593156 Arpanjain.g D May 27, 2020, 7:34 a.m. OK PyPy 3 TESTS 107 390 17510400 1900
81551901 PS41 D May 26, 2020, 5:51 p.m. OK PyPy 3 TESTS 106 404 33382400 1900
81610834 vish029 D May 27, 2020, 11:16 a.m. OK PyPy 3 TESTS 107 405 17408000 1900
81636880 tommyjiang D May 27, 2020, 4:01 p.m. OK PyPy 3 TESTS 107 405 17817600 1900
81540385 sunita41 D May 26, 2020, 4:21 p.m. OK PyPy 3 TESTS 106 405 33280000 1900
81531810 Bluefish2 D May 26, 2020, 4 p.m. OK Python 2 TESTS 106 841 42700800 1900
81620817 Hiroshi.K D May 27, 2020, 1:03 p.m. OK Python 3 TESTS 107 576 15462400 1900
81574193 huikang D May 27, 2020, 2:35 a.m. OK Python 3 TESTS 107 686 28057600 1900
81572062 nebocco D May 27, 2020, 1:28 a.m. OK Python 3 TESTS 107 717 20070400 1900
81703991 bit_2 D May 28, 2020, 12:21 p.m. OK Python 3 TESTS 107 779 15052800 1900
81560656 janatpy D May 26, 2020, 7:43 p.m. OK Python 3 TESTS 107 920 14131200 1900
81647875 Sakshi_09 D May 27, 2020, 6:41 p.m. OK Python 3 TESTS 107 1044 14540800 1900
81532008 Nanored D May 26, 2020, 4 p.m. OK Python 3 TESTS 106 1044 14950400 1900
81531398 vismaymalondkar D May 26, 2020, 3:59 p.m. OK Python 3 TESTS 106 1060 15462400 1900
81709742 17wh1a0532 D May 28, 2020, 1:32 p.m. OK Python 3 TESTS 107 1075 14540800 1900
81549896 1194code D May 26, 2020, 5:30 p.m. OK Python 3 TESTS 106 1075 14540800 1900
81536462 manta1130 D May 26, 2020, 4:11 p.m. OK Rust TESTS 106 62 8704000 1900
81622102 loujunjie D May 27, 2020, 1:18 p.m. OK Rust TESTS 107 62 11776000 1900
81621866 pandrei D May 27, 2020, 1:15 p.m. OK Rust TESTS 107 77 9318400 1900
81550290 rustafarian D May 26, 2020, 5:31 p.m. OK Rust TESTS 106 77 11571200 1900
81551405 macho_uno D May 26, 2020, 5:48 p.m. OK Rust TESTS 106 93 26009600 1900

remove filters

Back to search problems