CSES - Datatähti 2020 loppu - Results
Submission details
Task:Alueet
Sender:Antti Pham
Submission time:2020-02-09 16:23:02 +0200
Language:PyPy3
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#1ACCEPTED0.05 s1, 3details
#2ACCEPTED0.07 s1, 3details
#30.10 s1, 3details
#40.12 s1, 3details
#50.13 s1, 3details
#60.10 s1, 3details
#70.11 s1, 3details
#80.08 s1, 3details
#90.12 s1, 3details
#100.09 s1, 3details
#110.12 s1, 3details
#120.11 s1, 3details
#130.13 s1, 3details
#140.14 s1, 3details
#150.14 s1, 3details
#160.42 s1, 3details
#170.42 s1, 3details
#180.42 s1, 3details
#190.42 s1, 3details
#200.42 s1, 3details
#210.44 s1, 3details
#220.42 s1, 3details
#230.08 s1, 3details
#240.10 s1, 3details
#250.10 s1, 3details
#26ACCEPTED0.05 s1, 2, 3details
#27ACCEPTED0.08 s1, 3details
#280.37 s1, 3details
#290.35 s1, 3details
#30ACCEPTED0.38 s1, 3details
#310.44 s1, 3details
#32ACCEPTED0.28 s1, 3details
#33ACCEPTED0.39 s1, 3details
#34ACCEPTED0.34 s1, 3details
#35ACCEPTED0.36 s1, 3details
#36ACCEPTED0.29 s1, 3details
#370.07 s2, 3details
#380.07 s2, 3details
#390.08 s2, 3details
#400.08 s2, 3details
#410.08 s2, 3details
#420.07 s2, 3details
#430.08 s2, 3details
#440.07 s2, 3details
#450.08 s2, 3details
#460.07 s2, 3details
#470.08 s2, 3details
#480.07 s2, 3details
#490.07 s2, 3details
#500.07 s2, 3details
#510.07 s2, 3details
#520.08 s2, 3details
#530.07 s2, 3details
#540.08 s2, 3details
#550.07 s2, 3details
#560.08 s2, 3details
#570.07 s2, 3details
#580.07 s2, 3details
#590.08 s2, 3details
#600.32 s2, 3details
#610.07 s2, 3details
#620.07 s3details
#630.07 s3details
#640.07 s3details
#650.37 s3details
#660.07 s3details
#670.07 s3details
#680.07 s3details
#690.37 s3details
#700.07 s3details
#710.07 s3details
#720.07 s3details
#730.37 s3details
#740.37 s3details
#750.07 s3details
#760.07 s3details
#770.07 s3details
#780.07 s3details
#790.07 s3details
#800.07 s3details
#810.07 s3details
#820.07 s3details
#830.07 s3details
#840.07 s3details
#850.08 s3details
#860.07 s3details
#870.07 s3details
#880.07 s3details
#890.08 s3details
#900.07 s3details
#910.07 s3details
#920.07 s3details
#930.07 s3details
#940.07 s3details
#950.07 s3details
#960.07 s3details

Code

l = 0

n, m, a, b = map(int, input().split())


R = []
for i in range(n):
    R.append(input() * b)

R *= a
#print(*R, sep="\n")


Q = [[None for _ in range(m*b)] for _ in range(n*a)]

q = 0
for y in range(n*a):
    for x in range(m*b):
        if Q[y][x] == None:
            Q[y][x] = q
            q += 1
        
        if y+1 < n*a and R[y][x] == R[y+1][x]:
           if Q[y+1][x]:
               l += 1
           Q[y+1][x] = Q[y][x] 
           
        if x+1 < m*b and R[y][x] == R[y][x+1]:
           if Q[y][x+1]:
               l += 1
           Q[y][x+1] = Q[y][x] 
        #print(Q[y][x], R[y][x])
           
        
            

#print(*Q, sep="\n")            
print((q-l) % (10**9 + 7))
            
        

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:

input
5 5 74 39
BABAA
BAAAB
BAABB
BBAAA
...

correct output
5887

user output
999991727

Test 4

Group: 1, 3

