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
( 21431 ) C Three Parts of the Array PROGRAMMING binary search data structures two pointers 1300

B'You are given an array d_1, d_2, ... , d_n consisting of n integer numbers. Your task is to split this array into three parts (some of which may be empty) in such a way that each element of the array belongs to exactly one of the three parts, and each of the parts forms a consecutive contiguous subsegment (possibly, empty) of the original array. Let the sum of elements of the first part be sum_1 , the sum of elements of the second part be sum_2 and the sum of elements of the third part be sum_3 . Among all possible ways to split the array you have to choose a way such that sum_1 = sum_3 and sum_1 is maximum possible. More formally, if the first part of the array contains a elements, the second part of the array contains b elements and the third part contains c elements, then: sum_1 = sum limits_{1 <= i <= a}d_i, sum_2 = sum limits_{a + 1 <= i <= a + b}d_i, sum_3 = sum limits_{a + b + 1 <= i <= a + b + c}d_i. The sum of an empty array is 0 . Your task is to find a way to split the array such that sum_1 = sum_3 and sum_1 is maximum possible. The first line of the input contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of elements in the array d . The second line of the input contains n integers d_1, d_2, ... , d_n ( 1 <= d_i <= 10^9 ) -- the elements of the array d . Print a single integer -- the maximum possible value of sum_1 , considering that the condition sum_1 = sum_3 must be met. Obviously, at least one valid way to split the array exists (use a=c=0 and b=n ). In the first example there is only one possible splitting which maximizes sum_1 : [1, 3, 1], [~], [1, 4] . In the second example the only way to have sum_1=4 is: [1, 3], [2, 1], [4] . In the third example there is only one way to split the array: [~], [4, 1, 2], [~] . '...

Tutorials

