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 |
---|---|---|---|---|---|---|
1677 | Codeforces Round 789 (Div. 1) | FINISHED | False | 7200 | 79802699 | May 8, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 94 ) | F | Tokitsukaze and Gems | PROGRAMMING | dp math |
B'Tokitsukaze has a sequence with length of n . She likes gems very much. There are n kinds of gems. The gems of the i -th kind are on the i -th position, and there are a_i gems of the same kind on that position. Define G(l,r) as the multiset containing all gems on the segment [l,r] (inclusive). A multiset of gems can be represented as S=[s_1,s_2, ldots,s_n] , which is a non-negative integer sequence of length n and means that S contains s_i gems of the i -th kind in the multiset. A multiset T=[t_1,t_2, ldots,t_n] is a multisubset of S=[s_1,s_2, ldots,s_n] if and only if t_i <= s_i for any i satisfying 1 <= i <= n . Now, given two positive integers k and p , you need to calculate the result of sum_{l=1}^n sum_{r=l}^n sum limits_{[t_1,t_2, cdots,t_n] subseteq G(l,r)} <= ft( <= ft( sum_{i=1}^n p^{t_i}t_i^k right) <= ft( sum_{i=1}^n[t_i>0] right) right), where [t_i>0]=1 if t_i>0 and [t_i>0]=0 if t_i=0 . Since the answer can be quite large, print it modulo 998 ,244 ,353 . The first line contains three integers n , k and p ( 1 <= n <= 10^5 ; 1 <= k <= 10^5 ; 2 <= p <= 998 ,244 ,351 ) -- the length of the sequence, the numbers k and p . The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 998 ,244 ,351 ) -- the number of gems on the i -th position. Print a single integers -- the result modulo 998 ,244 ,353 . '... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
156378815 | ayubsaid | F | May 9, 2022, 3:50 a.m. | OK | GNU C++17 (64) | TESTS | 75 | 545 | 77824000 | ||
156353702 | ecnerwala | F | May 8, 2022, 5:47 p.m. | OK | GNU C++17 (64) | TESTS | 75 | 1653 | 49971200 | ||
156359539 | errorgorn | F | May 8, 2022, 7:07 p.m. | OK | GNU C++17 (64) | TESTS | 75 | 3509 | 71577600 | ||
156361712 | hos.lyric | F | May 8, 2022, 7:44 p.m. | OK | GNU C++20 (64) | TESTS | 75 | 342 | 53452800 | ||
156333780 | Elegia | F | May 8, 2022, 3:48 p.m. | OK | GNU C++20 (64) | TESTS | 75 | 405 | 43827200 | ||
156340426 | maroonrk | F | May 8, 2022, 4:09 p.m. | OK | GNU C++20 (64) | TESTS | 75 | 529 | 74035200 | ||
156352113 | hos.lyric | F | May 8, 2022, 5:31 p.m. | OK | GNU C++20 (64) | TESTS | 75 | 623 | 77824000 | ||
156351614 | hos.lyric | F | May 8, 2022, 5:27 p.m. | OK | GNU C++20 (64) | TESTS | 75 | 1154 | 77824000 | ||
156356818 | Krolo7 | F | May 8, 2022, 6:25 p.m. | OK | GNU C++20 (64) | TESTS | 75 | 2401 | 115712000 | ||
156350954 | jiangly | F | May 8, 2022, 5:23 p.m. | OK | GNU C++20 (64) | TESTS | 75 | 2401 | 115712000 | ||
156370851 | WeakestTopology | F | May 9, 2022, 12:25 a.m. | OK | GNU C++20 (64) | TESTS | 75 | 2542 | 76902400 |
Back to search problems