Verdict:

input
6 12 37 96
BABABBBBBBBB
BBABBBBBABBB
BBBAABAABBAB
BABBAAAABABB
...

correct output
32162

user output
999979229

Test 5

Group: 1, 3

Verdict:

input
9 7 93 94
BABBAAB
AABBBAB
AAAABBB
ABAABAB
...

correct output
61567

user output
999991919

Test 6

Group: 1, 3

Verdict:

input
5 5 50 57
AAAAA
AAAAB
AABBA
AABBA
...

correct output
8609

user output
999986306

Test 7

Group: 1, 3

Verdict:

input
5 10 92 59
AABABBAAAA
AABAABABAA
AAABBABBBB
BBAAAAABBB
...

correct output
22191

user output
999968396

Test 8

Group: 1, 3

Verdict:

input
17 4 5 37
ABBA
ABBA
AABB
AABA
...

correct output
1317

user output
999998983

Test 9

Group: 1, 3

Verdict:

input
9 14 53 31
BBBBAAABBABABA
AAAABAAABABBAB
AABBBBBAAAABAA
BBBAABABABABAB
...

correct output
29879

user output
6939

Test 10

Group: 1, 3

Verdict:

input
14 4 11 46
BAAA
BBAB
BABB
BBBB
...

correct output
2105

user output
999996378

Test 11

Group: 1, 3

Verdict:

input
15 12 49 41
ABBBAAAAAAAA
AAABBBAABAAB
BAABABBABBAB
AAAAAABBBAAB
...

correct output
42565

user output
999988471

Test 12

Group: 1, 3

Verdict:

input
13 5 36 80
AABBB
AAAAA
ABAAA
BBBBA
...

correct output
11638

user output
999968943

Test 13

Group: 1, 3

Verdict:

input
14 19 96 13
BBBAABBBBBBBBABABAB
BBABBAAAABBBBBBBABA
ABAAABBBABBBABBBBBA
AAAABBABAAABBBAAABA
...

correct output
37889

user output
999975619

Test 14

Group: 1, 3

Verdict:

input
6 17 74 78
AABAABBBABBAABABB
AABBABABBBBBAAAAB
BBABBBABABBBBBBAB
ABBABABBABBABBBAA
...

correct output
92814

user output
24013

Test 15

Group: 1, 3

Verdict:

input
10 8 76 100
ABAABABB
BABAABBB
AABABBBB
BAABBBBA
...

correct output
76704

user output
999970587

Test 16

Group: 1, 3

Verdict:

input
20 20 100 100
AABABABBAABABABBBAAA
AAAABBBBAAABBAAAABAB
BAAAABAAAAABABABBAAB
BABAABABABAABBBAABAA
...

correct output
431101

user output
999961513

Test 17

Group: 1, 3

Verdict:

input
20 20 100 100
AAAAAABAABABAAABBABB
AABAABABBAAAAABABAAA
BBBAAAABBABBAABAAAAB
BAABAAABAABBAABBBBAA
...

correct output
421004

user output
999881815

Test 18

Group: 1, 3

Verdict:

input
20 20 100 100
BBAAABABBBBAAABBBAAA
BBABBAABBBBABAAAABBA
BAAABBAAABAAAAABAAAA
AABBABAABBBBBABBBBAB
...

correct output
431100

user output
999881508

Test 19

Group: 1, 3

Verdict:

input
20 20 100 100
BAABBBBBAABBBABBAAAB
BAAAAAABBABBABBABAAA
AAAAABABAABABBABAAAB
AAAAABAABBBBBABBABBB
...

correct output
531102

user output
999822107

Test 20

Group: 1, 3

Verdict:

input
20 20 100 100
AABAABBBBABAAAABABBA
AAABAABBAABBABAAABBB
AABAAABBBABAAAAAAABB
AABBBBAAAABABBAAAAAA
...

correct output
421001

user output
999841512

Test 21

Group: 1, 3

Verdict:

input
20 20 100 100
AABBAAABAABBBBBAABBB
ABBAABAAABAABBABBBBA
BBAAAABBAAAAAAABBBBA
ABBBAAABBBBBBBBBAAAB
...

