Codeforces Round 698 (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
1477 Codeforces Round 698 (Div. 1) FINISHED False 8100 125335463 Jan. 28, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 140 ) F Nezzar and Chocolate Bars PROGRAMMING combinatorics fft math probabilities 3500

B'Nezzar buys his favorite snack -- n chocolate bars with lengths l_1,l_2, ldots,l_n . However, chocolate bars might be too long to store them properly! In order to solve this problem, Nezzar designs an interesting process to divide them into small pieces. Firstly, Nezzar puts all his chocolate bars into a black box. Then, he will perform the following operation repeatedly until the maximum length over all chocolate bars does not exceed k . Nezzar now wonders, what is the expected number of operations he will perform to divide his chocolate bars into small pieces. It can be shown that the answer can be represented as frac{P}{Q} , where P and Q are coprime integers and Q not equiv 0 ( bmod 998 ,244 ,353 ). Print the value of P cdot Q^{-1} mod 998 ,244 ,353 . The first line contains two integers n and k ( 1 <= n <= 50, 1 <= k <= 2000 ). The second line contains n integers l_1, l_2, ldots, l_n ( 1 <= l_i , sum_{i=1}^{n} l_i <= 2000 ). Print a single integer -- the expected number of operations Nezzar will perform to divide his chocolate bars into small pieces modulo 998 ,244 ,353 . '...

Tutorials

87294

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
105804713 yuvi_kunchala F Jan. 29, 2021, 5:09 a.m. OK GNU C++14 TESTS 173 966 921600 3500
105779465 show_karthi F Jan. 28, 2021, 6:48 p.m. OK GNU C++17 TESTS 173 265 9625600 3500
105779332 show_karthi F Jan. 28, 2021, 6:46 p.m. OK GNU C++17 TESTS 173 280 9625600 3500
105779266 show_karthi F Jan. 28, 2021, 6:45 p.m. OK GNU C++17 TESTS 173 280 9625600 3500
105783953 Mohamed_Rafat F Jan. 28, 2021, 7:54 p.m. OK GNU C++17 TESTS 173 296 9625600 3500
105780238 show_karthi F Jan. 28, 2021, 6:58 p.m. OK GNU C++17 TESTS 173 296 9625600 3500
105804853 sh1194 F Jan. 29, 2021, 5:11 a.m. OK GNU C++17 TESTS 173 826 921600 3500
105795266 ilnil F Jan. 29, 2021, 1:46 a.m. OK GNU C++17 TESTS 173 826 921600 3500
105792688 Endagorion F Jan. 29, 2021, 12:07 a.m. OK GNU C++17 TESTS 173 951 7577600 3500
105761318 boboniu F Jan. 28, 2021, 4:34 p.m. OK GNU C++17 TESTS 173 3072 80179200 3500
105771538 hitonanode F Jan. 28, 2021, 5:30 p.m. OK GNU C++17 (64) TESTS 173 171 23040000 3500
105789113 gamegame F Jan. 28, 2021, 9:57 p.m. OK GNU C++17 (64) TESTS 173 171 55910400 3500
105777282 ecnerwala F Jan. 28, 2021, 6:21 p.m. OK GNU C++17 (64) TESTS 173 249 409600 3500
105781844 Benq F Jan. 28, 2021, 7:21 p.m. OK GNU C++17 (64) TESTS 173 764 2048000 3500
105790194 Um_nik F Jan. 28, 2021, 10:28 p.m. OK GNU C++17 (64) TESTS 173 1325 101888000 3500
105777205 insert_cool_handle F Jan. 28, 2021, 6:20 p.m. OK Java 11 TESTS 173 3259 0 3500

remove filters

Back to search problems