Codeforces Round 572 (Div. 1)

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
1188 Codeforces Round 572 (Div. 1) FINISHED False 7200 169484099 July 5, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1793 ) C Array Beauty PROGRAMMING dp 2700

B"Let's call beauty of an array b_1, b_2, ldots, b_n ( n > 1 ) -- min limits_{1 <= q i < j <= q n} |b_i - b_j| . You're given an array a_1, a_2, ldots a_n and a number k . Calculate the sum of beauty over all subsequences of the array of length exactly k . As this number can be very large, output it modulo 998244353 . A sequence a is a subsequence of an array b if a can be obtained from b by deletion of several (possibly, zero or all) elements. The first line contains integers n, k ( 2 <= k <= n <= 1000 ). The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 10^5 ). Output one integer -- the sum of beauty over all subsequences of the array of length exactly k . As this number can be very large, output it modulo 998244353 . In the first example, there are 4 subsequences of length 3 -- [1, 7, 3] , [1, 3, 5] , [7, 3, 5] , [1, 7, 5] , each of which has beauty 2 , so answer is 8 . In the second example, there is only one subsequence of length 5 -- the whole array, which has the beauty equal to |10-1| = 9 . "...

Tutorials

Editorial of Codeforces Round #572

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
56594069 hos.lyric C July 5, 2019, 6:32 p.m. OK D TESTS 54 1669 4198400 2700
57286078 sansen C July 18, 2019, 2:41 p.m. OK GNU C11 TESTS 55 967 3993600 2700
56597833 rainboy C July 5, 2019, 8:41 p.m. OK GNU C11 TESTS 54 1138 0 2700
57286343 sansen C July 18, 2019, 2:47 p.m. OK GNU C11 TESTS 55 1950 0 2700
56850427 frodakcin C July 11, 2019, 3:28 p.m. OK GNU C++11 TESTS 55 312 614400 2700
56618329 weng_233 C July 6, 2019, 10:48 a.m. OK GNU C++11 TESTS 54 405 12185600 2700
56623491 cjy2003 C July 6, 2019, 12:49 p.m. OK GNU C++11 TESTS 54 452 204800 2700
56879844 FlappyFish C July 12, 2019, 9:55 a.m. OK GNU C++11 TESTS 55 468 102400 2700
57280750 2829908231 C July 18, 2019, 12:40 p.m. OK GNU C++11 TESTS 55 483 4915200 2700
56604011 -skyline- C July 6, 2019, 3:05 a.m. OK GNU C++11 TESTS 54 514 4096000 2700
56853654 newbeginBKB C July 11, 2019, 5:05 p.m. OK GNU C++11 TESTS 55 529 13414400 2700
56955729 e0210206 C July 13, 2019, 4:39 a.m. OK GNU C++11 TESTS 55 530 102400 2700
56578660 LunarFlare C July 5, 2019, 3:59 p.m. OK GNU C++11 TESTS 54 545 4096000 2700
56629699 Bodo C July 6, 2019, 3:37 p.m. OK GNU C++11 TESTS 54 545 4096000 2700
65210524 jo_on C Nov. 16, 2019, 5:50 p.m. OK GNU C++14 TESTS 55 342 4403200 2700
56593310 BSBandme C July 5, 2019, 6:14 p.m. OK GNU C++14 TESTS 54 468 4505600 2700
56594871 Devil C July 5, 2019, 6:53 p.m. OK GNU C++14 TESTS 54 483 5120000 2700
60334990 mobu233 C Sept. 10, 2019, 8:04 a.m. OK GNU C++14 TESTS 55 545 8192000 2700
56574271 ACRush C July 5, 2019, 3:42 p.m. OK GNU C++14 TESTS 54 561 4300800 2700
59100693 popovicirobert C Aug. 19, 2019, 3:57 p.m. OK GNU C++14 TESTS 55 577 8704000 2700
57125062 Origenes C July 16, 2019, 3:43 a.m. OK GNU C++14 TESTS 55 592 5529600 2700
59891428 Scut82 C Sept. 2, 2019, 10:33 a.m. OK GNU C++14 TESTS 55 592 219955200 2700
56692191 ovis96 C July 8, 2019, 4:51 a.m. OK GNU C++14 TESTS 54 608 4300800 2700
56612866 krijgertje C July 6, 2019, 8:11 a.m. OK GNU C++14 TESTS 54 623 3993600 2700
56571735 Um_nik C July 5, 2019, 3:34 p.m. OK GNU C++17 TESTS 54 405 4096000 2700
58147955 RNS_CUS C Aug. 1, 2019, 11:57 p.m. OK GNU C++17 TESTS 55 405 8192000 2700
56614595 Vax C July 6, 2019, 9:01 a.m. OK GNU C++17 TESTS 54 436 4505600 2700
56581431 sincerity C July 5, 2019, 4:12 p.m. OK GNU C++17 TESTS 54 451 4403200 2700
56677317 Ztrk C July 7, 2019, 4:09 p.m. OK GNU C++17 TESTS 54 499 8089600 2700
56599685 Ari C July 5, 2019, 10:19 p.m. OK GNU C++17 TESTS 54 499 17510400 2700
56585589 Arpa C July 5, 2019, 4:34 p.m. OK GNU C++17 TESTS 54 561 8294400 2700
56860786 KrK C July 11, 2019, 10:01 p.m. OK GNU C++17 TESTS 55 577 12288000 2700
61611026 Umi C Oct. 1, 2019, 2:07 p.m. OK GNU C++17 TESTS 55 592 0 2700
56884828 Anachor C July 12, 2019, 12:08 p.m. OK GNU C++17 TESTS 55 592 4505600 2700
59638014 qwerty787788 C Aug. 28, 2019, 10:23 p.m. OK Java 8 TESTS 55 1715 0 2700
64757153 sasiking7 C Nov. 12, 2019, 5:26 p.m. OK Java 8 TESTS 55 1949 0 2700
56597842 fetetriste C July 5, 2019, 8:41 p.m. OK Java 8 TESTS 54 2043 0 2700
56597898 fetetriste C July 5, 2019, 8:43 p.m. OK Java 8 TESTS 54 2105 0 2700
56597548 fetetriste C July 5, 2019, 8:29 p.m. OK Java 8 TESTS 54 2261 0 2700
56592384 tanzaku C July 5, 2019, 5:54 p.m. OK Java 8 TESTS 54 2261 5120000 2700
56597834 Dukkha C July 5, 2019, 8:41 p.m. OK Java 8 TESTS 54 2495 0 2700
56689899 dalt C July 8, 2019, 2:57 a.m. OK Java 8 TESTS 54 2588 4812800 2700
56597771 fetetriste C July 5, 2019, 8:38 p.m. OK Java 8 TESTS 54 2761 0 2700
56597633 fetetriste C July 5, 2019, 8:33 p.m. OK Java 8 TESTS 54 3119 0 2700
56640988 darnley C July 7, 2019, 1:41 a.m. OK Kotlin TESTS 54 2480 1228800 2700
56640738 darnley C July 7, 2019, 1:24 a.m. OK Kotlin TESTS 54 2510 1228800 2700
56641050 darnley C July 7, 2019, 1:46 a.m. OK Kotlin TESTS 54 2557 1228800 2700
56640758 darnley C July 7, 2019, 1:25 a.m. OK Kotlin TESTS 54 2605 1228800 2700
56640952 darnley C July 7, 2019, 1:38 a.m. OK Kotlin TESTS 54 2620 1228800 2700
56640708 darnley C July 7, 2019, 1:22 a.m. OK Kotlin TESTS 54 2714 1228800 2700
56640977 darnley C July 7, 2019, 1:40 a.m. OK Kotlin TESTS 54 2792 1228800 2700
56640902 darnley C July 7, 2019, 1:35 a.m. OK Kotlin TESTS 54 2995 1228800 2700
56640850 darnley C July 7, 2019, 1:31 a.m. OK Kotlin TESTS 54 3119 1228800 2700
56640698 darnley C July 7, 2019, 1:21 a.m. OK Kotlin TESTS 54 3478 1126400 2700
57953919 claw88 C July 29, 2019, 5:46 p.m. OK Mono C# TESTS 55 1871 9011200 2700
57954094 claw88 C July 29, 2019, 5:50 p.m. OK Mono C# TESTS 55 1918 9011200 2700
61327864 vjudge3 C Sept. 26, 2019, 2:11 p.m. OK MS C++ TESTS 55 982 4096000 2700
57552304 vjudge1 C July 22, 2019, 6:01 p.m. OK MS C++ TESTS 55 2199 8601600 2700
56699771 vjudge3 C July 8, 2019, 8:37 a.m. OK MS C++ TESTS 54 3103 4096000 2700
57574219 hld67890 C July 23, 2019, 6:26 a.m. OK MS C++ 2017 TESTS 55 2901 6758400 2700
56963175 zhuzimo0802 C July 13, 2019, 7:24 a.m. OK MS C++ 2017 TESTS 55 3354 16998400 2700
57580798 lazyc97 C July 23, 2019, 8:47 a.m. OK Ocaml TESTS 55 3618 4198400 2700
65791660 sansen C Nov. 26, 2019, 11:16 p.m. OK Rust TESTS 55 936 102400 2700
69842793 gearjack C Jan. 30, 2020, 1:36 p.m. OK Rust TESTS 55 2417 307200 2700

remove filters

Back to search problems