correct output
421302

user output
999882007

Test 22

Group: 1, 3

Verdict:

input
20 20 100 100
ABBABABAABAAAAABAABB
ABBAAABBABBBAABBBBBA
BAABBAAABABBABBAABBB
ABABBABAAABBBBABBBBB
...

correct output
501500

user output
21800

Test 23

Group: 1, 3

Verdict:

input
3 6 46 16
AABABB
ABAAAA
AABAAB

correct output
2257

user output
171

Test 24

Group: 1, 3

Verdict:

input
13 6 34 11
BBAABB
ABAAAA
AAABAB
ABAAAA
...

correct output
3626

user output
999999621

Test 25

Group: 1, 3

Verdict:

input
9 9 80 2
ABAAABBAB
ABAABBABB
BABBBAAAB
AABBAABBB
...

correct output
2010

user output
1052

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:

input
20 18 99 100
AAAAABBAAAABBBBABB
BBABAABBBAABBABBAB
BAABAAAAAAABBABABB
ABABABAABAABABABBA
...

correct output
476491

user output
100895

Test 29

Group: 1, 3

Verdict:

input
18 18 98 100
ABABBBBBABBABABABB
BABABAAABBBBBBAABA
BBABAABABBAAABBBBA
AABBBABAABAAAABAAA
...

correct output
520588

user output
216788

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:

input
19 20 100 99
FADFAHACEIEGGHBJCEHC
ADAFFEBFEFDBBJBHICCF
JGDBIJFGEJDCIJBJCBCI
DEIDCEDBDECHBEGHAIGC
...

correct output
3039795

user output
3019995

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:

input
20 20 999999998 1
BBABABABABABABABABAB
AAABABABABABABABABAB
ABBBABABABABABABABAB
ABAAABABABABABABABAB
...

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 38

Group: 2, 3

Verdict:

input
20 20 675864715 1
AABBAABBAABBAABBAABB
BAABBAABBAABBAABBAAB
BBAABBAABBAABBAABBAA
ABBAABBAABBAABBAABBA
...

correct output
758647118

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 39

Group: 2, 3

Verdict:

input
20 20 93295188 1
AABBAABBAABBAABBAABB
ABBAABBAABBAABBAABBA
BBAABBAABBAABBAABBAA
BAABBAABBAABBAABBAAB
...

correct output
932951890

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 40

Group: 2, 3

Verdict:

input
20 20 859593956 1
BAAAAAAAAAAAAAAAAAAA
BABBBBBBBBBBBBBBBBBB
AABAAAAAAAAAAAAAAAAA
BBBABBBBBBBBBBBBBBBB
...

correct output
472691105

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 41

Group: 2, 3

Verdict:

input
9 19 451807869 1
BBAABBBBABBABABAAAA
ABBBBBAAABABBBABBBB
BBBBABABBABABBAABBB
BBAAABABBABABBBABBA
...

correct output
295196654

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 42

Group: 2, 3

Verdict:

input
18 5 215145109 1
BABBB
AAABA
ABBBB
ABAAB
...

correct output
442321725

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 43

Group: 2, 3

Verdict:

input
18 20 73784726 1
DEEAEEBCDEABEEAACAEC
DACECBDCDABACBDDCDDD
CEAACDCABDAEBDDDAADB
BBDECECCBEABBCAEDACE
...

correct output
716146536

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 44

Group: 2, 3

Verdict:

input
8 7 859156029 1
QNQHFJR
CRELECQ
RBMHCSL
LTKPFRR
...

correct output
253581266

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 45

Group: 2, 3

Verdict:

input
10 9 405141701 1
BBBBAABAA
ABBBABAAB
AABBABBBB
BBABBABAB
...

correct output
77125475

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 46

Group: 2, 3

Verdict:

input
18 2 31774979 1
BB
BB
BB
AB
...

correct output
349524770

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 47

Group: 2, 3

Verdict:

input
8 8 562418738 1
QNIOBEEN
GPAGHOMG
EMEHMQHM
EPIPJPJQ
...

