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 've got a string S consisting of n lowercase English letters from your friend. It turned out that this is a number written in poman numerals. The poman numeral system is long forgotten. All that 's left is the algorithm to transform number from poman numerals to the numeral system familiar to us. Characters of S are numbered from 1 to n from left to right. Let 's denote the value of S as f(S) , it is defined as follows: Note that m is chosen independently on each step. Your friend thinks it is possible to get f(S) = T by choosing the right m on every step. Is he right? The first line contains two integers n and T ( 2 <= q n <= q 10^5 , -10^{15} <= q T <= q 10^{15} ). The second line contains a string S consisting of n lowercase English letters. Print "Yes" if it is possible to get the desired value. Otherwise, print "No". You can print each letter in any case (upper or lower). In the second example, you cannot get -7 . But you can get 1 , for example, as follows: '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
101920112 |
olimpo |
E |
Dec. 20, 2020, 10:10 p.m. |
OK |
GNU C++11 |
TESTS |
51 |
31 |
1228800 |
|
|
101897152 |
inbarking |
E |
Dec. 20, 2020, 4:41 p.m. |
OK |
GNU C++11 |
TESTS |
49 |
46 |
204800 |
|
|
101912095 |
golazcc83 |
E |
Dec. 20, 2020, 6:53 p.m. |
OK |
GNU C++14 |
TESTS |
50 |
31 |
102400 |
|
|
101932026 |
Gandalf_the_white |
E |
Dec. 21, 2020, 5:36 a.m. |
OK |
GNU C++14 |
TESTS |
53 |
31 |
307200 |
|
|
101924731 |
felipe.fcw |
E |
Dec. 21, 2020, 2:12 a.m. |
OK |
GNU C++14 |
TESTS |
51 |
62 |
307200 |
|
|
101882263 |
almogwald |
E |
Dec. 20, 2020, 3:49 p.m. |
OK |
GNU C++17 |
TESTS |
49 |
31 |
307200 |
|
|
101927481 |
vjudge4 |
E |
Dec. 21, 2020, 3:49 a.m. |
OK |
GNU C++17 |
TESTS |
53 |
31 |
614400 |
|
|
101909896 |
vlvovch |
E |
Dec. 20, 2020, 6:24 p.m. |
OK |
GNU C++17 |
TESTS |
50 |
46 |
307200 |
|
|
101907883 |
BaluconisTima |
E |
Dec. 20, 2020, 6:06 p.m. |
OK |
GNU C++17 |
TESTS |
50 |
46 |
307200 |
|
|
101919660 |
ax333l |
E |
Dec. 20, 2020, 9:51 p.m. |
OK |
GNU C++17 |
TESTS |
51 |
46 |
1024000 |
|
|
101918910 |
limabeans |
E |
Dec. 20, 2020, 9:26 p.m. |
OK |
GNU C++17 |
TESTS |
51 |
46 |
1126400 |
|
|
101925565 |
admirabilis |
E |
Dec. 21, 2020, 2:47 a.m. |
OK |
GNU C++17 |
TESTS |
52 |
46 |
2355200 |
|
|
101919639 |
BRCode |
E |
Dec. 20, 2020, 9:51 p.m. |
OK |
GNU C++17 |
TESTS |
51 |
46 |
5222400 |
|
|
101926447 |
hugh.jass |
E |
Dec. 21, 2020, 3:17 a.m. |
OK |
GNU C++17 (64) |
TESTS |
52 |
31 |
307200 |
|
|
101883308 |
Pechalka |
E |
Dec. 20, 2020, 3:53 p.m. |
OK |
GNU C++17 (64) |
TESTS |
49 |
31 |
307200 |
|
|
101896980 |
Adamantiy51 |
E |
Dec. 20, 2020, 4:40 p.m. |
OK |
GNU C++17 (64) |
TESTS |
49 |
31 |
2355200 |
|
|
101918557 |
gkrish181095 |
E |
Dec. 20, 2020, 9:16 p.m. |
OK |
GNU C++17 (64) |
TESTS |
51 |
62 |
4915200 |
|
|
101932961 |
kostasanemozalis |
E |
Dec. 21, 2020, 5:53 a.m. |
OK |
Java 11 |
TESTS |
53 |
186 |
0 |
|
|
101895200 |
serg3000 |
E |
Dec. 20, 2020, 4:34 p.m. |
OK |
MS C++ 2017 |
TESTS |
49 |
31 |
1843200 |
|
|
remove filters
Back to search problems