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.
Problems
B"Suppose you have an integer array a_1, a_2, ... , a_n . Let operatorname{lsl}(i) be the number of indices j ( 1 <= j < i ) such that a_j < a_i . Analogically, let operatorname{grr}(i) be the number of indices j ( i < j <= n ) such that a_j > a_i . Let's name position i good in the array a if operatorname{lsl}(i) < operatorname{grr}(i) . Finally, let's define a function f on array a f(a) as the sum of all a_i such that i is good in a . Given two integers n and k , find the sum of f(a) over all arrays a of size n such that 1 <= q a_i <= q k for all 1 <= q i <= q n modulo 998 ,244 ,353 . The first and only line contains two integers n and k ( 1 <= q n <= q 50 ; 2 <= q k < 998 ,244 ,353 ). Output a single integer -- the sum of f over all arrays a of size n modulo 998 ,244 ,353 . In the first test case: Adding up all of these values, we get 28 as the answer. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
187140261 |
shuger |
F |
Dec. 29, 2022, 12:50 p.m. |
OK |
GNU C++14 |
TESTS |
93 |
15 |
0 |
|
|
187032528 |
triveni |
F |
Dec. 28, 2022, 12:08 p.m. |
OK |
GNU C++14 |
TESTS |
92 |
108 |
614400 |
|
|
187036671 |
triveni |
F |
Dec. 28, 2022, 12:56 p.m. |
OK |
GNU C++14 |
TESTS |
92 |
109 |
614400 |
|
|
187036791 |
hexagonwarrior |
F |
Dec. 28, 2022, 12:58 p.m. |
OK |
GNU C++14 |
TESTS |
92 |
140 |
0 |
|
|
187428130 |
JackWei |
F |
Dec. 31, 2022, 9:16 a.m. |
OK |
GNU C++14 |
TESTS |
93 |
155 |
0 |
|
|
187213806 |
Liuxizai |
F |
Dec. 30, 2022, 7:16 a.m. |
OK |
GNU C++14 |
TESTS |
93 |
155 |
0 |
|
|
187438279 |
jophyyjh |
F |
Dec. 31, 2022, 11:15 a.m. |
OK |
GNU C++14 |
TESTS |
93 |
171 |
0 |
|
|
187153905 |
Angelus_Novus |
F |
Dec. 29, 2022, 2:51 p.m. |
OK |
GNU C++14 |
TESTS |
93 |
171 |
0 |
|
|
187046225 |
LinRui |
F |
Dec. 28, 2022, 2:28 p.m. |
OK |
GNU C++14 |
TESTS |
93 |
187 |
0 |
|
|
187085646 |
sifrit98 |
F |
Dec. 28, 2022, 10:21 p.m. |
OK |
GNU C++14 |
TESTS |
93 |
436 |
204800 |
|
|
187457052 |
xiudu123 |
F |
Dec. 31, 2022, 2:52 p.m. |
OK |
GNU C++17 |
TESTS |
93 |
15 |
0 |
|
|
187224968 |
AWP |
F |
Dec. 30, 2022, 9:31 a.m. |
OK |
GNU C++17 |
TESTS |
93 |
15 |
1638400 |
|
|
187039508 |
xuziyuan |
F |
Dec. 28, 2022, 1:29 p.m. |
OK |
GNU C++17 |
TESTS |
93 |
61 |
207769600 |
|
|
187076736 |
Jughead |
F |
Dec. 28, 2022, 7:57 p.m. |
OK |
GNU C++17 |
TESTS |
93 |
62 |
716800 |
|
|
187030058 |
stoic_ |
F |
Dec. 28, 2022, 11:42 a.m. |
OK |
GNU C++17 |
TESTS |
92 |
109 |
409600 |
|
|
187406517 |
MonDellBit |
F |
Dec. 31, 2022, 5 a.m. |
OK |
GNU C++17 |
TESTS |
93 |
124 |
0 |
|
|
187074395 |
prav1512 |
F |
Dec. 28, 2022, 7:28 p.m. |
OK |
GNU C++17 |
TESTS |
93 |
124 |
0 |
|
|
187065387 |
dgupta0812 |
F |
Dec. 28, 2022, 5:45 p.m. |
OK |
GNU C++17 |
TESTS |
93 |
124 |
0 |
|
|
187196060 |
aditm |
F |
Dec. 30, 2022, 1:31 a.m. |
OK |
GNU C++17 |
TESTS |
93 |
140 |
0 |
|
|
187155855 |
vladburac |
F |
Dec. 29, 2022, 3:08 p.m. |
OK |
GNU C++17 |
TESTS |
93 |
156 |
0 |
|
|
187091542 |
DogSeven |
F |
Dec. 29, 2022, 1:37 a.m. |
OK |
GNU C++17 (64) |
TESTS |
93 |
15 |
0 |
|
|
187038402 |
N_z__ |
F |
Dec. 28, 2022, 1:19 p.m. |
OK |
GNU C++17 (64) |
TESTS |
93 |
15 |
102400 |
|
|
187106500 |
Lucina |
F |
Dec. 29, 2022, 6:39 a.m. |
OK |
GNU C++17 (64) |
TESTS |
93 |
31 |
102400 |
|
|
187106450 |
Lucina |
F |
Dec. 29, 2022, 6:39 a.m. |
OK |
GNU C++17 (64) |
TESTS |
93 |
31 |
102400 |
|
|
187106414 |
Lucina |
F |
Dec. 29, 2022, 6:38 a.m. |
OK |
GNU C++17 (64) |
TESTS |
93 |
31 |
102400 |
|
|
187094949 |
TheAshenWitch |
F |
Dec. 29, 2022, 3:20 a.m. |
OK |
GNU C++17 (64) |
TESTS |
93 |
31 |
102400 |
|
|
187087023 |
enslaved |
F |
Dec. 28, 2022, 10:53 p.m. |
OK |
GNU C++17 (64) |
TESTS |
93 |
31 |
102400 |
|
|
187230432 |
peng01 |
F |
Dec. 30, 2022, 10:34 a.m. |
OK |
GNU C++17 (64) |
TESTS |
93 |
31 |
614400 |
|
|
187383829 |
pachico |
F |
Dec. 30, 2022, 7:28 p.m. |
OK |
GNU C++17 (64) |
TESTS |
93 |
46 |
0 |
|
|
187161157 |
lelbaba |
F |
Dec. 29, 2022, 3:57 p.m. |
OK |
GNU C++17 (64) |
TESTS |
93 |
46 |
0 |
|
|
187205428 |
perchuts |
F |
Dec. 30, 2022, 5:21 a.m. |
OK |
GNU C++20 (64) |
TESTS |
93 |
15 |
0 |
|
|
187115859 |
becaido |
F |
Dec. 29, 2022, 8:35 a.m. |
OK |
GNU C++20 (64) |
TESTS |
93 |
15 |
0 |
|
|
187203955 |
Mehedi99 |
F |
Dec. 30, 2022, 4:56 a.m. |
OK |
GNU C++20 (64) |
TESTS |
93 |
15 |
16076800 |
|
|
187036370 |
lzoilxy |
F |
Dec. 28, 2022, 12:51 p.m. |
OK |
GNU C++20 (64) |
TESTS |
92 |
15 |
28057600 |
|
|
187115366 |
becaido |
F |
Dec. 29, 2022, 8:30 a.m. |
OK |
GNU C++20 (64) |
TESTS |
93 |
31 |
0 |
|
|
187400168 |
beacon_cwk |
F |
Dec. 31, 2022, 2:42 a.m. |
OK |
GNU C++20 (64) |
TESTS |
93 |
31 |
102400 |
|
|
187430518 |
dmkozyrev |
F |
Dec. 31, 2022, 9:45 a.m. |
OK |
GNU C++20 (64) |
TESTS |
93 |
31 |
3993600 |
|
|
187424316 |
erankyun |
F |
Dec. 31, 2022, 8:33 a.m. |
OK |
GNU C++20 (64) |
TESTS |
93 |
31 |
4812800 |
|
|
187205995 |
0734919 |
F |
Dec. 30, 2022, 5:31 a.m. |
OK |
GNU C++20 (64) |
TESTS |
93 |
46 |
0 |
|
|
187204476 |
perchuts |
F |
Dec. 30, 2022, 5:06 a.m. |
OK |
GNU C++20 (64) |
TESTS |
93 |
46 |
0 |
|
|
187213520 |
icpc_loser |
F |
Dec. 30, 2022, 7:13 a.m. |
OK |
Java 8 |
TESTS |
93 |
358 |
0 |
|
|
187119269 |
icpc_loser |
F |
Dec. 29, 2022, 9:11 a.m. |
OK |
Java 8 |
TESTS |
93 |
358 |
0 |
|
|
187212157 |
icpc_loser |
F |
Dec. 30, 2022, 6:56 a.m. |
OK |
Java 8 |
TESTS |
93 |
373 |
0 |
|
|
187119567 |
icpc_loser |
F |
Dec. 29, 2022, 9:14 a.m. |
OK |
Java 8 |
TESTS |
93 |
373 |
0 |
|
|
187119982 |
icpc_loser |
F |
Dec. 29, 2022, 9:18 a.m. |
OK |
Java 8 |
TESTS |
93 |
467 |
0 |
|
|
187132267 |
jaaguptamme |
F |
Dec. 29, 2022, 11:29 a.m. |
OK |
PyPy 3-64 |
TESTS |
93 |
62 |
0 |
|
|
187047866 |
threethreetwothree |
F |
Dec. 28, 2022, 2:44 p.m. |
OK |
PyPy 3-64 |
TESTS |
93 |
62 |
0 |
|
|
remove filters
Back to search problems