correct output
808192912

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 48

Group: 2, 3

Verdict:

input
13 12 800612914 1
IRTAUAOQZMYD
FKPNIVFEOBCL
IAXGXZAHNJUJ
DJUKIKCULNQN
...

correct output
288258811

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 49

Group: 2, 3

Verdict:

input
18 8 628714184 1
PEONHLBB
TBBGKLVM
DFYIABLL
RMOVFLVT
...

correct output
505128429

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 50

Group: 2, 3

Verdict:

input
17 5 779080796 1
BBBBB
BAABA
ABAAA
BABAB
...

correct output
581615816

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 51

Group: 2, 3

Verdict:

input
20 20 811848168 1
BABAABBBBBABAABBAABB
ABAAAABBAABABABBBABB
BBAABAAABBAABAAAABBB
AABABAABBABABABAABAB
...

correct output
710889751

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 52

Group: 2, 3

Verdict:

input
20 20 106342603 1
BBAABABBBABBABABBBAB
BAAAAAABAAAABBBAABAB
BBBABBABAABBBABBBAAA
BBABBBBBBABBABAABAAB
...

correct output
742500534

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 53

Group: 2, 3

Verdict:

input
20 20 996646059 1
BAABABAABAABABBBBAAA
AABABBBABABABBAABBBA
ABBAABAAABAAAAAABAAB
BAABBAAABBBBABAAABBA
...

correct output
778639448

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 54

Group: 2, 3

Verdict:

input
20 20 516122916 1
AABAAAABBABBABAAABBA
BABBBAAAABBAABABBABA
BABAABAABABAAABBABAA
BABAAABBAABBABABABAA
...

correct output
419006017

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 55

Group: 2, 3

Verdict:

input
20 20 164639647 1
BAABBABAABBBABBBBAAA
ABAAABAAAAABBABABBAA
AAABBAABAABBBABBABBA
ABABAAABABABBAABBBAB
...

correct output
890540889

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 56

Group: 2, 3

Verdict:

input
20 20 534414813 1
AAAABBABAAABBABBBABA
AABBBAABAAABABABAABA
BAABBBABABBBBAAABBBB
BAABABBABBABAABABABA
...

correct output
255155281

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 57

Group: 2, 3

Verdict:

input
20 20 706352424 1
AABBAABBABBABAAAAAAB
BABAABAABAAABBBAABAB
ABABBBBBABBBBAAABAAA
ABAABABBABABABAABBBB
...

correct output
206554828

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 58

Group: 2, 3

Verdict:

input
20 20 649579476 1
ABABBBBABAABBBBBBABB
BBAABBAABBAAAABBBABB
BAABBBBBAABBBAABABBB
ABABBBAABBABABBAAABB
...

correct output
376450413

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 59

Group: 2, 3

Verdict:

input
20 20 298308182 1
BABAABABABAAAABAABBB
ABAABABBABAAAAABBBBA
BBABAABBABBBABBAAAAB
BBAABABABBAAABBBAABB
...

correct output
196798982

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 60

Group: 2, 3

Verdict:

input
20 20 9635356 1
ABABAAAAABABAAABBAAA
BBBAAABABBABBBBBBABB
ABAABBBABABBAABBABBB
BAABAAAAABABBBABBBAA
...

correct output
722651706

user output
(empty)

Test 61

Group: 2, 3

Verdict:

input
20 20 103559165 1
BBBAABAABAABBBBAABBA
BAAAAAABAAABBBBAAABB
AABBABBBBBABABAABBBA
BABBABAABAAABABBBBBA
...

correct output
142366580

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 10, in <module>
    R *= a
MemoryError

Test 62

Group: 3

Verdict:

input
3 3 456113515 704946263
AAA
ABB
ABA

correct output
652295842

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 63

Group: 3

Verdict:

input
8 14 743818701 51499980
ABBAABAABBAABB
ABBBBAAAAAABAB
BBAAABAAABBBAB
AAABBBBABBAABB
...

correct output
476592507

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 64

Group: 3

Verdict:

