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'You have c_1 letters 'a ', c_2 letters 'b ', ..., c_{26} letters 'z '. You want to build a beautiful string of length n from them (obviously, you cannot use the i -th letter more than c_i times). Each c_i is greater than frac{n}{3} . A string is called beautiful if there are no palindromic contiguous substrings of odd length greater than 1 in it. For example, the string "abacaba" is not beautiful, it has several palindromic substrings of odd length greater than 1 (for example, "aca"). Another example: the string "abcaa" is beautiful. Calculate the number of different strings you can build, and print the answer modulo 998244353 . The first line contains one integer n ( 3 <= n <= 400 ). The second line contains 26 integers c_1 , c_2 , ..., c_{26} ( frac{n}{3} < c_i <= n ). Print one integer -- the number of strings you can build, taken modulo 998244353 . '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
107477905 |
RomanticDreamFlight |
G |
Feb. 15, 2021, 5:32 p.m. |
OK |
GNU C++11 |
TESTS |
15 |
624 |
12492800 |
|
|
107471957 |
469762049 |
G |
Feb. 15, 2021, 4:42 p.m. |
OK |
GNU C++11 |
TESTS |
15 |
842 |
809881600 |
|
|
107471831 |
WoodCrystal |
G |
Feb. 15, 2021, 4:41 p.m. |
OK |
GNU C++11 |
TESTS |
15 |
888 |
208486400 |
|
|
107475373 |
cppascalinux |
G |
Feb. 15, 2021, 5:05 p.m. |
OK |
GNU C++11 |
TESTS |
15 |
951 |
30720000 |
|
|
107494335 |
frodakcin |
G |
Feb. 16, 2021, 12:57 a.m. |
OK |
GNU C++11 |
TESTS |
15 |
1434 |
2969600 |
|
|
107502917 |
Moonlights.qaq |
G |
Feb. 16, 2021, 5:31 a.m. |
OK |
GNU C++11 |
TESTS |
15 |
2230 |
11878400 |
|
|
107469810 |
oleh1421 |
G |
Feb. 15, 2021, 4:34 p.m. |
OK |
GNU C++11 |
TESTS |
15 |
2261 |
29696000 |
|
|
107494769 |
jxm2001_ |
G |
Feb. 16, 2021, 1:22 a.m. |
OK |
GNU C++11 |
TESTS |
15 |
2791 |
616960000 |
|
|
107499086 |
iqx37f |
G |
Feb. 16, 2021, 4:05 a.m. |
OK |
GNU C++11 |
TESTS |
15 |
3728 |
14438400 |
|
|
107477944 |
hangyesheng |
G |
Feb. 15, 2021, 5:32 p.m. |
OK |
GNU C++11 |
TESTS |
15 |
5865 |
613785600 |
|
|
107484063 |
cminus |
G |
Feb. 15, 2021, 7:04 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
62 |
24883200 |
|
|
107483454 |
cminus |
G |
Feb. 15, 2021, 6:54 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
78 |
49766400 |
|
|
107482076 |
cminus |
G |
Feb. 15, 2021, 6:30 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
546 |
49868800 |
|
|
107475901 |
2018LZY |
G |
Feb. 15, 2021, 5:10 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
1466 |
12800000 |
|
|
107465890 |
kimjihoon |
G |
Feb. 15, 2021, 4:27 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
1574 |
824012800 |
|
|
107480706 |
NaimSS |
G |
Feb. 15, 2021, 6:09 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
2948 |
6656000 |
|
|
107481414 |
NaimSS |
G |
Feb. 15, 2021, 6:20 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
3447 |
19251200 |
|
|
107493072 |
AwakeAnay |
G |
Feb. 15, 2021, 11:39 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
4102 |
28569600 |
|
|
107479525 |
kzvd4729 |
G |
Feb. 15, 2021, 5:52 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
7721 |
24780800 |
|
|
107484154 |
cminus |
G |
Feb. 15, 2021, 7:05 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
61 |
24883200 |
|
|
107497154 |
200815147 |
G |
Feb. 16, 2021, 3:04 a.m. |
OK |
GNU C++17 |
TESTS |
15 |
77 |
830668800 |
|
|
107472064 |
ericxiao |
G |
Feb. 15, 2021, 4:42 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
327 |
822681600 |
|
|
107497801 |
sh1194 |
G |
Feb. 16, 2021, 3:27 a.m. |
OK |
GNU C++17 |
TESTS |
15 |
1138 |
12595200 |
|
|
107487940 |
Makcum888 |
G |
Feb. 15, 2021, 8:24 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
1216 |
6144000 |
|
|
107495641 |
cuiaoxiang |
G |
Feb. 16, 2021, 2:07 a.m. |
OK |
GNU C++17 |
TESTS |
15 |
1216 |
12185600 |
|
|
107489989 |
iromanagureev |
G |
Feb. 15, 2021, 9:23 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
1591 |
6656000 |
|
|
107479209 |
Kaosu |
G |
Feb. 15, 2021, 5:48 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
1638 |
6041600 |
|
|
107497795 |
SheepRanger |
G |
Feb. 16, 2021, 3:26 a.m. |
OK |
GNU C++17 |
TESTS |
15 |
1638 |
10342400 |
|
|
107468674 |
tokusakurai |
G |
Feb. 15, 2021, 4:32 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
1996 |
5324800 |
|
|
107475726 |
AutumnKite |
G |
Feb. 15, 2021, 5:09 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
61 |
16384000 |
|
|
107479635 |
rainboy |
G |
Feb. 15, 2021, 5:54 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
124 |
196300800 |
|
|
107489504 |
kefaa2 |
G |
Feb. 15, 2021, 9:07 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
234 |
5939200 |
|
|
107498865 |
AnandOza |
G |
Feb. 16, 2021, 3:58 a.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
327 |
13312000 |
|
|
107498358 |
AnandOza |
G |
Feb. 16, 2021, 3:44 a.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
342 |
13312000 |
|
|
107475592 |
fuppy |
G |
Feb. 15, 2021, 5:07 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
373 |
23756800 |
|
|
107498295 |
AnandOza |
G |
Feb. 16, 2021, 3:42 a.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
452 |
13312000 |
|
|
107469536 |
Bohun |
G |
Feb. 15, 2021, 4:33 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
467 |
800665600 |
|
|
107477289 |
sejur224 |
G |
Feb. 15, 2021, 5:25 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
468 |
621568000 |
|
|
107478980 |
fastmath |
G |
Feb. 15, 2021, 5:45 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
514 |
214323200 |
|
|
107472687 |
uwi |
G |
Feb. 15, 2021, 4:46 p.m. |
OK |
Java 11 |
TESTS |
15 |
3587 |
9625600 |
|
|
107475449 |
Tlatoani |
G |
Feb. 15, 2021, 5:06 p.m. |
OK |
Kotlin |
TESTS |
15 |
8564 |
468582400 |
|
|
remove filters
Back to search problems