Task: | Alueet |
Sender: | Henrik Aalto |
Submission time: | 2020-02-09 16:06:56 +0200 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 47 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 23 |
#2 | ACCEPTED | 24 |
#3 | RUNTIME ERROR | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.01 s | 1, 3 | details |
#2 | ACCEPTED | 0.01 s | 1, 3 | details |
#3 | ACCEPTED | 0.01 s | 1, 3 | details |
#4 | ACCEPTED | 0.01 s | 1, 3 | details |
#5 | ACCEPTED | 0.02 s | 1, 3 | details |
#6 | ACCEPTED | 0.01 s | 1, 3 | details |
#7 | ACCEPTED | 0.01 s | 1, 3 | details |
#8 | ACCEPTED | 0.01 s | 1, 3 | details |
#9 | ACCEPTED | 0.01 s | 1, 3 | details |
#10 | ACCEPTED | 0.01 s | 1, 3 | details |
#11 | ACCEPTED | 0.01 s | 1, 3 | details |
#12 | ACCEPTED | 0.01 s | 1, 3 | details |
#13 | ACCEPTED | 0.01 s | 1, 3 | details |
#14 | ACCEPTED | 0.02 s | 1, 3 | details |
#15 | ACCEPTED | 0.02 s | 1, 3 | details |
#16 | ACCEPTED | 0.12 s | 1, 3 | details |
#17 | ACCEPTED | 0.14 s | 1, 3 | details |
#18 | ACCEPTED | 0.13 s | 1, 3 | details |
#19 | ACCEPTED | 0.14 s | 1, 3 | details |
#20 | ACCEPTED | 0.13 s | 1, 3 | details |
#21 | ACCEPTED | 0.13 s | 1, 3 | details |
#22 | ACCEPTED | 0.12 s | 1, 3 | details |
#23 | ACCEPTED | 0.01 s | 1, 3 | details |
#24 | ACCEPTED | 0.01 s | 1, 3 | details |
#25 | ACCEPTED | 0.01 s | 1, 3 | details |
#26 | ACCEPTED | 0.01 s | 1, 2, 3 | details |
#27 | ACCEPTED | 0.01 s | 1, 3 | details |
#28 | ACCEPTED | 0.10 s | 1, 3 | details |
#29 | ACCEPTED | 0.09 s | 1, 3 | details |
#30 | ACCEPTED | 0.05 s | 1, 3 | details |
#31 | ACCEPTED | 0.06 s | 1, 3 | details |
#32 | ACCEPTED | 0.26 s | 1, 3 | details |
#33 | ACCEPTED | 0.05 s | 1, 3 | details |
#34 | ACCEPTED | 0.14 s | 1, 3 | details |
#35 | ACCEPTED | 0.14 s | 1, 3 | details |
#36 | ACCEPTED | 0.12 s | 1, 3 | details |
#37 | ACCEPTED | 0.01 s | 2, 3 | details |
#38 | ACCEPTED | 0.01 s | 2, 3 | details |
#39 | ACCEPTED | 0.01 s | 2, 3 | details |
#40 | ACCEPTED | 0.01 s | 2, 3 | details |
#41 | ACCEPTED | 0.01 s | 2, 3 | details |
#42 | ACCEPTED | 0.01 s | 2, 3 | details |
#43 | ACCEPTED | 0.01 s | 2, 3 | details |
#44 | ACCEPTED | 0.01 s | 2, 3 | details |
#45 | ACCEPTED | 0.01 s | 2, 3 | details |
#46 | ACCEPTED | 0.01 s | 2, 3 | details |
#47 | ACCEPTED | 0.01 s | 2, 3 | details |
#48 | ACCEPTED | 0.01 s | 2, 3 | details |
#49 | ACCEPTED | 0.01 s | 2, 3 | details |
#50 | ACCEPTED | 0.01 s | 2, 3 | details |
#51 | ACCEPTED | 0.01 s | 2, 3 | details |
#52 | ACCEPTED | 0.01 s | 2, 3 | details |
#53 | ACCEPTED | 0.01 s | 2, 3 | details |
#54 | ACCEPTED | 0.01 s | 2, 3 | details |
#55 | ACCEPTED | 0.01 s | 2, 3 | details |
#56 | ACCEPTED | 0.01 s | 2, 3 | details |
#57 | ACCEPTED | 0.01 s | 2, 3 | details |
#58 | ACCEPTED | 0.01 s | 2, 3 | details |
#59 | ACCEPTED | 0.01 s | 2, 3 | details |
#60 | ACCEPTED | 0.01 s | 2, 3 | details |
#61 | ACCEPTED | 0.01 s | 2, 3 | details |
#62 | RUNTIME ERROR | 0.20 s | 3 | details |
#63 | RUNTIME ERROR | 0.20 s | 3 | details |
#64 | RUNTIME ERROR | 0.02 s | 3 | details |
#65 | RUNTIME ERROR | 0.20 s | 3 | details |
#66 | WRONG ANSWER | 0.01 s | 3 | details |
#67 | RUNTIME ERROR | 0.02 s | 3 | details |
#68 | TIME LIMIT EXCEEDED | -- | 3 | details |
#69 | RUNTIME ERROR | 0.20 s | 3 | details |
#70 | RUNTIME ERROR | 0.02 s | 3 | details |
#71 | RUNTIME ERROR | 0.02 s | 3 | details |
#72 | WRONG ANSWER | 0.01 s | 3 | details |
#73 | TIME LIMIT EXCEEDED | -- | 3 | details |
#74 | RUNTIME ERROR | 0.02 s | 3 | details |
#75 | RUNTIME ERROR | 0.76 s | 3 | details |
#76 | RUNTIME ERROR | 0.02 s | 3 | details |
#77 | RUNTIME ERROR | 0.20 s | 3 | details |
#78 | WRONG ANSWER | 0.01 s | 3 | details |
#79 | WRONG ANSWER | 0.01 s | 3 | details |
#80 | WRONG ANSWER | 0.01 s | 3 | details |
#81 | RUNTIME ERROR | 0.20 s | 3 | details |
#82 | WRONG ANSWER | 0.01 s | 3 | details |
#83 | WRONG ANSWER | 0.06 s | 3 | details |
#84 | TIME LIMIT EXCEEDED | -- | 3 | details |
#85 | RUNTIME ERROR | 0.20 s | 3 | details |
#86 | RUNTIME ERROR | 0.33 s | 3 | details |
#87 | TIME LIMIT EXCEEDED | -- | 3 | details |
#88 | TIME LIMIT EXCEEDED | -- | 3 | details |
#89 | RUNTIME ERROR | 0.02 s | 3 | details |
#90 | WRONG ANSWER | 0.01 s | 3 | details |
#91 | TIME LIMIT EXCEEDED | -- | 3 | details |
#92 | TIME LIMIT EXCEEDED | -- | 3 | details |
#93 | RUNTIME ERROR | 0.20 s | 3 | details |
#94 | WRONG ANSWER | 0.01 s | 3 | details |
#95 | RUNTIME ERROR | 0.02 s | 3 | details |
#96 | RUNTIME ERROR | 0.20 s | 3 | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:56:9: warning: unused variable 'j' [-Wunused-variable] int i, j; ^ input/code.cpp:64:6: warning: unused variable 'A' [-Wunused-variable] int A = Calc(1, 1); ^ input/code.cpp:65:6: warning: unused variable 'B' [-Wunused-variable] int B = Calc(2, 1); ^ input/code.cpp:58:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d%d%d", &N, &M, &a, &b); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ input/code.cpp:61:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%s", Grid[i] + 1); ~~~~~^~~~~~~~~~~~~~~~~~~
Code
#include "bits/stdc++.h" using namespace std; map<pair<int, int>, vector<pair<int, int>>> Gr; int a, b; int Li[2222 * 2225]; int sz; int Fi(int x) { return x == Li[x] ? x : (Li[x] = Fi(Li[x])); } int N, M; void Lit(int ax, int bx, int ay, int by) { int X = (bx - 1) * N * a + ax; int Y = (by - 1) * N * a + ay; X = Fi(X); Y = Fi(Y); if (X != Y) sz++; Li[X] = Y; } char Grid[2222][2222]; map<pair<int, int>, int> Vis; vector<pair<int, int>> GetAll(pair<int, int> Pos) { vector<pair<int, int>> Ret; if (Vis[Pos]) return Ret; Vis[Pos] = 1; if (Gr[Pos].size()) { for (auto &u : Gr[Pos]) { auto K = GetAll(u); if (!K.size()) continue; for (auto &z : K) Ret.push_back(z); } } Ret.push_back(Pos); return Ret; } int Calc(int ax, int bx) { a = ax; b = bx; int i, j; sz = 0; for (i = 1; i <= N * a; ++i) { for (j = 1; j <= M * b; ++j) { if (i <= N && j <= M) continue; Grid[i][j] = Grid[(i-1)%N+1][(j-1)%M+1]; } } for (i = 0; i <= N * M * a * b + 2222; ++i) Li[i] = i; for (i = 1; i <= N * a; ++i) { for (j = 1; j <= M * b; ++j) { if (Grid[i][j] == Grid[i + 1][j]) Lit(i, j, i + 1, j); if (Grid[i][j] == Grid[i][j + 1]) Lit(i, j, i, j + 1); } } return N * a * b * M - sz; } int main() { int i, j; int a, b; scanf("%d%d%d%d", &N, &M, &a, &b); int AX = a; for (i = 1; i <= N; ++i) { scanf("%s", Grid[i] + 1); } if (a <= 4 || b != 1) { printf("%d\n", Calc(a, b)); return 0; } int A = Calc(1, 1); int B = Calc(2, 1); int C = Calc(3, 1); int D = Calc(4, 1); int E = Calc(5, 1); assert(E - D == D - C); long long u = E - D; long long Ker = AX - 4; u *= Ker; u += D; u %= (long long) (1e9 +7); printf("%lld\n", u); return 0; /* } else { for (i = 1; i <= N * 3; ++i) { for (j = 1; j <= M; ++j) { if (i <= N && j <= M) continue; Grid[i][j] = Grid[(i-1)%N+1][(j-1)%M+1]; } } for (i = 1; i < N * 3; ++i) { for (j = 1; j <= M; ++j) { if (Grid[i][j] == Grid[i + 1][j]) Gr[{i, j}].emplace_back(i + 1, j); if (Grid[i][j] == Grid[i + 1][j]) Gr[{i + 1, j}].emplace_back(i, j); if (Grid[i][j] == Grid[i][j + 1]) Gr[{i, j}].emplace_back(i, j + 1); if (Grid[i][j] == Grid[i][j + 1]) Gr[{i, j + 1}].emplace_back(i, j); } } long long Amt = 0; for (i = N + 1; i <= N * 2; ++i) { for (j = 1; j <= M; ++j) { if (!Vis[{i, j}]) { auto U = GetAll({i, j}); int mi = (*min_element(U.begin(), U.end())).first; int ma = (*max_element(U.begin(), U.end())).first; if (N + 1 <= mi && ma <= N * 2) { printf("Amt += a (%d, %d)\n", i, j); Amt += a; continue; } if (ma > N * 2 && mi >= N + 1) { printf("Amt += a + 1 (%d, %d)\n", i, j); Amt += a + 1; continue; } if (ma <= N * 2 && mi < N + 1) { continue; printf("Amt += a + 1 (%d, %d)\n", i, j); Amt += a + 1; continue; } printf("Amt += 1 (%d, %d)\n", i, j); Amt++; } } } printf("%lld\n", Amt); } */ }
Test details
Test 1
Group: 1, 3
Verdict: ACCEPTED
input |
---|
3 2 4 5 AB BA AA |
correct output |
---|
49 |
user output |
---|
49 |
Test 2
Group: 1, 3
Verdict: ACCEPTED
input |
---|
3 3 96 18 ABB BAB BBA |
correct output |
---|
5298 |
user output |
---|
5298 |
Test 3
Group: 1, 3
Verdict: ACCEPTED
input |
---|
5 5 74 39 BABAA BAAAB BAABB BBAAA ... |
correct output |
---|
5887 |
user output |
---|
5887 |
Test 4
Group: 1, 3
Verdict: ACCEPTED
input |
---|
6 12 37 96 BABABBBBBBBB BBABBBBBABBB BBBAABAABBAB BABBAAAABABB ... |
correct output |
---|
32162 |
user output |
---|
32162 |
Test 5
Group: 1, 3
Verdict: ACCEPTED
input |
---|
9 7 93 94 BABBAAB AABBBAB AAAABBB ABAABAB ... |
correct output |
---|
61567 |
user output |
---|
61567 |
Test 6
Group: 1, 3
Verdict: ACCEPTED
input |
---|
5 5 50 57 AAAAA AAAAB AABBA AABBA ... |
correct output |
---|
8609 |
user output |
---|
8609 |
Test 7
Group: 1, 3
Verdict: ACCEPTED
input |
---|
5 10 92 59 AABABBAAAA AABAABABAA AAABBABBBB BBAAAAABBB ... |
correct output |
---|
22191 |
user output |
---|
22191 |
Test 8
Group: 1, 3
Verdict: ACCEPTED
input |
---|
17 4 5 37 ABBA ABBA AABB AABA ... |
correct output |
---|
1317 |
user output |
---|
1317 |
Test 9
Group: 1, 3
Verdict: ACCEPTED
input |
---|
9 14 53 31 BBBBAAABBABABA AAAABAAABABBAB AABBBBBAAAABAA BBBAABABABABAB ... |
correct output |
---|
29879 |
user output |
---|
29879 |
Test 10
Group: 1, 3
Verdict: ACCEPTED
input |
---|
14 4 11 46 BAAA BBAB BABB BBBB ... |
correct output |
---|
2105 |
user output |
---|
2105 |
Test 11
Group: 1, 3
Verdict: ACCEPTED
input |
---|
15 12 49 41 ABBBAAAAAAAA AAABBBAABAAB BAABABBABBAB AAAAAABBBAAB ... |
correct output |
---|
42565 |
user output |
---|
42565 |
Test 12
Group: 1, 3
Verdict: ACCEPTED
input |
---|
13 5 36 80 AABBB AAAAA ABAAA BBBBA ... |
correct output |
---|
11638 |
user output |
---|
11638 |
Test 13
Group: 1, 3
Verdict: ACCEPTED
input |
---|
14 19 96 13 BBBAABBBBBBBBABABAB BBABBAAAABBBBBBBABA ABAAABBBABBBABBBBBA AAAABBABAAABBBAAABA ... |
correct output |
---|
37889 |
user output |
---|
37889 |
Test 14
Group: 1, 3
Verdict: ACCEPTED
input |
---|
6 17 74 78 AABAABBBABBAABABB AABBABABBBBBAAAAB BBABBBABABBBBBBAB ABBABABBABBABBBAA ... |
correct output |
---|
92814 |
user output |
---|
92814 |
Test 15
Group: 1, 3
Verdict: ACCEPTED
input |
---|
10 8 76 100 ABAABABB BABAABBB AABABBBB BAABBBBA ... |
correct output |
---|
76704 |
user output |
---|
76704 |
Test 16
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 AABABABBAABABABBBAAA AAAABBBBAAABBAAAABAB BAAAABAAAAABABABBAAB BABAABABABAABBBAABAA ... |
correct output |
---|
431101 |
user output |
---|
431101 |
Test 17
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 AAAAAABAABABAAABBABB AABAABABBAAAAABABAAA BBBAAAABBABBAABAAAAB BAABAAABAABBAABBBBAA ... |
correct output |
---|
421004 |
user output |
---|
421004 |
Test 18
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 BBAAABABBBBAAABBBAAA BBABBAABBBBABAAAABBA BAAABBAAABAAAAABAAAA AABBABAABBBBBABBBBAB ... |
correct output |
---|
431100 |
user output |
---|
431100 |
Test 19
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 BAABBBBBAABBBABBAAAB BAAAAAABBABBABBABAAA AAAAABABAABABBABAAAB AAAAABAABBBBBABBABBB ... |
correct output |
---|
531102 |
user output |
---|
531102 |
Test 20
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 AABAABBBBABAAAABABBA AAABAABBAABBABAAABBB AABAAABBBABAAAAAAABB AABBBBAAAABABBAAAAAA ... |
correct output |
---|
421001 |
user output |
---|
421001 |
Test 21
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 AABBAAABAABBBBBAABBB ABBAABAAABAABBABBBBA BBAAAABBAAAAAAABBBBA ABBBAAABBBBBBBBBAAAB ... |
correct output |
---|
421302 |
user output |
---|
421302 |
Test 22
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 ABBABABAABAAAAABAABB ABBAAABBABBBAABBBBBA BAABBAAABABBABBAABBB ABABBABAAABBBBABBBBB ... |
correct output |
---|
501500 |
user output |
---|
501500 |
Test 23
Group: 1, 3
Verdict: ACCEPTED
input |
---|
3 6 46 16 AABABB ABAAAA AABAAB |
correct output |
---|
2257 |
user output |
---|
2257 |
Test 24
Group: 1, 3
Verdict: ACCEPTED
input |
---|
13 6 34 11 BBAABB ABAAAA AAABAB ABAAAA ... |
correct output |
---|
3626 |
user output |
---|
3626 |
Test 25
Group: 1, 3
Verdict: ACCEPTED
input |
---|
9 9 80 2 ABAAABBAB ABAABBABB BABBBAAAB AABBAABBB ... |
correct output |
---|
2010 |
user output |
---|
2010 |
Test 26
Group: 1, 2, 3
Verdict: ACCEPTED
input |
---|
4 1 4 1 P G N M |
correct output |
---|
16 |
user output |
---|
16 |
Test 27
Group: 1, 3
Verdict: ACCEPTED
input |
---|
14 6 38 40 XXBVMN ABAXHQ CSMGQM OPQHVF ... |
correct output |
---|
120158 |
user output |
---|
120158 |
Test 28
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 18 99 100 AAAAABBAAAABBBBABB BBABAABBBAABBABBAB BAABAAAAAAABBABABB ABABABAABAABABABBA ... |
correct output |
---|
476491 |
user output |
---|
476491 |
Test 29
Group: 1, 3
Verdict: ACCEPTED
input |
---|
18 18 98 100 ABABBBBBABBABABABB BABABAAABBBBBBAABA BBABAABABBAAABBBBA AABBBABAABAAAABAAA ... |
correct output |
---|
520588 |
user output |
---|
520588 |
Test 30
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 18 98 99 QLVVDEECSBKBAAGNMR NBHNTIHGEAAAKBLATP TAPQIIQSECNOHRQFOL NUQOFTGANCLKGPQAUL ... |
correct output |
---|
3114342 |
user output |
---|
3114342 |
Test 31
Group: 1, 3
Verdict: ACCEPTED
input |
---|
19 20 100 99 FADFAHACEIEGGHBJCEHC ADAFFEBFEFDBBJBHICCF JGDBIJFGEJDCIJBJCBCI DEIDCEDBDECHBEGHAIGC ... |
correct output |
---|
3039795 |
user output |
---|
3039795 |
Test 32
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 AAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAA ... |
correct output |
---|
1 |
user output |
---|
1 |
Test 33
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 ABABABABABABABABABAB BABABABABABABABABABA ABABABABABABABABABAB BABABABABABABABABABA ... |
correct output |
---|
4000000 |
user output |
---|
4000000 |
Test 34
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 BAAAAAAAAAAAAAAAAAAA BABBBBBBBBBBBBBBBBBB AABAAAAAAAAAAAAAAAAA BBBABBBBBBBBBBBBBBBB ... |
correct output |
---|
2000 |
user output |
---|
2000 |
Test 35
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 AABBAABBAABBAABBAABB ABBAABBAABBAABBAABBA BBAABBAABBAABBAABBAA BAABBAABBAABBAABBAAB ... |
correct output |
---|
2000 |
user output |
---|
2000 |
Test 36
Group: 1, 3
Verdict: ACCEPTED
input |
---|
20 20 100 100 AABBAABBAABBAABBAABB BAABBAABBAABBAABBAAB BBAABBAABBAABBAABBAA ABBAABBAABBAABBAABBA ... |
correct output |
---|
2000 |
user output |
---|
2000 |
Test 37
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 999999998 1 BBABABABABABABABABAB AAABABABABABABABABAB ABBBABABABABABABABAB ABAAABABABABABABABAB ... |
correct output |
---|
0 |
user output |
---|
0 |
Test 38
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 675864715 1 AABBAABBAABBAABBAABB BAABBAABBAABBAABBAAB BBAABBAABBAABBAABBAA ABBAABBAABBAABBAABBA ... |
correct output |
---|
758647118 |
user output |
---|
758647118 |
Test 39
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 93295188 1 AABBAABBAABBAABBAABB ABBAABBAABBAABBAABBA BBAABBAABBAABBAABBAA BAABBAABBAABBAABBAAB ... |
correct output |
---|
932951890 |
user output |
---|
932951890 |
Test 40
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 859593956 1 BAAAAAAAAAAAAAAAAAAA BABBBBBBBBBBBBBBBBBB AABAAAAAAAAAAAAAAAAA BBBABBBBBBBBBBBBBBBB ... |
correct output |
---|
472691105 |
user output |
---|
472691105 |
Test 41
Group: 2, 3
Verdict: ACCEPTED
input |
---|
9 19 451807869 1 BBAABBBBABBABABAAAA ABBBBBAAABABBBABBBB BBBBABABBABABBAABBB BBAAABABBABABBBABBA ... |
correct output |
---|
295196654 |
user output |
---|
295196654 |
Test 42
Group: 2, 3
Verdict: ACCEPTED
input |
---|
18 5 215145109 1 BABBB AAABA ABBBB ABAAB ... |
correct output |
---|
442321725 |
user output |
---|
442321725 |
Test 43
Group: 2, 3
Verdict: ACCEPTED
input |
---|
18 20 73784726 1 DEEAEEBCDEABEEAACAEC DACECBDCDABACBDDCDDD CEAACDCABDAEBDDDAADB BBDECECCBEABBCAEDACE ... |
correct output |
---|
716146536 |
user output |
---|
716146536 |
Test 44
Group: 2, 3
Verdict: ACCEPTED
input |
---|
8 7 859156029 1 QNQHFJR CRELECQ RBMHCSL LTKPFRR ... |
correct output |
---|
253581266 |
user output |
---|
253581266 |
Test 45
Group: 2, 3
Verdict: ACCEPTED
input |
---|
10 9 405141701 1 BBBBAABAA ABBBABAAB AABBABBBB BBABBABAB ... |
correct output |
---|
77125475 |
user output |
---|
77125475 |
Test 46
Group: 2, 3
Verdict: ACCEPTED
input |
---|
18 2 31774979 1 BB BB BB AB ... |
correct output |
---|
349524770 |
user output |
---|
349524770 |
Test 47
Group: 2, 3
Verdict: ACCEPTED
input |
---|
8 8 562418738 1 QNIOBEEN GPAGHOMG EMEHMQHM EPIPJPJQ ... |
correct output |
---|
808192912 |
user output |
---|
808192912 |
Test 48
Group: 2, 3
Verdict: ACCEPTED
input |
---|
13 12 800612914 1 IRTAUAOQZMYD FKPNIVFEOBCL IAXGXZAHNJUJ DJUKIKCULNQN ... |
correct output |
---|
288258811 |
user output |
---|
288258811 |
Test 49
Group: 2, 3
Verdict: ACCEPTED
input |
---|
18 8 628714184 1 PEONHLBB TBBGKLVM DFYIABLL RMOVFLVT ... |
correct output |
---|
505128429 |
user output |
---|
505128429 |
Test 50
Group: 2, 3
Verdict: ACCEPTED
input |
---|
17 5 779080796 1 BBBBB BAABA ABAAA BABAB ... |
correct output |
---|
581615816 |
user output |
---|
581615816 |
Test 51
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 811848168 1 BABAABBBBBABAABBAABB ABAAAABBAABABABBBABB BBAABAAABBAABAAAABBB AABABAABBABABABAABAB ... |
correct output |
---|
710889751 |
user output |
---|
710889751 |
Test 52
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 106342603 1 BBAABABBBABBABABBBAB BAAAAAABAAAABBBAABAB BBBABBABAABBBABBBAAA BBABBBBBBABBABAABAAB ... |
correct output |
---|
742500534 |
user output |
---|
742500534 |
Test 53
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 996646059 1 BAABABAABAABABBBBAAA AABABBBABABABBAABBBA ABBAABAAABAAAAAABAAB BAABBAAABBBBABAAABBA ... |
correct output |
---|
778639448 |
user output |
---|
778639448 |
Test 54
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 516122916 1 AABAAAABBABBABAAABBA BABBBAAAABBAABABBABA BABAABAABABAAABBABAA BABAAABBAABBABABABAA ... |
correct output |
---|
419006017 |
user output |
---|
419006017 |
Test 55
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 164639647 1 BAABBABAABBBABBBBAAA ABAAABAAAAABBABABBAA AAABBAABAABBBABBABBA ABABAAABABABBAABBBAB ... |
correct output |
---|
890540889 |
user output |
---|
890540889 |
Test 56
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 534414813 1 AAAABBABAAABBABBBABA AABBBAABAAABABABAABA BAABBBABABBBBAAABBBB BAABABBABBABAABABABA ... |
correct output |
---|
255155281 |
user output |
---|
255155281 |
Test 57
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 706352424 1 AABBAABBABBABAAAAAAB BABAABAABAAABBBAABAB ABABBBBBABBBBAAABAAA ABAABABBABABABAABBBB ... |
correct output |
---|
206554828 |
user output |
---|
206554828 |
Test 58
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 649579476 1 ABABBBBABAABBBBBBABB BBAABBAABBAAAABBBABB BAABBBBBAABBBAABABBB ABABBBAABBABABBAAABB ... |
correct output |
---|
376450413 |
user output |
---|
376450413 |
Test 59
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 298308182 1 BABAABABABAAAABAABBB ABAABABBABAAAAABBBBA BBABAABBABBBABBAAAAB BBAABABABBAAABBBAABB ... |
correct output |
---|
196798982 |
user output |
---|
196798982 |
Test 60
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 9635356 1 ABABAAAAABABAAABBAAA BBBAAABABBABBBBBBABB ABAABBBABABBAABBABBB BAABAAAAABABBBABBBAA ... |
correct output |
---|
722651706 |
user output |
---|
722651706 |
Test 61
Group: 2, 3
Verdict: ACCEPTED
input |
---|
20 20 103559165 1 BBBAABAABAABBBBAABBA BAAAAAABAAABBBBAAABB AABBABBBBBABABAABBBA BABBABAABAAABABBBBBA ... |
correct output |
---|
142366580 |
user output |
---|
142366580 |
Test 62
Group: 3
Verdict: RUNTIME ERROR
input |
---|
3 3 456113515 704946263 AAA ABB ABA |
correct output |
---|
652295842 |
user output |
---|
(empty) |
Test 63
Group: 3
Verdict: RUNTIME ERROR
input |
---|
8 14 743818701 51499980 ABBAABAABBAABB ABBBBAAAAAABAB BBAAABAAABBBAB AAABBBBABBAABB ... |
correct output |
---|
476592507 |
user output |
---|
(empty) |
Test 64
Group: 3
Verdict: RUNTIME ERROR
input |
---|
8 10 867907943 88246137 BBBBABABBB BABBAABBAB BABABBAAAB ABBABBBABB ... |
correct output |
---|
391556003 |
user output |
---|
(empty) |
Test 65
Group: 3
Verdict: RUNTIME ERROR
input |
---|
7 20 69289514 23926639 AAABABAAAABAABBBBBAB BBABBBAAAAABAABABBBB ABABABAAABAAABBBBBBB ABABABBABABAABBABABA ... |
correct output |
---|
854669536 |
user output |
---|
(empty) |
Test 66
Group: 3
Verdict: WRONG ANSWER
input |
---|
8 15 840301511 481634116 BBBBBBAAABBAAAB BAAAABABAABBBAB BBBAABBBBBAAAAA AAABBABABBAABAA ... |
correct output |
---|
875048540 |
user output |
---|
-76587232 |
Test 67
Group: 3
Verdict: RUNTIME ERROR
input |
---|
12 6 912393308 803560188 AAAAAB AAAAAA BBABAB BBAABB ... |
correct output |
---|
474035030 |
user output |
---|
(empty) |
Test 68
Group: 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
6 8 214918899 468968518 BBBBAAAA BBBBBBAA BBBABABA AAABAABA ... |
correct output |
---|
863729741 |
user output |
---|
(empty) |
Test 69
Group: 3
Verdict: RUNTIME ERROR
input |
---|
6 9 59122463 29755657 AAAAABBBB AAABAABBB AAAAAAAAA BBBBBAAAA ... |
correct output |
---|
212637108 |
user output |
---|
(empty) |
Test 70
Group: 3
Verdict: RUNTIME ERROR
input |
---|
10 6 692470036 720894753 BBABAB BBAABB AABBBB ABBBAA ... |
correct output |
---|
406709536 |
user output |
---|
(empty) |
Test 71
Group: 3
Verdict: RUNTIME ERROR
input |
---|
12 14 925313877 700313174 BBABAAABBABBBB ABABAABBBAABBA AAABAABBBBABBA BAABAABABBAABB ... |
correct output |
---|
160362600 |
user output |
---|
(empty) |
Test 72
Group: 3
Verdict: WRONG ANSWER
input |
---|
9 8 308222888 171334586 ABAAABAA BBBAABBA BAABBABA BBABABBB ... |
correct output |
---|
162292142 |
user output |
---|
-1029012352 |
Test 73
Group: 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
20 19 859012119 1103593 BBABBBABAAABBBAAABA BAAAAABBABBABABAABA BAAABBABAABBBAABBAB BBAABAAAAABBABBABBB ... |
correct output |
---|
27244656 |
user output |
---|
(empty) |
Test 74
Group: 3
Verdict: RUNTIME ERROR
input |
---|
19 20 867639889 24371744 ABBABABAABBABBBABABB AABAAABBABAAABBABAAB AABBABAAABBBAABAABAB BBBBAAAABABAAAABABAB ... |
correct output |
---|
433164344 |
user output |
---|
(empty) |
Test 75
Group: 3
Verdict: RUNTIME ERROR
input |
---|
20 20 461026240 854167036 BBBBAAABBABAABBAAAAB BABABABABABAABAAAAAB BBBABABBAABAABABAABA AAAAABBABAAABAAAAABB ... |
correct output |
---|
976798562 |
user output |
---|
(empty) |
Test 76
Group: 3
Verdict: RUNTIME ERROR
input |
---|
18 18 416365726 135576991 AABAABBABBABAABABA ABABBABAABAABBBBAA AABBBBBAAABAAAAAAA BAAAAAABAABAABABBB ... |
correct output |
---|
884411688 |
user output |
---|
(empty) |
Test 77
Group: 3
Verdict: RUNTIME ERROR
input |
---|
19 18 911475114 981811455 AAAAAAAABABBAAAAAA ABBBAABABBABBBBAAA BBBABABBABAABAAABA ABBABAAABBABBBBAAB ... |
correct output |
---|
528861784 |
user output |
---|
(empty) |
Test 78
Group: 3
Verdict: WRONG ANSWER
input |
---|
18 20 596983265 456868203 BBBAAABBAABBBBBBAAAB ABAABAABAABABBABABAA ABAAAABBABABBBBBABAB ABABAABBBAAAAAAAAAAB ... |
correct output |
---|
179830991 |
user output |
---|
-1135788168 |
Test 79
Group: 3
Verdict: WRONG ANSWER
input |
---|
20 20 1000000000 1000000000 AAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAA ... |
correct output |
---|
1 |
user output |
---|
-1941962752 |
Test 80
Group: 3
Verdict: WRONG ANSWER
input |
---|
20 20 1000000000 1000000000 ABABABABABABABABABAB BABABABABABABABABABA ABABABABABABABABABAB BABABABABABABABABABA ... |
correct output |
---|
19600 |
user output |
---|
-1941962752 |
Test 81
Group: 3
Verdict: RUNTIME ERROR
input |
---|
20 20 534426511 510399332 AABBAABBAABBAABBAABB BAABBAABBAABBAABBAAB BBAABBAABBAABBAABBAA ABBAABBAABBAABBAABBA ... |
correct output |
---|
448258360 |
user output |
---|
(empty) |
Test 82
Group: 3
Verdict: WRONG ANSWER
input |
---|
20 20 968602846 454327448 AABBAABBAABBAABBAABB ABBAABBAABBAABBAABBA BBAABBAABBAABBAABBAA BAABBAABBAABBAABBAAB ... |
correct output |
---|
229302842 |
user output |
---|
-2133822208 |
Test 83
Group: 3
Verdict: WRONG ANSWER
input |
---|
20 20 215745358 122512772 BAAAAAAAAAAAAAAAAAAA BABBBBBBBBBBBBBBBBBB AABAAAAAAAAAAAAAAAAA BBBABBBBBBBBBBBBBBBB ... |
correct output |
---|
128441960 |
user output |
---|
-1014040704 |
Test 84
Group: 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
20 20 515577344 419057317 BBABABABABABABABABAB AAABABABABABABABABAB ABBBABABABABABABABAB ABAAABABABABABABABAB ... |
correct output |
---|
574186338 |
user output |
---|
(empty) |
Test 85
Group: 3
Verdict: RUNTIME ERROR
input |
---|
19 18 277074155 769837940 BAABBABBBBABBBABBB ABABAAABABAAAABBAB BBBAAABABBABBAAAAB BBABABBBAABBABAABA ... |
correct output |
---|
424550984 |
user output |
---|
(empty) |
Test 86
Group: 3
Verdict: RUNTIME ERROR
input |
---|
19 19 14349140 136555934 ABFIAMIHJGAAMLLJDCE GADMEFFDIMMFCDHGIBF BECHCFABLGAKCABCKHE GMKMEJIBGBEEMKELGJK ... |
correct output |
---|
480469347 |
user output |
---|
(empty) |
Test 87
Group: 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
20 19 252480072 384139973 AAABAABBBAABAAABABA ABABBAAABABABAABBBA AAAABBBABBBBBAABABB ABBABBABBBAABABAABA ... |
correct output |
---|
323992721 |
user output |
---|
(empty) |
Test 88
Group: 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
18 20 808966956 194764004 FHBGCAFEFFFJJCDCIHEE GJDJGFJAIECHBBDJAIDD EHCHCEFACAJJJIGGBEBB EHFDHJDADHJGICGCCCFG ... |
correct output |
---|
521981688 |
user output |
---|
(empty) |
Test 89
Group: 3
Verdict: RUNTIME ERROR
input |
---|
19 19 792491941 694330393 BAABBBABBAABBBBBBAA BABBAABAAAAABAAABBB AAAAAAAAABABBBABBBB BABBAABBAABBBBAAAAA ... |
correct output |
---|
627592320 |
user output |
---|
(empty) |
Test 90
Group: 3
Verdict: WRONG ANSWER
input |
---|
20 19 769561679 618893586 AABABBBBBBBABAABBBA BBAAAABAAAAAAABAABB ABBABBABAAABBBAAAAB BBBBBAABAAABBBAAAAA ... |
correct output |
---|
851646723 |
user output |
---|
-411950392 |
Test 91
Group: 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
18 19 308379941 589515629 ACBBBKKHGIIGHCHKFJB GBHDBDJGIAGHHFFADKJ FHAHJJEDEJKEKADKBKL GIFBADLECHAAELKGJLK ... |
correct output |
---|
890991727 |
user output |
---|
(empty) |
Test 92
Group: 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
18 19 553801487 825546077 ABAAABABABAABABBAAA BAAAAABAAAAAABBBABA ABABABABABBAAABBBBA AABBABBBBAABBABBABA ... |
correct output |
---|
590655675 |
user output |
---|
(empty) |
Test 93
Group: 3
Verdict: RUNTIME ERROR
input |
---|
18 18 982153622 311043226 MCMPHGAOGEACNIPFNK JHDADENHPJBDINLLII CAKHPFDJOOFBJJMKIC OJMJMHHCDAJHLGOAMB ... |
correct output |
---|
259160804 |
user output |
---|
(empty) |
Test 94
Group: 3
Verdict: WRONG ANSWER
input |
---|
20 19 770738892 286201314 BBBABBABABAAABAABAB AAABAABBBBAAABABBAA ABABABAABBAABBAABBA BBBBABAABAABABBBBBA ... |
correct output |
---|
235481754 |
user output |
---|
-1423895648 |
Test 95
Group: 3
Verdict: RUNTIME ERROR
input |
---|
18 19 862859546 295948996 HUXPLFOMRUCMOUCHDUF PJLIKDQODQEETRGXRMK GRLIXKOARVFIOOCKHCQ RJJXQPRDBBBVENXOQDN ... |
correct output |
---|
936952574 |
user output |
---|
(empty) |
Test 96
Group: 3
Verdict: RUNTIME ERROR
input |
---|
18 19 992294411 251454731 AAAAAAAAAABBBABAABB AABBBABAABABAAAAAAB BAABAAAABAABBABAABB ABBBABBBBBAABABBAAB ... |
correct output |
---|
879758473 |
user output |
---|
(empty) |