input
8 10 867907943 88246137
BBBBABABBB
BABBAABBAB
BABABBAAAB
ABBABBBABB
...

correct output
391556003

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 65

Group: 3

Verdict:

input
7 20 69289514 23926639
AAABABAAAABAABBBBBAB
BBABBBAAAAABAABABBBB
ABABABAAABAAABBBBBBB
ABABABBABABAABBABABA
...

correct output
854669536

user output
(empty)

Test 66

Group: 3

Verdict:

input
8 15 840301511 481634116
BBBBBBAAABBAAAB
BAAAABABAABBBAB
BBBAABBBBBAAAAA
AAABBABABBAABAA
...

correct output
875048540

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 67

Group: 3

Verdict:

input
12 6 912393308 803560188
AAAAAB
AAAAAA
BBABAB
BBAABB
...

correct output
474035030

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 68

Group: 3

Verdict:

input
6 8 214918899 468968518
BBBBAAAA
BBBBBBAA
BBBABABA
AAABAABA
...

correct output
863729741

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 69

Group: 3

Verdict:

input
6 9 59122463 29755657
AAAAABBBB
AAABAABBB
AAAAAAAAA
BBBBBAAAA
...

correct output
212637108

user output
(empty)

Test 70

Group: 3

Verdict:

input
10 6 692470036 720894753
BBABAB
BBAABB
AABBBB
ABBBAA
...

correct output
406709536

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 71

Group: 3

Verdict:

input
12 14 925313877 700313174
BBABAAABBABBBB
ABABAABBBAABBA
AAABAABBBBABBA
BAABAABABBAABB
...

correct output
160362600

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 72

Group: 3

Verdict:

input
9 8 308222888 171334586
ABAAABAA
BBBAABBA
BAABBABA
BBABABBB
...

correct output
162292142

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 73

Group: 3

Verdict:

input
20 19 859012119 1103593
BBABBBABAAABBBAAABA
BAAAAABBABBABABAABA
BAAABBABAABBBAABBAB
BBAABAAAAABBABBABBB
...

correct output
27244656

user output
(empty)

Test 74

Group: 3

Verdict:

input
19 20 867639889 24371744
ABBABABAABBABBBABABB
AABAAABBABAAABBABAAB
AABBABAAABBBAABAABAB
BBBBAAAABABAAAABABAB
...

correct output
433164344

user output
(empty)

Test 75

Group: 3

Verdict:

input
20 20 461026240 854167036
BBBBAAABBABAABBAAAAB
BABABABABABAABAAAAAB
BBBABABBAABAABABAABA
AAAAABBABAAABAAAAABB
...

correct output
976798562

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 76

Group: 3

Verdict:

input
18 18 416365726 135576991
AABAABBABBABAABABA
ABABBABAABAABBBBAA
AABBBBBAAABAAAAAAA
BAAAAAABAABAABABBB
...

correct output
884411688

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 77

Group: 3

Verdict:

input
19 18 911475114 981811455
AAAAAAAABABBAAAAAA
ABBBAABABBABBBBAAA
BBBABABBABAABAAABA
ABBABAAABBABBBBAAB
...

correct output
528861784

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 78

Group: 3

Verdict:

input
18 20 596983265 456868203
BBBAAABBAABBBBBBAAAB
ABAABAABAABABBABABAA
ABAAAABBABABBBBBABAB
ABABAABBBAAAAAAAAAAB
...

correct output
179830991

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 79

Group: 3

Verdict:

input
20 20 1000000000 1000000000
AAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAA
...

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 80

Group: 3

Verdict:

input
20 20 1000000000 1000000000
ABABABABABABABABABAB
BABABABABABABABABABA
ABABABABABABABABABAB
BABABABABABABABABABA
...

correct output
19600

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 81

Group: 3

Verdict:

input
20 20 534426511 510399332
AABBAABBAABBAABBAABB
BAABBAABBAABBAABBAAB
BBAABBAABBAABBAABBAA
ABBAABBAABBAABBAABBA
...

correct output
448258360

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 82

Group: 3

Verdict:

