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 |
1056
|
Mail.Ru Cup 2018 Round 3 |
FINISHED |
False |
9000 |
188659499 |
Nov. 25, 2018, 4:35 p.m. |
Problems
B'One of Arkady 's friends works at a huge radio telescope. A few decades ago the telescope has sent a signal s towards a faraway galaxy. Recently they 've received a response t which they believe to be a response from aliens! The scientists now want to check if the signal t is similar to s . The original signal s was a sequence of zeros and ones (everyone knows that binary code is the universe-wide language). The returned signal t , however, does not look as easy as s , but the scientists don 't give up! They represented t as a sequence of English letters and say that t is similar to s if you can replace all zeros in s with some string r_0 and all ones in s with some other string r_1 and obtain t . The strings r_0 and r_1 must be different and non-empty. Please help Arkady 's friend and find the number of possible replacements for zeros and ones (the number of pairs of strings r_0 and r_1 ) that transform s to t . The first line contains a string s ( 2 <= |s| <= 10^5 ) consisting of zeros and ones -- the original signal. The second line contains a string t ( 1 <= |t| <= 10^6 ) consisting of lowercase English letters only -- the received signal. It is guaranteed, that the string s contains at least one '0 ' and at least one '1 '. Print a single integer -- the number of pairs of strings r_0 and r_1 that transform s to t . In case there are no such pairs, print 0 . In the first example, the possible pairs (r_0, r_1) are as follows: The pair "aaa", "aaa" is not allowed, since r_0 and r_1 must be different. In the second example, the following pairs are possible: '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
53307715 |
vjudge2 |
E |
April 26, 2019, 4:15 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
30 |
420 |
17920000 |
|
2100 |
46741360 |
vjudge4 |
E |
Dec. 8, 2018, 2:54 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
30 |
421 |
16896000 |
|
2100 |
57801412 |
aditya_sheth |
E |
July 26, 2019, 1:25 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
30 |
2230 |
33996800 |
|
2100 |
47030136 |
Khanh_Moriaty |
E |
Dec. 15, 2018, 9:17 a.m. |
OK |
FPC |
TESTS |
30 |
140 |
18739200 |
|
2100 |
57488273 |
lanti |
E |
July 22, 2019, 6:11 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
46 |
17100800 |
|
2100 |
57479634 |
lanti |
E |
July 22, 2019, 1:36 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
46 |
18022400 |
|
2100 |
46392694 |
Dancepted |
E |
Nov. 30, 2018, 7:04 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
46 |
19148800 |
|
2100 |
46401579 |
Dancepted |
E |
Nov. 30, 2018, 12:31 p.m. |
OK |
GNU C++11 |
TESTS |
30 |
46 |
19148800 |
|
2100 |
46249779 |
weiweiwei |
E |
Nov. 26, 2018, 1:35 p.m. |
OK |
GNU C++11 |
TESTS |
30 |
46 |
20377600 |
|
2100 |
67764183 |
1965588402 |
E |
Dec. 28, 2019, 2:09 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
46 |
34099200 |
|
2100 |
57496689 |
lanti |
E |
July 22, 2019, 8:45 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
46 |
34099200 |
|
2100 |
51935501 |
luogu_bot4 |
E |
March 28, 2019, 12:19 p.m. |
OK |
GNU C++11 |
TESTS |
30 |
46 |
34099200 |
|
2100 |
48657298 |
ReaLNero1 |
E |
Jan. 21, 2019, 3:39 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
46 |
36147200 |
|
2100 |
46244467 |
OgataRina |
E |
Nov. 26, 2018, 10:31 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
46 |
36147200 |
|
2100 |
46225523 |
NekoKarp |
E |
Nov. 25, 2018, 6:45 p.m. |
OK |
GNU C++14 |
TESTS |
30 |
61 |
17920000 |
|
2100 |
53963408 |
biaoge |
E |
May 10, 2019, 3:29 p.m. |
OK |
GNU C++14 |
TESTS |
30 |
61 |
18022400 |
|
2100 |
46402763 |
newbiegcz |
E |
Nov. 30, 2018, 1:04 p.m. |
OK |
GNU C++14 |
TESTS |
30 |
62 |
10035200 |
|
2100 |
46292825 |
Fischer |
E |
Nov. 27, 2018, 9:24 p.m. |
OK |
GNU C++14 |
TESTS |
30 |
62 |
10035200 |
|
2100 |
47159066 |
__Parzival__ |
E |
Dec. 17, 2018, 8:43 a.m. |
OK |
GNU C++14 |
TESTS |
30 |
62 |
10854400 |
|
2100 |
46232309 |
Arblash |
E |
Nov. 25, 2018, 9:42 p.m. |
OK |
GNU C++14 |
TESTS |
30 |
62 |
10854400 |
|
2100 |
54208255 |
Origenes |
E |
May 15, 2019, 4:35 p.m. |
OK |
GNU C++14 |
TESTS |
30 |
62 |
14950400 |
|
2100 |
55812025 |
vjudge1 |
E |
June 20, 2019, 4:24 a.m. |
OK |
GNU C++14 |
TESTS |
30 |
62 |
17100800 |
|
2100 |
46569796 |
C1ariS |
E |
Dec. 4, 2018, 4:36 a.m. |
OK |
GNU C++14 |
TESTS |
30 |
62 |
17100800 |
|
2100 |
46234216 |
Gekk |
E |
Nov. 26, 2018, 12:10 a.m. |
OK |
GNU C++14 |
TESTS |
30 |
62 |
18022400 |
|
2100 |
57483474 |
cy41 |
E |
July 22, 2019, 3:46 a.m. |
OK |
GNU C++17 |
TESTS |
30 |
46 |
17100800 |
|
2100 |
57492498 |
cy41 |
E |
July 22, 2019, 7:33 a.m. |
OK |
GNU C++17 |
TESTS |
30 |
46 |
33177600 |
|
2100 |
57482976 |
cy41 |
E |
July 22, 2019, 3:30 a.m. |
OK |
GNU C++17 |
TESTS |
30 |
61 |
17100800 |
|
2100 |
57482751 |
cy41 |
E |
July 22, 2019, 3:22 a.m. |
OK |
GNU C++17 |
TESTS |
30 |
61 |
33177600 |
|
2100 |
46234058 |
WNG |
E |
Nov. 25, 2018, 11:55 p.m. |
OK |
GNU C++17 |
TESTS |
30 |
62 |
9932800 |
|
2100 |
46250461 |
Moysenko |
E |
Nov. 26, 2018, 1:54 p.m. |
OK |
GNU C++17 |
TESTS |
30 |
62 |
9932800 |
|
2100 |
46252959 |
Pakalns |
E |
Nov. 26, 2018, 3:06 p.m. |
OK |
GNU C++17 |
TESTS |
30 |
62 |
10035200 |
|
2100 |
57963509 |
Phortox |
E |
July 30, 2019, 1:17 a.m. |
OK |
GNU C++17 |
TESTS |
30 |
62 |
10854400 |
|
2100 |
46220995 |
Juve45 |
E |
Nov. 25, 2018, 6:01 p.m. |
OK |
GNU C++17 |
TESTS |
30 |
62 |
10854400 |
|
2100 |
46679287 |
Siry |
E |
Dec. 6, 2018, 11:21 a.m. |
OK |
GNU C++17 |
TESTS |
30 |
62 |
17100800 |
|
2100 |
46255063 |
kessido |
E |
Nov. 26, 2018, 4:12 p.m. |
OK |
Java 8 |
TESTS |
30 |
202 |
9318400 |
|
2100 |
46254987 |
kessido |
E |
Nov. 26, 2018, 4:09 p.m. |
OK |
Java 8 |
TESTS |
30 |
202 |
17100800 |
|
2100 |
46254949 |
kessido |
E |
Nov. 26, 2018, 4:08 p.m. |
OK |
Java 8 |
TESTS |
30 |
202 |
17100800 |
|
2100 |
48387162 |
wadissimo |
E |
Jan. 14, 2019, 1:37 p.m. |
OK |
Java 8 |
TESTS |
30 |
202 |
19148800 |
|
2100 |
48386366 |
wadissimo |
E |
Jan. 14, 2019, 1:16 p.m. |
OK |
Java 8 |
TESTS |
30 |
217 |
19148800 |
|
2100 |
46293707 |
PrakharJain |
E |
Nov. 27, 2018, 10:31 p.m. |
OK |
Java 8 |
TESTS |
30 |
217 |
19251200 |
|
2100 |
46259726 |
ZeyadKhattab |
E |
Nov. 26, 2018, 7:04 p.m. |
OK |
Java 8 |
TESTS |
30 |
218 |
18841600 |
|
2100 |
46239669 |
PrakharJain |
E |
Nov. 26, 2018, 6:55 a.m. |
OK |
Java 8 |
TESTS |
30 |
218 |
19251200 |
|
2100 |
47232778 |
xodiac |
E |
Dec. 18, 2018, 6:54 p.m. |
OK |
Java 8 |
TESTS |
30 |
218 |
26624000 |
|
2100 |
46351428 |
flyman3046 |
E |
Nov. 28, 2018, 10:13 p.m. |
OK |
Java 8 |
TESTS |
30 |
233 |
14745600 |
|
2100 |
46219049 |
shaviava |
E |
Nov. 25, 2018, 5:43 p.m. |
OK |
Kotlin |
TESTS |
30 |
233 |
44236800 |
|
2100 |
46224785 |
alexey.enkov |
E |
Nov. 25, 2018, 6:38 p.m. |
OK |
Kotlin |
TESTS |
30 |
451 |
21504000 |
|
2100 |
46222990 |
peregrinus |
E |
Nov. 25, 2018, 6:20 p.m. |
OK |
Mono C# |
TESTS |
30 |
186 |
109056000 |
|
2100 |
46374773 |
peregrinus |
E |
Nov. 29, 2018, 6:02 p.m. |
OK |
Mono C# |
TESTS |
30 |
233 |
109158400 |
|
2100 |
46363328 |
omikad |
E |
Nov. 29, 2018, 12:09 p.m. |
OK |
Mono C# |
TESTS |
30 |
1138 |
47104000 |
|
2100 |
48487432 |
eki |
E |
Jan. 17, 2019, 9:02 a.m. |
OK |
Mono C# |
TESTS |
30 |
2963 |
21094400 |
|
2100 |
46219188 |
LoneFox |
E |
Nov. 25, 2018, 5:44 p.m. |
OK |
MS C++ |
TESTS |
30 |
124 |
28057600 |
|
2100 |
55835952 |
vjudge1 |
E |
June 20, 2019, 3:20 p.m. |
OK |
MS C++ |
TESTS |
30 |
858 |
14028800 |
|
2100 |
46221747 |
bayleef |
E |
Nov. 25, 2018, 6:08 p.m. |
OK |
MS C++ |
TESTS |
30 |
2277 |
101376000 |
|
2100 |
56453644 |
re_eVVorld |
E |
July 3, 2019, 1:52 a.m. |
OK |
MS C++ 2017 |
TESTS |
30 |
187 |
58777600 |
|
2100 |
62553967 |
AleksanderBalobanov |
E |
Oct. 14, 2019, 9:50 a.m. |
OK |
MS C++ 2017 |
TESTS |
30 |
358 |
202752000 |
|
2100 |
52822930 |
bupt.wc |
E |
April 16, 2019, 12:40 p.m. |
OK |
PyPy 3 |
TESTS |
30 |
872 |
124928000 |
|
2100 |
46288250 |
r57shell |
E |
Nov. 27, 2018, 5:45 p.m. |
OK |
PyPy 3 |
TESTS |
30 |
1028 |
121241600 |
|
2100 |
47047011 |
Charles_Han |
E |
Dec. 15, 2018, 2:49 p.m. |
OK |
PyPy 3 |
TESTS |
30 |
1575 |
165888000 |
|
2100 |
46221292 |
limed |
E |
Nov. 25, 2018, 6:04 p.m. |
OK |
Scala |
TESTS |
30 |
2698 |
21913600 |
|
2100 |
remove filters
Back to search problems