60672

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
45566041 terry_for_venus C Nov. 11, 2018, 2:33 p.m. OK Clang++17 Diagnostics TESTS 27 93 0 1300
40623277 xzjisme C July 22, 2018, 3:39 a.m. OK Clang++17 Diagnostics TESTS 27 108 716800 1300
40623304 vjudge3 C July 22, 2018, 3:41 a.m. OK Clang++17 Diagnostics TESTS 27 108 716800 1300
45524609 terry_for_venus C Nov. 10, 2018, 3:27 p.m. OK Clang++17 Diagnostics TESTS 27 109 0 1300
69944439 vjudge4 C Feb. 1, 2020, 7:09 a.m. OK Clang++17 Diagnostics TESTS 27 109 1843200 1300
40623151 xzjisme C July 22, 2018, 3:32 a.m. OK Clang++17 Diagnostics TESTS 27 156 15872000 1300
40939166 __ShaW C July 30, 2018, 7:50 a.m. OK FPC TESTS 27 77 1638400 1300
40859668 kira_my C July 27, 2018, 7:53 p.m. OK FPC TESTS 27 77 1638400 1300
40681086 Bear.-. C July 23, 2018, 7:39 p.m. OK FPC TESTS 27 77 1638400 1300
63925818 LeVanThuc C Oct. 31, 2019, 12:59 p.m. OK FPC TESTS 27 93 1638400 1300
41677604 Aporajita_Dutta C Aug. 17, 2018, 8:55 a.m. OK GNU C TESTS 27 61 819200 1300
41706734 Mahmud_Bhuiyan C Aug. 17, 2018, 3:35 p.m. OK GNU C TESTS 27 61 819200 1300
41677281 Nayeemz C Aug. 17, 2018, 8:45 a.m. OK GNU C TESTS 27 61 819200 1300
41677119 Abdullahdidar C Aug. 17, 2018, 8:39 a.m. OK GNU C TESTS 27 61 819200 1300
40594036 pilium2 C July 21, 2018, 3:29 a.m. OK GNU C TESTS 27 61 819200 1300
40493487 mtcomscxstart C July 18, 2018, 12:02 a.m. OK GNU C TESTS 27 61 819200 1300
41677103 nahidislamz C Aug. 17, 2018, 8:38 a.m. OK GNU C TESTS 27 62 819200 1300
40615063 Muntaseer_Hafiz_Sazid C July 21, 2018, 5:32 p.m. OK GNU C TESTS 27 62 819200 1300
42001924 Pikassik C Aug. 23, 2018, 3:44 p.m. OK GNU C TESTS 27 62 1638400 1300
40632432 Sadatshahriyar C July 22, 2018, 10:03 a.m. OK GNU C TESTS 27 62 1638400 1300
41325444 vjudge4 C Aug. 8, 2018, 5 a.m. OK GNU C++ TESTS 27 31 819200 1300
40630479 zhtzht C July 22, 2018, 8:44 a.m. OK GNU C++ TESTS 27 31 819200 1300
40997898 Scut82 C July 31, 2018, 5:24 a.m. OK GNU C++ TESTS 27 31 2662400 1300
40654936 vjudge1 C July 23, 2018, 2:53 a.m. OK GNU C++ TESTS 27 46 819200 1300
40993387 Scut82 C July 31, 2018, 1:56 a.m. OK GNU C++ TESTS 27 46 819200 1300
40993385 Scut82 C July 31, 2018, 1:56 a.m. OK GNU C++ TESTS 27 46 819200 1300
40721385 vjudge1 C July 25, 2018, 1:32 a.m. OK GNU C++ TESTS 27 46 1638400 1300
41649282 cyblack HellParty yohan5050 C Aug. 16, 2018, 10:47 a.m. OK GNU C++ TESTS 27 46 3072000 1300
40497313 zichen0535 C July 18, 2018, 3:15 a.m. OK GNU C++ TESTS 27 46 3276800 1300
40607500 weziii C July 21, 2018, 12:20 p.m. OK GNU C++ TESTS 27 46 4812800 1300
57501422 sansen C July 22, 2019, 10:19 a.m. OK GNU C11 TESTS 27 31 819200 1300
54375642 vjudge3 C May 19, 2019, 8:40 a.m. OK GNU C11 TESTS 27 46 819200 1300
46645874 vjudge5 C Dec. 5, 2018, 11:55 a.m. OK GNU C11 TESTS 27 46 819200 1300
54375550 vjudge3 C May 19, 2019, 8:37 a.m. OK GNU C11 TESTS 27 46 3174400 1300
46646132 vjudge2 C Dec. 5, 2018, noon OK GNU C11 TESTS 27 61 819200 1300
49620771 Aadithya18 C Feb. 8, 2019, 9:18 a.m. OK GNU C11 TESTS 27 61 1638400 1300
54375063 vjudge5 C May 19, 2019, 8:25 a.m. OK GNU C11 TESTS 27 62 819200 1300
54950633 pushpraj17307 C June 1, 2019, 7:02 p.m. OK GNU C11 TESTS 27 62 819200 1300
46645850 2018030401093 C Dec. 5, 2018, 11:54 a.m. OK GNU C11 TESTS 27 62 819200 1300
53955379 Overstars C May 10, 2019, 11:40 a.m. OK GNU C11 TESTS 27 62 819200 1300
41593037 qeatzy C Aug. 14, 2018, 3:12 p.m. OK GNU C++11 TESTS 27 31 819200 1300
55520921 Luvwgyx C June 13, 2019, 8:26 a.m. OK GNU C++11 TESTS 27 31 1638400 1300
44231092 _23333 C Oct. 13, 2018, 12:11 a.m. OK GNU C++11 TESTS 27 31 1638400 1300
41953934 xuyifeng C Aug. 22, 2018, 4:53 a.m. OK GNU C++11 TESTS 27 31 1638400 1300
40903468 YangDavid C July 29, 2018, 3:25 a.m. OK GNU C++11 TESTS 27 31 1638400 1300
66809053 Rose__ C Dec. 14, 2019, 12:29 a.m. OK GNU C++11 TESTS 27 31 1638400 1300
46390924 copyright C Nov. 30, 2018, 5:46 a.m. OK GNU C++11 TESTS 27 31 1638400 1300
66809106 hanyin11 C Dec. 14, 2019, 12:34 a.m. OK GNU C++11 TESTS 27 31 3276800 1300
66809108 hanyin11 C Dec. 14, 2019, 12:35 a.m. OK GNU C++11 TESTS 27 31 3276800 1300
48806577 luogu_bot2 C Jan. 23, 2019, 2:43 p.m. OK GNU C++11 TESTS 27 31 4812800 1300
47889036 threepebbles C Jan. 4, 2019, 4:15 a.m. OK GNU C++14 TESTS 27 46 819200 1300
47889380 smsm8111 C Jan. 4, 2019, 4:44 a.m. OK GNU C++14 TESTS 27 61 1024000 1300
63626632 Asif_Watson C Oct. 28, 2019, 4:12 a.m. OK GNU C++14 TESTS 27 62 819200 1300
52728945 vjudge4 C April 14, 2019, 2:45 a.m. OK GNU C++14 TESTS 27 62 819200 1300
53851760 fefeng C May 7, 2019, 1:48 p.m. OK GNU C++14 TESTS 27 62 819200 1300
55190992 Ayush4 C June 6, 2019, 6:28 a.m. OK GNU C++14 TESTS 27 62 819200 1300
58175601 mo7amed_a7med C Aug. 2, 2019, 12:57 p.m. OK GNU C++14 TESTS 27 62 819200 1300
62956178 Venomous.Coder C Oct. 19, 2019, 8:36 p.m. OK GNU C++14 TESTS 27 62 819200 1300
63412706 asceL- C Oct. 26, 2019, 2:02 a.m. OK GNU C++14 TESTS 27 62 819200 1300
63615480 Asif_Watson C Oct. 27, 2019, 7:15 p.m. OK GNU C++14 TESTS 27 62 819200 1300
40648286 Parsley C July 22, 2018, 6:12 p.m. OK GNU C++17 TESTS 27 62 716800 1300
68470833 vjudge2 C Jan. 10, 2020, 1:26 a.m. OK GNU C++17 TESTS 27 62 819200 1300
63296068 SupermusicA C Oct. 24, 2019, 1:01 p.m. OK GNU C++17 TESTS 27 62 819200 1300
62949153 KhaledMuhammad C Oct. 19, 2019, 6:21 p.m. OK GNU C++17 TESTS 27 62 819200 1300
57910170 vjudge2 C July 28, 2019, 7:40 p.m. OK GNU C++17 TESTS 27 62 819200 1300
57596867 Goddan. C July 23, 2019, 2:16 p.m. OK GNU C++17 TESTS 27 62 819200 1300
57139001 shaozechen1999 C July 16, 2019, 10:10 a.m. OK GNU C++17 TESTS 27 62 819200 1300
56591010 Melecichu C July 5, 2019, 5:20 p.m. OK GNU C++17 TESTS 27 62 819200 1300
55293090 kingarp1914 C June 8, 2019, 8:38 a.m. OK GNU C++17 TESTS 27 62 819200 1300
69055635 MatveyKov C Jan. 18, 2020, 2:22 p.m. OK GNU C++17 TESTS 27 62 819200 1300
56789404 porktw C July 10, 2019, 9:53 a.m. OK Go TESTS 27 62 4505600 1300
42555823 Marii C Sept. 6, 2018, 2:06 p.m. OK Go TESTS 27 249 8499200 1300
40484150 debel_vegetarianec C July 17, 2018, 3:38 p.m. OK Haskell TESTS 27 156 27545600 1300
40587461 tsotnez C July 20, 2018, 6:50 p.m. OK Haskell TESTS 27 966 42188800 1300
40587408 tsotnez C July 20, 2018, 6:48 p.m. OK Haskell TESTS 27 982 42188800 1300
64198714 DATVN C Nov. 4, 2019, 10:43 a.m. OK Java 11 TESTS 27 358 23142400 1300
55728564 kukreja-vlk C June 18, 2019, 7:18 p.m. OK Java 8 TESTS 27 124 0 1300
40651388 Dobo_boy C July 22, 2018, 10:23 p.m. OK Java 8 TESTS 27 124 0 1300
40543709 Jay_13 C July 19, 2018, 10:19 a.m. OK Java 8 TESTS 27 124 0 1300
41968047 chandan5284 C Aug. 22, 2018, 1:24 p.m. OK Java 8 TESTS 27 139 0 1300
40609908 Ajudiya_13 C July 21, 2018, 1:38 p.m. OK Java 8 TESTS 27 139 0 1300
40551052 apurvaj C July 19, 2018, 2:29 p.m. OK Java 8 TESTS 27 139 0 1300
40755365 Ahmad C July 25, 2018, 9:41 p.m. OK Java 8 TESTS 27 140 0 1300
41959373 Wippppppppppe C Aug. 22, 2018, 8:33 a.m. OK Java 8 TESTS 27 140 0 1300
40843590 2-BAD C July 27, 2018, 10:46 a.m. OK Java 8 TESTS 27 140 0 1300
45401304 habibulka C Nov. 7, 2018, 8:43 a.m. OK Java 8 TESTS 27 140 11264000 1300
40617384 benjani C July 21, 2018, 7:51 p.m. OK JavaScript TESTS 27 124 21811200 1300
56263936 redjohn C June 29, 2019, 9:10 a.m. OK Kotlin TESTS 27 342 17408000 1300
58675040 david_varela C Aug. 12, 2019, 4:09 p.m. OK Kotlin TESTS 27 358 17510400 1300
58675185 david_varela C Aug. 12, 2019, 4:12 p.m. OK Kotlin TESTS 27 374 17510400 1300
40774512 user32 C July 26, 2018, 10:31 a.m. OK Kotlin TESTS 27 405 30412800 1300
40774463 user32 C July 26, 2018, 10:29 a.m. OK Kotlin TESTS 27 482 18636800 1300
41288290 andrew.albert C Aug. 6, 2018, 11:09 p.m. OK Kotlin TESTS 27 545 0 1300
54546567 og.kostya C May 24, 2019, 6:33 a.m. OK Mono C# TESTS 27 62 819200 1300
40486434 jainchethan87 C July 17, 2018, 4:58 p.m. OK Mono C# TESTS 27 109 25497600 1300
42359111 TrinidadTobago C Sept. 2, 2018, 10:40 a.m. OK Mono C# TESTS 27 109 26316800 1300
41127986 keep.deep C Aug. 2, 2018, 3:18 p.m. OK Mono C# TESTS 27 109 26828800 1300
40700136 Areyou C July 24, 2018, 10:17 a.m. OK Mono C# TESTS 27 109 32358400 1300
41617126 Skndr801 C Aug. 15, 2018, 9:55 a.m. OK Mono C# TESTS 27 124 25600000 1300
40489848 jainchethan87 C July 17, 2018, 7:28 p.m. OK Mono C# TESTS 27 124 28876800 1300
44214719 nemars C Oct. 12, 2018, 4:21 p.m. OK Mono C# TESTS 27 124 34304000 1300
40777515 lalit_1 C July 26, 2018, 12:05 p.m. OK Mono C# TESTS 27 139 35123200 1300
40593978 vjudge1 C July 21, 2018, 3:25 a.m. OK MS C++ TESTS 27 46 819200 1300
68389344 vjudge2 C Jan. 8, 2020, 7:50 a.m. OK MS C++ TESTS 27 46 819200 1300
68338847 vjudge1 C Jan. 7, 2020, 1:22 a.m. OK MS C++ TESTS 27 46 819200 1300
49323254 vjudge5 C Feb. 1, 2019, 1:09 p.m. OK MS C++ TESTS 27 46 819200 1300
48414188 vjudge4 C Jan. 15, 2019, 9:26 a.m. OK MS C++ TESTS 27 46 819200 1300
48412764 vjudge3 C Jan. 15, 2019, 8:42 a.m. OK MS C++ TESTS 27 46 819200 1300
45499219 vjudge5 C Nov. 10, 2018, 5:47 a.m. OK MS C++ TESTS 27 46 819200 1300
48449016 vjudge5 C Jan. 16, 2019, 9:06 a.m. OK MS C++ TESTS 27 46 1638400 1300
51486372 vjudge4 C March 19, 2019, 1:42 p.m. OK MS C++ TESTS 27 46 1638400 1300
54373530 vjudge3 C May 19, 2019, 7:45 a.m. OK MS C++ TESTS 27 46 1638400 1300
51086309 NPUlzh C March 9, 2019, 1:10 p.m. OK MS C++ 2017 TESTS 27 77 819200 1300
49459436 work_hard. C Feb. 4, 2019, 12:12 p.m. OK MS C++ 2017 TESTS 27 78 819200 1300
52571424 zhaolonga C April 10, 2019, 2:21 p.m. OK MS C++ 2017 TESTS 27 78 1638400 1300
57315782 116c C July 19, 2019, 8:09 a.m. OK MS C++ 2017 TESTS 27 78 7270400 1300
59336864 IbraheemJanajreh C Aug. 23, 2019, 5:29 a.m. OK MS C++ 2017 TESTS 27 187 819200 1300
64793046 yerzh C Nov. 13, 2019, 11:55 a.m. OK MS C++ 2017 TESTS 27 187 2867200 1300
65599402 Edgar2005 C Nov. 23, 2019, 5:18 p.m. OK MS C++ 2017 TESTS 27 202 819200 1300
58208329 vjudge5 C Aug. 3, 2019, 7:56 a.m. OK MS C++ 2017 TESTS 27 202 819200 1300
65872490 MikeShLN C Nov. 27, 2019, 4:07 p.m. OK MS C++ 2017 TESTS 27 202 1126400 1300
54916259 Skeef79 C June 1, 2019, 2 p.m. OK MS C++ 2017 TESTS 27 202 1638400 1300
49461070 vjudge1 C Feb. 4, 2019, 1 p.m. OK Node.js TESTS 27 686 72294400 1300
40517008 Golem C July 18, 2018, 1:48 p.m. OK PascalABC.NET TESTS 27 186 6144000 1300
40618194 Golem C July 21, 2018, 8:46 p.m. OK PascalABC.NET TESTS 27 187 4608000 1300
40618226 Sashka_Andreev C July 21, 2018, 8:47 p.m. OK PascalABC.NET TESTS 27 202 3891200 1300
41154422 KAin0 C Aug. 3, 2018, 11:08 a.m. OK PascalABC.NET TESTS 27 218 16998400 1300
40612715 sasasagagaga C July 21, 2018, 3:37 p.m. OK PyPy 2 TESTS 27 171 11571200 1300
46285030 pavankatta C Nov. 27, 2018, 3:37 p.m. OK PyPy 2 TESTS 27 187 13107200 1300
40989076 BurntArgonPancakes C July 30, 2018, 10:35 p.m. OK PyPy 2 TESTS 27 202 11571200 1300
54363186 vjudge5 C May 18, 2019, 10:40 p.m. OK PyPy 2 TESTS 27 202 13209600 1300
40517737 akshay125 C July 18, 2018, 2:10 p.m. OK PyPy 2 TESTS 27 202 13209600 1300
40978181 EON_KID C July 30, 2018, 4:31 p.m. OK PyPy 2 TESTS 27 249 19148800 1300
45667208 c1729 C Nov. 13, 2018, 8:21 a.m. OK PyPy 2 TESTS 27 389 59084800 1300
40526641 Jota C July 18, 2018, 9:29 p.m. OK PyPy 2 TESTS 27 483 17408000 1300
55411934 Pavel_leto C June 10, 2019, 8:44 p.m. OK PyPy 3 TESTS 27 280 26726400 1300
54253919 vjudge3 C May 16, 2019, 6:49 p.m. OK PyPy 3 TESTS 27 280 26726400 1300
54519901 iamprayush C May 23, 2019, 11:51 a.m. OK PyPy 3 TESTS 27 295 26931200 1300
53496708 yfo C April 29, 2019, 12:12 p.m. OK PyPy 3 TESTS 27 296 25190400 1300
53940472 vjudge2 C May 10, 2019, 2:35 a.m. OK PyPy 3 TESTS 27 296 26624000 1300
50282713 SarveshDubey C Feb. 21, 2019, 1:26 p.m. OK PyPy 3 TESTS 27 296 26624000 1300
68111179 Ivruix C Jan. 3, 2020, 9:36 a.m. OK PyPy 3 TESTS 27 311 19046400 1300
41156594 5amessi C Aug. 3, 2018, 12:37 p.m. OK PyPy 3 TESTS 27 311 27033600 1300
41156478 5amessi C Aug. 3, 2018, 12:33 p.m. OK PyPy 3 TESTS 27 311 27340800 1300
41156439 5amessi C Aug. 3, 2018, 12:32 p.m. OK PyPy 3 TESTS 27 311 27340800 1300
46024009 FlyingBag65 C Nov. 21, 2018, 10 a.m. OK Python 2 TESTS 27 296 11161600 1300
54992599 kaif_7 C June 2, 2019, 7:57 p.m. OK Python 2 TESTS 27 327 11059200 1300
54536352 vjudge5 C May 23, 2019, 8:29 p.m. OK Python 2 TESTS 27 327 11161600 1300
54536345 tatianeaf C May 23, 2019, 8:29 p.m. OK Python 2 TESTS 27 327 11366400 1300
54536417 marsjr C May 23, 2019, 8:32 p.m. OK Python 2 TESTS 27 342 11161600 1300
54536441 vjudge1 C May 23, 2019, 8:33 p.m. OK Python 2 TESTS 27 343 11366400 1300
41677134 franckmy C Aug. 17, 2018, 8:39 a.m. OK Python 2 TESTS 27 358 11059200 1300
40713790 dani.cmh.lee C July 24, 2018, 5:46 p.m. OK Python 2 TESTS 27 358 11161600 1300
40620479 nealzane C July 22, 2018, 12:58 a.m. OK Python 2 TESTS 27 358 11161600 1300
40500256 hunterinthehorizon C July 18, 2018, 5:44 a.m. OK Python 2 TESTS 27 358 11878400 1300
54402307 yun_ke C May 20, 2019, 2:12 a.m. OK Python 3 TESTS 27 217 20582400 1300
59588724 vamsi246verma C Aug. 27, 2019, 7:14 p.m. OK Python 3 TESTS 27 218 18022400 1300
40650721 the_white_devil C July 22, 2018, 9:10 p.m. OK Python 3 TESTS 27 234 16588800 1300
40773033 gosipov C July 26, 2018, 9:33 a.m. OK Python 3 TESTS 27 248 17715200 1300
50071246 amirah C Feb. 17, 2019, 5:52 p.m. OK Python 3 TESTS 27 249 16588800 1300
62652956 vjudge5 C Oct. 15, 2019, 10:48 p.m. OK Python 3 TESTS 27 249 17612800 1300
47494843 break_my_soul C Dec. 25, 2018, 2:22 p.m. OK Python 3 TESTS 27 249 17715200 1300
41156632 5amessi C Aug. 3, 2018, 12:39 p.m. OK Python 3 TESTS 27 249 17715200 1300
60028411 avi13715 C Sept. 4, 2019, 2:44 p.m. OK Python 3 TESTS 27 249 18022400 1300
55708890 darkshadow07 C June 18, 2019, 9:12 a.m. OK Python 3 TESTS 27 249 18022400 1300
41440192 betrue12 C Aug. 10, 2018, 5:45 p.m. OK Ruby TESTS 27 514 40960000 1300
40856917 clupasq C July 27, 2018, 5:53 p.m. OK Ruby TESTS 27 545 58572800 1300
46407070 yakamoto C Nov. 30, 2018, 3:10 p.m. OK Scala TESTS 27 483 5939200 1300
40522241 sam.ninja C July 18, 2018, 5:18 p.m. OK Scala TESTS 27 842 0 1300

remove filters

Back to search problems