input
20 20 968602846 454327448
AABBAABBAABBAABBAABB
ABBAABBAABBAABBAABBA
BBAABBAABBAABBAABBAA
BAABBAABBAABBAABBAAB
...

correct output
229302842

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 83

Group: 3

Verdict:

input
20 20 215745358 122512772
BAAAAAAAAAAAAAAAAAAA
BABBBBBBBBBBBBBBBBBB
AABAAAAAAAAAAAAAAAAA
BBBABBBBBBBBBBBBBBBB
...

correct output
128441960

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 84

Group: 3

Verdict:

input
20 20 515577344 419057317
BBABABABABABABABABAB
AAABABABABABABABABAB
ABBBABABABABABABABAB
ABAAABABABABABABABAB
...

correct output
574186338

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 85

Group: 3

Verdict:

input
19 18 277074155 769837940
BAABBABBBBABBBABBB
ABABAAABABAAAABBAB
BBBAAABABBABBAAAAB
BBABABBBAABBABAABA
...

correct output
424550984

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 86

Group: 3

Verdict:

input
19 19 14349140 136555934
ABFIAMIHJGAAMLLJDCE
GADMEFFDIMMFCDHGIBF
BECHCFABLGAKCABCKHE
GMKMEJIBGBEEMKELGJK
...

correct output
480469347

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 87

Group: 3

Verdict:

input
20 19 252480072 384139973
AAABAABBBAABAAABABA
ABABBAAABABABAABBBA
AAAABBBABBBBBAABABB
ABBABBABBBAABABAABA
...

correct output
323992721

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 88

Group: 3

Verdict:

input
18 20 808966956 194764004
FHBGCAFEFFFJJCDCIHEE
GJDJGFJAIECHBBDJAIDD
EHCHCEFACAJJJIGGBEBB
EHFDHJDADHJGICGCCCFG
...

correct output
521981688

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 89

Group: 3

Verdict:

input
19 19 792491941 694330393
BAABBBABBAABBBBBBAA
BABBAABAAAAABAAABBB
AAAAAAAAABABBBABBBB
BABBAABBAABBBBAAAAA
...

correct output
627592320

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 90

Group: 3

Verdict:

input
20 19 769561679 618893586
AABABBBBBBBABAABBBA
BBAAAABAAAAAAABAABB
ABBABBABAAABBBAAAAB
BBBBBAABAAABBBAAAAA
...

correct output
851646723

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 91

Group: 3

Verdict:

input
18 19 308379941 589515629
ACBBBKKHGIIGHCHKFJB
GBHDBDJGIAGHHFFADKJ
FHAHJJEDEJKEKADKBKL
GIFBADLECHAAELKGJLK
...

correct output
890991727

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 92

Group: 3

Verdict:

input
18 19 553801487 825546077
ABAAABABABAABABBAAA
BAAAAABAAAAAABBBABA
ABABABABABBAAABBBBA
AABBABBBBAABBABBABA
...

correct output
590655675

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 93

Group: 3

Verdict:

input
18 18 982153622 311043226
MCMPHGAOGEACNIPFNK
JHDADENHPJBDINLLII
CAKHPFDJOOFBJJMKIC
OJMJMHHCDAJHLGOAMB
...

correct output
259160804

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 94

Group: 3

Verdict:

input
20 19 770738892 286201314
BBBABBABABAAABAABAB
AAABAABBBBAAABABBAA
ABABABAABBAABBAABBA
BBBBABAABAABABBBBBA
...

correct output
235481754

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 95

Group: 3

Verdict:

input
18 19 862859546 295948996
HUXPLFOMRUCMOUCHDUF
PJLIKDQODQEETRGXRMK
GRLIXKOARVFIOOCKHCQ
RJJXQPRDBBBVENXOQDN
...

correct output
936952574

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError

Test 96

Group: 3

Verdict:

input
18 19 992294411 251454731
AAAAAAAAAABBBABAABB
AABBBABAABABAAAAAAB
BAABAAAABAABBABAABB
ABBBABBBBBAABABBAAB
...

correct output
879758473

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 8, in <module>
    R.append(input() * b)
MemoryError