Codeforces Round 631 (Div. 1) - Thanks, Denis aramis Shitov!

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
1329 Codeforces Round 631 (Div. 1) - Thanks, Denis aramis Shitov! FINISHED False 7200 151428311 April 3, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 189 ) E Dreamoon Loves AA PROGRAMMING binary search greedy 3300

B'There is a string of length n+1 of characters 'A ' and 'B '. The first character and last character of the string are equal to 'A '. You are given m indices p_1, p_2, ldots, p_m ( 0 -indexation) denoting the other indices of characters 'A ' in the string. Let 's denote the minimum distance between two neighboring 'A ' as l , and maximum distance between neighboring 'A ' as r . For example, (l,r) of string "ABBAABBBA" is (1,4) . And let 's denote the balance degree of a string as the value of r-l . Now Dreamoon wants to change exactly k characters from 'B ' to 'A ', and he wants to make the balance degree of the string as small as possible. Please calculate the required minimum possible value of balance degree. The first line contains one integer t denoting the number of test cases ( 1 <= q t <= q 400 ,000 ). For each test case, the first line contains three integers n , m and k ( 1 <= q n <= q 10^{15}, 0 <= q m <= q 400 ,000, 0 <= q k < n - m ). The second line contains m integers p_1, p_2, ldots, p_m , ( 0 < p_1 < p_2 < ldots < p_m < n ). The total sum of m is at most 400 ,000 . For each test case, print one integer: the smallest possible value of balance degree after k changes of 'B ' to 'A '. '...

Tutorials

Codeforces Round #631 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
75393050 rainboy E April 3, 2020, 3:48 p.m. OK GNU C11 TESTS 48 2573 9625600 3300
75812280 msuwakow E April 8, 2020, 7:38 a.m. OK GNU C++11 TESTS 48 795 9625600 3300
75823507 dqa2020 E April 8, 2020, 10:26 a.m. OK GNU C++11 TESTS 48 1169 9420800 3300
75806314 zx2003 E April 8, 2020, 6:13 a.m. OK GNU C++11 TESTS 48 1231 12902400 3300
75476714 WZYYN E April 4, 2020, 10:37 a.m. OK GNU C++11 TESTS 48 1372 9625600 3300
75636236 Rtx_ E April 6, 2020, 8:07 a.m. OK GNU C++11 TESTS 48 1418 9932800 3300
75943252 cmwqf E April 9, 2020, 2:17 a.m. OK GNU C++11 TESTS 48 1481 15872000 3300
76313156 caoyue E April 12, 2020, 9:54 a.m. OK GNU C++11 TESTS 48 2136 16076800 3300
75422184 rainboy E April 3, 2020, 6:04 p.m. OK GNU C++14 TESTS 48 1294 9625600 3300
75482221 mayaohua2003 E April 4, 2020, 11:52 a.m. OK GNU C++14 TESTS 48 1403 12083200 3300
75442447 SaSoriSaYOra E April 3, 2020, 11:07 p.m. OK GNU C++14 TESTS 48 1419 9625600 3300
75746485 qiqi20021026 E April 7, 2020, 1:06 p.m. OK GNU C++14 TESTS 48 1466 28876800 3300
75417952 boboniu E April 3, 2020, 5:35 p.m. OK GNU C++14 TESTS 48 1606 19968000 3300
75760683 Rubblsh12345 E April 7, 2020, 3:30 p.m. OK GNU C++14 TESTS 48 1934 9625600 3300
75532951 DCXDCX E April 5, 2020, 4:23 a.m. OK GNU C++14 TESTS 48 1949 12800000 3300
75708186 cuizhuyefei E April 7, 2020, 3:21 a.m. OK GNU C++14 TESTS 48 2854 11264000 3300
75408443 Um_nik E April 3, 2020, 4:23 p.m. OK GNU C++17 TESTS 48 1450 9625600 3300
75422559 Temotoloraia E April 3, 2020, 6:07 p.m. OK GNU C++17 TESTS 48 1465 6451200 3300
75685757 c_minus_minus E April 6, 2020, 6:26 p.m. OK GNU C++17 TESTS 48 1465 9625600 3300
76220726 Farhod_Farmon E April 10, 2020, 11:43 p.m. OK GNU C++17 TESTS 48 1466 3276800 3300
75771778 paulica E April 7, 2020, 5:39 p.m. OK GNU C++17 TESTS 48 1575 6451200 3300
76297104 _Ash__ E April 12, 2020, 7:04 a.m. OK GNU C++17 TESTS 48 1590 6451200 3300
75480541 kefaa2 E April 4, 2020, 11:28 a.m. OK GNU C++17 TESTS 48 1622 9625600 3300
75998294 Xellos E April 9, 2020, 2 p.m. OK GNU C++17 TESTS 48 1653 3174400 3300
75747835 yooooooooo E April 7, 2020, 1:21 p.m. OK GNU C++17 TESTS 48 1653 9625600 3300
76053199 Pappu_kumar E April 10, 2020, 3:58 a.m. OK GNU C++17 TESTS 48 1809 15872000 3300
75967053 neal E April 9, 2020, 8:13 a.m. OK GNU C++17 (64) TESTS 48 795 16998400 3300
75966418 neal E April 9, 2020, 8:05 a.m. OK GNU C++17 (64) TESTS 48 1091 16896000 3300
75525023 ecnerwala E April 4, 2020, 11:15 p.m. OK GNU C++17 (64) TESTS 48 1122 12800000 3300
76019995 neal E April 9, 2020, 5:17 p.m. OK GNU C++17 (64) TESTS 48 1122 16896000 3300
75525199 ecnerwala E April 4, 2020, 11:22 p.m. OK GNU C++17 (64) TESTS 48 1123 12800000 3300
75681621 maroonrk E April 6, 2020, 5:31 p.m. OK GNU C++17 (64) TESTS 48 1341 29081600 3300
75525264 scott_wu E April 4, 2020, 11:25 p.m. OK GNU C++17 (64) TESTS 48 2105 17920000 3300
76016936 neal E April 9, 2020, 4:52 p.m. OK GNU C++17 (64) TESTS 48 2168 16896000 3300

remove filters

Back to search problems