QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#700796#43. GeneticsTheZone100 ✓184ms20520kbC++23818b2024-11-02 13:24:062024-11-02 13:24:11

Judging History

你现在查看的是最新测评结果

  • [2024-11-02 13:24:11]
  • 评测
  • 测评结果:100
  • 用时:184ms
  • 内存:20520kb
  • [2024-11-02 13:24:06]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long i64;
const int N = 4105;

mt19937 Rand(time(0));

int n, m, k, opt[128]; 
char s[N][N]; 
i64 cnt[N][4], w[N], sum;

int main(void) {
    opt['A'] = 0, opt['G'] = 1, opt['T'] = 2, opt['C'] = 3;
    scanf("%d%d%d", &n, &m, &k); 
    for (int i = 1; i <= n; ++i) {
        scanf("%s", s[i] + 1), w[i] = Rand(); 
        for (int j = 1; j <= m; ++j) cnt[j][opt[s[i][j]]] += w[i]; 
        sum += w[i];
    }
    for (int i = 1; i <= n; ++i) {
        i64 res = 0;
        for (int j = 1; j <= m; ++j)
            for (int k = 0; k < 4; ++k) {
                if (opt[s[i][j]] == k) continue; 
                res += cnt[j][k];
            }
        if (res == (sum - w[i]) * k) return cout << i << "\n", 0; 
    }
    return 0;
}

详细

Subtask #1:

score: 27
Accepted

Test #1:

score: 27
Accepted
time: 1ms
memory: 4136kb

input:

85 96 48
AACAAACCACACCAACCCACACCACCCAAAACCACCCAACCCAACCAAACCCACACAAAACCAAACACACCCACAAAACCAACAAACCAAAACAAC
AAAACACAAACCCAAAAAACCCCAACCACCCCACAAACACAACAACAACCACACCCACCCACCCACCCCACAACCACACAACCCACAACCAAAACC
AAACCAAAACCCAACCCAAACAAAAACAACACAACACACCACCAACCCAACACACCCCCACAAACCCACACCCCAAAAACAACCAAAACACCACAC
...

output:

10

result:

ok single line: '10'

Test #2:

score: 27
Accepted
time: 1ms
memory: 4316kb

input:

99 100 2
TCGCTAGGAGCCCCGAGGTACATGAATTCAGCCATACAGGGCTATGACCACTAAGTCGCTCCTGGCAGTTTCCAGCACTGTTCGGGCCCCGCATACACTA
TCGCTAGGAGCCCCGAGGTACATGAATTCAGCCATACAGGGCTATGACCACTAAGTCGGTCCTGGCAGTTACCAGCACTGTTCGGGCCCCGCATACACTA
TCGCTAGGAGCCCCGAGGTACATGAATTCAGCCATACAGGGCTATGACCACTAAGTCGCTCCAGGCAGTTACCAGCACTGTTCGGGCCC...

output:

2

result:

ok single line: '2'

Test #3:

score: 27
Accepted
time: 0ms
memory: 3852kb

input:

10 3 1
CAA
ACA
CAA
ACA
ACA
AAA
CAA
CAA
CAA
AAC

output:

6

result:

ok single line: '6'

Test #4:

score: 27
Accepted
time: 1ms
memory: 4032kb

input:

73 81 54
GACGACGCCACACGCGAACGAAGGGCCGCAAGCCGACACAACGGGCCAACCCAGGACACAGCCGGCAGCGCGGAGGCGGCG
AAGCACCCCCGGCGGACGCCACCACGACAACGAGCCAAACGGGCAGCGACAGGAACCCAGGAGAGGAGCCCGAACCCCACC
AAACGCAAGACAAGACGGACGAGGGCAGCAGAGCAGGAGCCGGAACAGCGAAGAAAGCCCCACAGAACAAGGACGCGGCGG
GACGGAAGGCAGAGCGGCCGACAACCGCCCGCACCCCGCGCCACC...

output:

69

result:

ok single line: '69'

Test #5:

score: 27
Accepted
time: 1ms
memory: 5880kb

input:

95 48 24
CCAAGTCTATACATCTTTCCTCGCCCGTTAAAGAACGGAACCCCGCTA
CCCATGAGATCCCTATTTAATAGCAATTGCCCTAAAGTAAACCAGCTC
CAAAGGAGAGACATAGGTCCGAGACATGGCAAGAACGTCCAAAAGCGA
CACCGGAGATAACGCTGTAATCGCCAGGGCAAGCCAGGCCCCCCGAGC
AACAGGCTAGCCATCGTTCAGAGCACGGGACCGACATGCCAACCGATC
CACATGCGAGACCGCTGGACGCGACCTTTACCTACATGCAACACGC...

output:

81

result:

ok single line: '81'

Test #6:

score: 27
Accepted
time: 1ms
memory: 4292kb

input:

95 100 24
ACAACCCCCAACCCAAACAAAACCCAACACCCCAAACCACACCCCACACAAAAAACCACAAAAAACCCACCAACAACCCAACAACCCCCCCACCCAAAAA
CCACCCACACCCCCAAACCAACCCCACAAACCCAACCCACACAACAAAACAAAAACCACAAAAAACCCACCAACCACCACACCAACCCCACACACAAAAA
CCCACCACCAACCAAAACCAACCCCAACAACCCCACCCACACAACACACCAAAAACCACAAAAAAACCCCCAACACCCCAAACAAACA...

output:

90

result:

ok single line: '90'

Test #7:

score: 27
Accepted
time: 1ms
memory: 4064kb

input:

47 100 14
GCCAGGCAAGCGAAAGAGCGGAGGCCACACGAGGGCAGGAACAGAGAGCACAGAAGAAAGCCAAGCGACAGCAACAAAGGCGAGCGAAACGAAAGACCCC
GCCAGGGAGGCGAAACAGAGGAAGCAACACGAGGGCAGGGACAAAGAGCCCAGAAGAAAGCCAAACCACAGCACCAAAGGCGGGCGAAACGAAAGACCCG
GCCAGGCAAACCAAACAGAAGAGGCAACACGAGGGCAGGGACAGAGAGCACAGCAGAAGGGCAAACGACAGCACCAAAGGCGGGCGAA...

output:

41

result:

ok single line: '41'

Test #8:

score: 27
Accepted
time: 0ms
memory: 3936kb

input:

4 4 2
CAAC
AAAA
CCCC
CCCC

output:

1

result:

ok single line: '1'

Test #9:

score: 27
Accepted
time: 1ms
memory: 4072kb

input:

64 64 48
CAAAGACAGCATGAGTGCGAACGTAGATGCAGGCTGCGATGGCGTGATCGCACCGATGTTACAA
AAGCGTACTGGTTGTGGGCATGCGATCTACGTCCCATTGCAGTGGGGAAAGAGCCTAGTCTAGT
CCCCCATAGGCGCGTCCCAGGCGTTCGCGACCATTCCTCCCGCGGTTCTCAAACCCACCCCGGT
ATTCGGTGCGGCGTCTTCTGTACTTCCTGACTAGCTGAAGAGATTGATGCGTCTGGGAGCCTAG
CATCCGGCCGCCTAATTATCGGGCGGGCCGA...

output:

57

result:

ok single line: '57'

Test #10:

score: 27
Accepted
time: 0ms
memory: 4300kb

input:

96 96 48
GGTCGTCTTTTGGACCGTGCGATCGACTCCGATATTTGATGTTCCTTAAGAAGTACGAAAAGTGTAGTCCTGCCAATACAGACTCAGAGCATTATT
GGTATTCTTGGTGAACTTGAGATCTCATCATAGAGGGGAGGTGCATGCCTCCGTCAGCCAATTGTAGGCCTTACACTCCCTACGACGATACGGCGT
TGTAGGATTGGGGCAATGGCTCGAGCAGACGCTATGGGATGGGCAGTACTAATTACTCCACTTGTCTTCCGGACACTCAAGCCGCCGAGAATGAGG
...

output:

36

result:

ok single line: '36'

Test #11:

score: 27
Accepted
time: 0ms
memory: 6124kb

input:

83 96 48
CAAACCAAACACCCAACCACAAACAACCCAACCACCCCCCCACCAACAACAAACACCAAAAACAAAAAAACCACAACCCCCACAACACACACCAAC
CCCACCCCCACCCCACCAACCACCAACAACCCCCACCAAAAACAACACACAAAAAAACACCACAAAACCACAACCCCCACCCACAAAAAAAAACCA
CACAAAACAACAACCAACCCCCCCCCAACCCCAACACAACACCAACCAAACCCCACAACAAACCAAAAACCCCACACCACACCAACAAAAAACCCA
...

output:

61

result:

ok single line: '61'

Test #12:

score: 27
Accepted
time: 1ms
memory: 4124kb

input:

97 96 48
CGTCGTCAGAAATTAGCGCTGATGAATGACTGTGGCTGACGGCTTTTTAGTAGATCGTTGGCCGAACGGACCATAGATTTGTTCCGAGCCTCTAGT
CTGAGGAATAACGTATCGATTCTGACGTAATTTGGATGAAGTAGTTTTCTGCGAGATTTGGCAGCACGTCACCGAGAGTGGGGCCGCTAATAGCTT
CGGAGTAAGACATTAGCGATTCGTCCTTCCGGTTGCGGCCTTATTGTGATGAGAGCGGTTTCAGAACGTCAACTCGCGGGTGTAAGAGCAGCGCGG
...

output:

96

result:

ok single line: '96'

Test #13:

score: 27
Accepted
time: 0ms
memory: 4324kb

input:

100 100 1
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACACCAACCACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACAACAACAACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCA...

output:

68

result:

ok single line: '68'

Test #14:

score: 27
Accepted
time: 1ms
memory: 4312kb

input:

100 100 2
GGCAAGCCAGAAACGCAACAGCCCACCGAACAGCCGCGAGGAGAGAGACCACCCACAGAAGACGCACCACACACGAGGCGGGCAGCCAAGCCCAGAGAGG
GGCAAGCCAGAAACGCAACAGCCCACCGAACAGCCACGAGGAGAGAGACCACCCACAAAAGACGCACAACACACGAGGCGGGCAGCCAAGCCCAGAGAGA
GACAAGCCAGAAACGCAACAACCCACCGAACAGCCACGAGGAGAGAGACCACCCACAGAAGACGCACCACACACGAGGCGGGCAGCCA...

output:

47

result:

ok single line: '47'

Test #15:

score: 27
Accepted
time: 1ms
memory: 4332kb

input:

100 100 60
ACCCAAAGACGAGCTATCCAACAAAGTTTTCCGGCGCAATTGGCGCCGTCTTCCCTCACCGCTAGGGAGCAACGGTCCTGGAGCTCGCCGCGATTAGCAA
GTGACCCACGCATCGGTACGGAATCAAATAGGCGTTCTGCTGCGCAATGACGTGCGGTGCCCTCACTCACCTCTGATTAGACATCCAGGGTGGATTACTG
TTACAATGCACGCTCGTACTGGGTTAACTGAAGCCGTCCAGTTGCACTGCACTCCCGAAAGGTACCTGGCGAGAGTACTAGCGTTCC...

output:

86

result:

ok single line: '86'

Test #16:

score: 27
Accepted
time: 0ms
memory: 4340kb

input:

100 10 5
GGGGGAGACA
AAGGGCCCAG
AGCAAGCCGC
GGCGGAGGCC
GCCGGGACAC
AGAGAGCCGG
GGGGACGAGC
AGCGCAAACG
AAGGCGGCGG
AACCCAACCC
GGGGACGGGC
AGACCGGCGC
AGAGGGGAGG
AGGCCGCAGC
CAAGAAAAGC
AGAGCAAGAA
AGAGGAGACG
CGGACAGCGG
CGCCGGACGA
ACGCGAGCCG
AACGCAAGCC
ACGGCAAACG
CGAGCGAAGC
ACGGCACGCC
AGAAAAGGGC
CCGGGACAAC
AGCGG...

output:

68

result:

ok single line: '68'

Test #17:

score: 27
Accepted
time: 0ms
memory: 3916kb

input:

10 100 4
AACCCCCAAAAAAAACACCACAACCAACCCAAAACCACACCACCCACCACACAACCCACAAAAAAAAAAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCACCAAAAAAAACACCACAACAAACCAAAAACCACACCACCAACAAAACAACCCACAACAAAAACAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCCCAAAAAAAAACACCACAACAAACCCAAAACCACAACACACACAAAAAAACCCACAACAAAAAAAACCCCCCCACACCCAACCCC...

output:

10

result:

ok single line: '10'

Subtask #2:

score: 19
Accepted

Test #18:

score: 19
Accepted
time: 21ms
memory: 11476kb

input:

1513 1728 864
AAACCCCCCACAACAACACAACCAACAACAAACCCAAACCCACCACACAAACACAAACAAAAACCCACACACCACAAACCACACCCCCCCCAAACCACCCAACACACAACCAAACACCCACCAACAAACCAACACCAACAAACAAACCACAAAACCACACAACAACAAAAACACAAAAAACAACCACAAACCACCAACACACCACCAACAAAAACCACCACCCCAAAAAACACACACCCCACACCCCCACCCCACAACCCAACAACCAAACCCCAAACAACACAAA...

output:

1448

result:

ok single line: '1448'

Test #19:

score: 19
Accepted
time: 25ms
memory: 12336kb

input:

1799 1800 2
AACACCCACCCCACCCACAAACAAAAAAAAAACCACACCCACACCACCACACCACACAACCACCACCACCAAACCACCCCCCAAACACAACCAACCCCACAACCACCCAAACCAACACCAACCACACCCCAACACCAACACCAAACACAACAAAAAACACACCAACCCACAACCACAAACCCCCACACCACCAAAACACACCAACCAACACCACCAAACCACCCACACACACCACCCAACCACAACCACAAAACACAAACAACCCCCCACCAAACCCCCCCCCCCCCC...

output:

1245

result:

ok single line: '1245'

Test #20:

score: 19
Accepted
time: 27ms
memory: 12464kb

input:

1718 1800 864
ACCCAACCACAACCCAACACACAACACACAAAAAAAAAAAAACAACAACCCACCACACACCACCCACACCACAACCCAACACCACCAACCCCCCACCCCAAAAAACAAACACACCACACCACAACCAAACCCCAACCACCAACAAACCACAAAACCAACCAAAACCCCACAAACCAAACCACACAAACAAAACCACAAACACCCCAACACCCAACCCACCCACACCCACAAAACCCCAAACCACCCCCAAACCAAAAAAACCAACCCCACAACAACCCACCAACCC...

output:

1709

result:

ok single line: '1709'

Test #21:

score: 19
Accepted
time: 7ms
memory: 8800kb

input:

1151 576 288
AACAAAACCAACCAACCACCAAAAAACAAAACAAAACCCCAAAAAACAAAACACCAACCCAACAACAAACCCCAAAAAACCAAACCCAACACCACCCAACCCCCACACAACACCCCCCACAAACAACAACCCCCCCCACACCCCACAACCCCCACAACCACAACAACACCCAACAAAACAACAACAAAAAAACACCCCCACCCCAAACCAAACAAACACCCCCCCACCCCACAAAAAAAACACAACAAACAACCCCAAAACACCACAAAAACAAAACACACACCAAC...

output:

1007

result:

ok single line: '1007'

Test #22:

score: 19
Accepted
time: 8ms
memory: 11272kb

input:

1799 1800 512
AAACCAACCCCCCAACCACCACCAAACCCACCACCAACCACCAACACCCACAACCAACCACCACACACCCACCCACACCACCCAACAACCAAAACCACCACCAAACCCCACCAACCAACCAACCACCACACCCCACCCCCACACCAAAACCAACACCCAAAAACCAACCAACACAACCCCCAAAAACCAACAAAAAAACAAAACCAAAACCCACCAACACAAAAAACAAACCAAAAACACCCCCCAACAAACCCCAACAACACAAACCCAACCACACAAACACAAC...

output:

172

result:

ok single line: '172'

Test #23:

score: 19
Accepted
time: 18ms
memory: 11684kb

input:

1799 1800 512
CCCCAACACCCCACCAACCACAAACCCAAAAAAAAAAACCAACCCACCCACAAACCCCCCAACCCAAAACCCCCCCCCCACACACACAAACACCAACAAACCAAAACCAACACACAAAAACAACCACAACAACAAAAAAAACAACACCACCAACAAACACAACAACACAACCCACAAACCAAACCAACAAACAAACACAACACCCACAACACACACACCACACCCCCCCCCCAACCAACCCAAAACAACAACAAACCACAAACAAACACCACACACAAAACAACAA...

output:

646

result:

ok single line: '646'

Test #24:

score: 19
Accepted
time: 10ms
memory: 8832kb

input:

767 1800 704
CACAAACCCACACACCCCCCCACACAAACCACAACCACCCCCACCCACACCCAACACCAAACCCACCACAACCCAAAAACACCCACCCAACCCCCACAAAAACAACAAAACCACAAAACCAAACCAAACCCAAACAACCCAAAAAACCAACAAAAAAACCACAACCACACCACACAACAACACCACACACAACAACCAACCAAAACCACCACACCCCACAAAACCCCACCCACACAAAAACCAAAAACCACAAAACCAACAACACCCACCAAAACAACCCACCCCCA...

output:

698

result:

ok single line: '698'

Test #25:

score: 19
Accepted
time: 12ms
memory: 8976kb

input:

767 1800 194
AACAAAACCCACCACAAACCCCACCCAACACCCCACACACAACAAAAACAACAAAAACAAAAAACCCCAAACAACCCAAACACCACCACCCCAAAACAAACCCACACCACAAAACAACCCCAAACACACAAACAACCCAACCAAACACCCCAACACCCCACACAAACACCCCCAAAAACACACACCACCAAAAACCAACCCACAAAAAACACAACAAAACAACAACAACCCCACCCAAAAACAACCACCCACAAACCAACAAAAACAAAAACCAAACAACCAAACAA...

output:

610

result:

ok single line: '610'

Test #26:

score: 19
Accepted
time: 10ms
memory: 11996kb

input:

1728 1728 864
ACACCCACCACCAACCCACACCCCCCACACACCCACCAACCCCCCCCAAACCCCCAAACAACCACCAAAACAAACCCAACAACACCCCCACACAAAACAAAAACCCCCCACCACAACAAAACAAAACAAACCCCACCACCCAACCAACAAACAAACACCAAAAAACAAAACCACCAACCAAACCCACACCACACCAAACCACACAACAAACCCAACAACCACAAAAACCCACCCCACAACCACCCACCAACACCAAAAACACCCACCCCCACAAAACACCAACCAA...

output:

39

result:

ok single line: '39'

Test #27:

score: 19
Accepted
time: 24ms
memory: 11008kb

input:

1728 1728 864
CCCACCCAAACAAACCCCCACCCCCAACACACCCCCCCAACACCCCCAACACCAACCCAAACCACACCACAAACCACAAAACCAAACCCCCAACCCCCAACAACCCCCACAAACAAAAAACCACCAACAAACACCACCCAACACCCCCAACAAACCAACAACAACCACAAAAACCACCACCCCCAAAAACCACACCAACACCAACCACAACCCACACACCCCCCCACAACCACAAACCACAAACCCCAAACCCACCAACCAACACAAACCCACAAACCACCACACC...

output:

1277

result:

ok single line: '1277'

Test #28:

score: 19
Accepted
time: 15ms
memory: 10772kb

input:

1513 1728 864
ACCCAAAACCACCACCCACCCAACACAAACAAACAACAAAAACCAACCACAACCACCAACCACCCAACAACAAACACAACCCAACAAAACAACCCACCCACACAACCCCAAACAAAAAAAACACACACCAACAAAAAAACCACCACCACACACCAACAAACCAAACAACAAAAAAACACCAAAACACAACCCAAAACCCCACACACAACAAACCAACCACACAAAACCCAACCCCCAACACCCAACAAACACACCCAAACAACCCACCAAACCCCCCCCCCAACAA...

output:

887

result:

ok single line: '887'

Test #29:

score: 19
Accepted
time: 10ms
memory: 10324kb

input:

1521 1728 864
AAACCACCAACCCAACAAACAAAACCCACACCACCAAAAAACCCAACACCCCACACAAAACCCCCAAAACACACCCAAAAAACCAACCACCACCCAACCCAACACCCACACAACAAACAAACCCACACCAACCCACAACAACACACACCACAAAACCACCACAAAACAACCCACCAACACCAACCAAAAAAAACAACCAAAACCACCACACCACAACAACCCAACACAAAACCAAAAAACAACCCCACAACAACAACCCCACAAACCCAACAACCACACACCACAA...

output:

86

result:

ok single line: '86'

Test #30:

score: 19
Accepted
time: 13ms
memory: 11640kb

input:

1513 1728 864
CCACAAACCCACACACCCCACACCCACACCAACCCACACCCACACCACCACCAAAAAACCCACACCCCACAAAACACAAAACCACAAACAACCCACACCAAACAACACCAAACACAAACACACCCCCAACAAAAAAACCCCACAACAAAAACCCAAAACACCCAAACAACAAACAAAACCCCAAAACCCAACACCACACCACAAAAACCAAACAACACCCCACCACCAAACAACACCAAAACCAAAACACCAAACAAAAACCCCCCCCACAAACAAAAACAACAAC...

output:

388

result:

ok single line: '388'

Test #31:

score: 19
Accepted
time: 21ms
memory: 10100kb

input:

1297 1728 864
CACCAACACCCACAAACCAACAACAACCCACAAACCACCACACAACACCACCACACCCAACAAACCCACCCCCCAAACACACCCACACACCCACCAACACCCCCACCCAACACCCCAAACCCAAACCCCACCACACCACAACAAAAACAACACCCCCCAACCCAAAAACAACACCACAACAAACAACCACCAAACAACCCACCAAAAAACACAAACACCAAACCCCAACCACCCACAACAAACCCACCCCCACCACCAAAACCCCACAACACCAAAACCAAAACAA...

output:

1200

result:

ok single line: '1200'

Test #32:

score: 19
Accepted
time: 7ms
memory: 9404kb

input:

1313 1728 864
ACCACCAAAAAACCCAACAACACAAACAAACCAACAAACCAACAACCCAACCCCACACCCCCACCAACCCCCCAACCACCACCCCACCACAACAACAAAACACACACCAACCCAACACCCAACCCAACAAAACCCCAACACACAACCCAACCCAAAACCCCCCACCCAAAACCCCCACAACCCCCACACACACAACCAACAACACACCCCACACCAAACCACCACCACCACAAACACAACAAACCAAACACAAAAAAAAAACCCAAAACACCCACCCACCACCCAC...

output:

246

result:

ok single line: '246'

Test #33:

score: 19
Accepted
time: 12ms
memory: 11616kb

input:

1471 1536 768
CAACAACCACCCCCAAAACCCACACAACAACCACCCCAACCCAAAAACCCACCCCACAAACCAAAACCCCCACACCACAACCCACACCAACACACAAAACACCAACCCCCACAAAAAAAAACAAACCCCCCCAAACAACAAAAACCCCAACAACACACAAAACCAAACCCACACCCACAAACCCCACACACAAAACCCCAACCCAAAAAAACCAACCAAACAAAACACCCCCAAACAACACCAAACCACCACAAAAACCCAACCACAACAACCCCCACAAAAACAA...

output:

449

result:

ok single line: '449'

Test #34:

score: 19
Accepted
time: 26ms
memory: 11380kb

input:

1722 1800 864
ACCAACCCCCCACCCCCCCCAAACACAAAACCACCCCAAAACACACCCACCCACCAACACCCAACACCAAAACCAACCCCCCAACCCCCCCCCAAAAAACAACACCCAACCCCACACACACACCACCAACCCACCCAACCACCACCCAAACAACACCCACCACCCCCCACACAACACCCCAAACCAAAACCAAACCCAACAACCACAACAAAACCCACAAAAACCCCCCAACCAAAAAAAAACAACCAACCCCCCACACCAAAACCCAACCCCCAAAAACAAAAAA...

output:

1309

result:

ok single line: '1309'

Test #35:

score: 19
Accepted
time: 10ms
memory: 10936kb

input:

1709 1800 864
AAAAACCCCCACCCACACCCAACCAAAAAACCAACCCCACAAACCCAAACAAAACCACCCCAACAACCACAACCACCAACAAAACAACAAACACCCCACAACCCCACACACCAAAAAAACAAAACACAAAAACCCAAAACCCACCCACCAACAAAAAACCCCAACAAACCCACCCCAACCACCACCCAAACAAAACACCCCCCAACCCCCAAACCAACAAAAACAACCCCCCCCAACCAACCACCACAACACCCCCCACCCACACACACCCACAACCAAACACACC...

output:

47

result:

ok single line: '47'

Test #36:

score: 19
Accepted
time: 23ms
memory: 12380kb

input:

1724 1800 864
CAACACAACCACACCCCCAACAACCAAAACCAAACAACAACCAACAACCACCCAACAAACCCACCAACACCACAACCACAAACAAAAACCACCACCACCCAAACCAACCACCACCAAAAACAAACACCACCAAACCCAAACCACAACACACACACCAACAACCAAACCACCCACAACAAAACACACCAAACCACCACCCCCACAACCCAAAACAACAAAACACACCCCAAAAACCCAACACACACACCACACCAACCCCAACCCACCAACCCCCAAACAAAACACA...

output:

1141

result:

ok single line: '1141'

Test #37:

score: 19
Accepted
time: 13ms
memory: 12108kb

input:

1700 1800 864
CCAACCCAAAAACCCAAAAAAAAAAACCACAAAACAAACCACAAACAACACAAAACCAAACCCCAACACACACACCCAACCCCACCAACCCAAACCCCACCAACACCCCCCAACACCCACCCCCCCACAAAACAACAAAAACCAAAAACACAAAAACCACCCCAAACACACCCAAACCCCCACAACACACACAAACAACCCACCCAACCCACAACCAAACAAAAAAACACCACCCACACCCCACAACACCCCAACCAAACAAAAACAACCAAACAAACAACAAACA...

output:

318

result:

ok single line: '318'

Test #38:

score: 19
Accepted
time: 23ms
memory: 12724kb

input:

1719 1800 864
CCACCACCCAACCACCACAAACCCAACCACCCACCAAACACCACCACAAAACCACCCCACCACCAACAACCCCACCAAACACCCCCACCACACAACAAACCAAACAACACACCACCCCCAACACCCCAACAACAAACAACACCCCACAAAACAAAAAACACCCACCCAACCCCACAACACCAAAACACAACACACCCAACACCCCCACAAACAAACAAACCACCCAACACCCCAACCACAAAACCACCAACAAACCAAACAAAAACAACCAACAACCACACACACA...

output:

1101

result:

ok single line: '1101'

Test #39:

score: 19
Accepted
time: 29ms
memory: 11060kb

input:

1707 1798 864
CACAAACAAACACCCAAACACCCCCACCCCAAACACCAAAAAAACCCCCACAAAACCCACCCACAAACAACAACACCCCCCCAAAACAAACCACCAACCCACAACAAAACAACACAAACCCCCCCAACCAACCCCCCACCAAAAAACCCAACAACAAACACACAACCCAACAAAAAAACCAAACCCAACCAAAAACCACACCAACCCAAAACAAACCCCCCAACCCACCAACAACAACCAAAAACCCAAAACAACCAACAAAACCCACAACACCAACCAAAACACC...

output:

1612

result:

ok single line: '1612'

Test #40:

score: 19
Accepted
time: 26ms
memory: 10932kb

input:

1714 1800 864
AAACCCAAACCACACACAAAAACCCAACACCAAAACCCCCAACAAACCAAACAAAACCAACCCCCCACCACAAACACCCACAACACCCCCAACCCCACACCCAAAACAAACCACCCCACCAAAAAAACACCAACAACCACCCCCACCACACACAACACAAACAACCACCAAAAACAACAACCAACCCCACCACCACCACACACACCACCCAACACCCACCAACAAAAACCACACAAACCCCCAAAACCCCACAAAACAAAACCCCACCAAAACCCCACCACACCCA...

output:

1696

result:

ok single line: '1696'

Test #41:

score: 19
Accepted
time: 26ms
memory: 11656kb

input:

1713 1800 864
AAAAACAAACCACAAAAAAAACAAAAACAACCCACCAACCACAAACCCCACCCAACCCCAAACCCCCCCCAACACCACAAAACCAACACCACACCAAAAAACCCACAAAACCACCCACAAAAAACCCCACCCCACCCACAAACAAAACCAAAAAAACCCACCCAACCACCCCAACACACCAAACCACAACCAACACCCCCCCACCAAACAAACCCCACAACAACCCCAACACCCAACAAACCAAACCCAAACACCCAAAAACAACCCCCCACAACCAACACCCCAA...

output:

1632

result:

ok single line: '1632'

Test #42:

score: 19
Accepted
time: 9ms
memory: 12156kb

input:

1701 1800 864
AAAAAACACCAAACCACACCACACCCACCAACAAAACACCACACCCCAAAACACCCCACCCAAACCAACCCACCCCCAACACACACACAACAACCACCCCCAACAAACACCACCACCCCCCAAACCCCAACCCCCACCACCACAACACCAACAACAAACCCCAACACAAACCCAACACCAAACCCCCACCAACCACAAAAAACCCACCAACACCACAACCCCCCCCACCCAACACACCCCCAAACACAAACACAAAAACCCCAAACACCACCCCACAACACACCCC...

output:

382

result:

ok single line: '382'

Test #43:

score: 19
Accepted
time: 11ms
memory: 11756kb

input:

1715 1800 864
AACAACCACCCAAAAACACCCCAAACCACACAACCACCAACACCACACACCCCCCCCCAAAACAACAACAAACCCCCCACCAAACACACCCCAAAAAAAACACCAAAAACCCCCAACCAAACAAAACACACCAAACCAAAAAACAAACCCCACAAAAAACCAACCCAAACAAAAAACACCCCACCCCCAACAAAACCCCCCAAACAACCAAACCAACCAAAAAACCACACACACCCCAACCACACCCCCCAAAAAACACAACACCAACACAACAAACAACACCCCC...

output:

750

result:

ok single line: '750'

Test #44:

score: 19
Accepted
time: 18ms
memory: 12492kb

input:

1704 1800 864
ACACCAAACCAAACACCACACCCCACCCACACAACCCCCACCACCCACAAACCCACCCACCCAAAACCACACCCCACACCAAAAACCCACCCCAAAAAAACCCAAACCACACCAACACCACCCAACCCCCCCACCCACCCAAAAACACCAAAAAAAAAAACCCAACAACCACACCCACCAACACACACCCCAACAACACCAACACCCAAAACACACACCACCAAACCCAAAAAAACCAACCCACCCCCCAAAACAACACAAAAAAACAAACAACAACCACCACAAA...

output:

658

result:

ok single line: '658'

Test #45:

score: 19
Accepted
time: 14ms
memory: 11040kb

input:

1703 1800 864
CCCCCCACACAAAAACCACACCAAACCACAACACCCACACACCAACCACACCACAAAAACCAAACACACCCCCACCCACAAACACCAAACCCCCCACACACAACACCCAACCCACAAAAACACAAAACCAAAACCCAACCAAACCAACCACCCCCCCAAAACAAAAAAACCAACCCACACAAACAAACACCCACCCAAAAACACCCACAAAACACACCCCCCAACACCCCCCCAAACACACAAAAAACACAACAAAAAAACCAACCAACCAACACCAAACCCCCAA...

output:

633

result:

ok single line: '633'

Test #46:

score: 19
Accepted
time: 25ms
memory: 11688kb

input:

1714 1800 864
CACCCACCAACCACCAACCCAACACACCCACCCAACCCAAACCACCAACCCCCAAAAAAACAAACCCACACACCCCAAAACACCAACCACACACCAAACCCCACAACCCAACACACAACACCACCACCCCCCCAACCAAAAAACCCCAACAAACACCACAAACAAACCAAACCCCCAACCCACCCACAAAAAACCCACACAAAAACCCCCCACCCAACACCCCACACACCAACAACCCACAAAAAACACCAAAAACACCAACCCCCCCAACCCAAAAAAACACACA...

output:

1246

result:

ok single line: '1246'

Test #47:

score: 19
Accepted
time: 11ms
memory: 11384kb

input:

1800 1800 1
CCCCCACCCACACAAACCACCACCAACACAAACCCACCACAACACACACCACACAAAACCCCACAACAAACACCCACAACCAAAACACCACAACAAACCAAACAAAACACCAACACCCAACCCAACCCCACACAACACAAAAACCCAAAACAACACCCACCCCCAAAAACCCCAACCCCCACAACACAACCACCCCACAAACCAACCCACCAACCACAAAAAAAACCACAACACCACAACACAAACAAACAAAAAAAAACCAACAAACCACCCCAACCACCCACCCAA...

output:

335

result:

ok single line: '335'

Test #48:

score: 19
Accepted
time: 22ms
memory: 11532kb

input:

1800 1799 10
CCAAACCCAAAAACACCACCCACAACCCCCACAACCCCAACCCACCCAAAAAAAACCCCCCCAAAACCCAAACCAACACACCAACCACACCAACAAACACACACCCAAACCCCCACAAACCCAACACCAACACAACCAACACCCCCACCCCCCCCCAAAACACAACCAACCACCAAACACAAAAAACACACAAAACAACCACCAAAAACAAAACAACACAAAACCCCAAACCACCACCCAAAACCCACCCAAACAAACCCAAAACACCACCACAACCAACCCCAAAC...

output:

1017

result:

ok single line: '1017'

Test #49:

score: 19
Accepted
time: 8ms
memory: 12948kb

input:

1799 1800 1000
CACACCCCCACAACCACCAACCAAACACAACCACCACACACAAAAAAACACAACCCACACCAAACCAAACCAAACAACCCCAAAAACCCCCAACACACAAAACAACAAACCCCAAACAAACACACCACAAACAAAACCACACAAAAAACAACCAACACACAAAACCAAAAACCCAACAACACCCACAAAACACCCACAACCAACCCCCACACACACCCACCACACACCCCAAAAAAACCCACCCACAACAAACCACCACCAAACACCCAACCACCCAAACACCCA...

output:

478

result:

ok single line: '478'

Test #50:

score: 19
Accepted
time: 0ms
memory: 3856kb

input:

10 3 1
CAA
ACA
CAA
ACA
ACA
AAA
CAA
CAA
CAA
AAC

output:

6

result:

ok single line: '6'

Test #51:

score: 19
Accepted
time: 1ms
memory: 4216kb

input:

100 100 1
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACACCAACCACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACAACAACAACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCA...

output:

68

result:

ok single line: '68'

Test #52:

score: 19
Accepted
time: 0ms
memory: 3836kb

input:

10 100 4
AACCCCCAAAAAAAACACCACAACCAACCCAAAACCACACCACCCACCACACAACCCACAAAAAAAAAAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCACCAAAAAAAACACCACAACAAACCAAAAACCACACCACCAACAAAACAACCCACAACAAAAACAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCCCAAAAAAAAACACCACAACAAACCCAAAACCACAACACACACAAAAAAACCCACAACAAAAAAAACCCCCCCACACCCAACCCC...

output:

10

result:

ok single line: '10'

Subtask #3:

score: 28
Accepted

Dependency #2:

100%
Accepted

Test #53:

score: 28
Accepted
time: 89ms
memory: 20284kb

input:

3585 4096 2048
AAAACCACCCAAAACCCACACACCACAACAAACACCACCAACAAACCAACCAAAACAAAAAAACAAAACCCCACAAACACCAAAAACCCCAACCACACCAACACCCCCCCACAAACAAAACACAACCACCCACACCACAAACCCCCCCACAACACCACCCCCCCCCCCCCAACAACACACCCCACCCACACCCAACCCACAAACCCCCACCCCCCCAAAACAACAACCACCACCCCCCACCAAAAAAACACCAAACAAACCAACCAACCAACAAAAAAACACCAC...

output:

1755

result:

ok single line: '1755'

Test #54:

score: 28
Accepted
time: 74ms
memory: 20404kb

input:

4099 4100 2
CAACAACCCAAACACAACCCACCAACCACACAAACACCAACAAACAAAAAACCCACACACAAACCACCACACACACAACAAAACCAAAAACCACAACCAACAACCACACAACAAAACCCCCACCACACCACCAACCCCACCACCCAAAAACCAACCCCAAACACACACCCCCCCACACCCACAAACAACAACCCACACACACAAACAAAACCACCCAACCCCAAACCACAACACCACAACCAACAACCAACAACAAACCCACACCAACCCACCCCACACAACCACACC...

output:

1356

result:

ok single line: '1356'

Test #55:

score: 28
Accepted
time: 148ms
memory: 20124kb

input:

4001 4096 2048
CCCACCAAAACACCACACAACAAACACACCAAAAACAACCCCACCCAAAAAACAAAACCCCACACACCAAACCCACAAACAACCCCACAACCAAAAACAACCCAAAACCACACAACCAACCCCAACCACCAAACAACAAAAAACCACAAAACCCCCCCCACACACAACCACCACACAACAACACCAACCCCCACAAAAACCCCCCCCAAAACACCAAAAAACCCCACCAACCCCCAACACCAACCAAACCCACCCCACACCCCCCCAAACACCCCCACACCCACC...

output:

3856

result:

ok single line: '3856'

Test #56:

score: 28
Accepted
time: 27ms
memory: 17852kb

input:

3455 1728 864
CCAAAACCCACCACCAACCCCCACAACCACACCCACAAACACAAACCACCAACAAACAACACCAAACCACAACCAACCCCCCCCCCCAAACCCAACCCCAACCAAACCCCCCCAACCACACACCCCCACCCCACAACCAACACAAAAAAAACCAAAAAACAAAACCACACAACACAACACCCCAAAACCCCCCACACCAACCAAAAACCAACACCCACCACACCAACCAACCCAACACAAACACAACCCAACACAACAAAAACCAAACACCCCCACCCCAACCAAA...

output:

1432

result:

ok single line: '1432'

Test #57:

score: 28
Accepted
time: 104ms
memory: 20496kb

input:

4095 4100 1024
CCAACAACCAAAACACACCCCAAACCCCCCAAACCACAAAACCAACACAACCCACCCCCCACACCCAAAAACACCAACAACAACAAACCCACACAAACCCCAACAAAACAACCACAACCCAACACAACCCCAAACAACCACCACCACAACACCCCCACCCACACACCCCCCAACCACCAAACCCAACACCACCACCAAACACAACCACCCACCCACACACAACCCCCACAAACACACACAACCAAACCACCCACAACAACCCAACCACAACCCCACACAACCACA...

output:

2404

result:

ok single line: '2404'

Test #58:

score: 28
Accepted
time: 61ms
memory: 12492kb

input:

2047 4100 1536
AAACACCACCAACCAAACACCAAACAACACCCAAAAAAAAACACACAAACCAAAAAAACACCACACACCAAACACCACCACAACAACACACACACAACACCCCAACCACAACCACCAACAAACCACCCCAACACCCACCAACCAACAAACAACACAACAACCAAAAACCCACCACCACAACCCACAAAACACAAACACACCCCAAAACCAAACCCACCACAAACACCCAACAAACCACACCACAACCCCAAACCACACACCACACCACACACCCAACCCAACACA...

output:

1340

result:

ok single line: '1340'

Test #59:

score: 28
Accepted
time: 40ms
memory: 12472kb

input:

2047 4100 514
CCAACCCCCACCAACACCACCCCAACCACCCAAAAACCAAACCACACCAAACCACCAAAAAAACAAAACCCCCCCCCAACAACCCCACCACCAAAACACAAACAACCACAACCCAACAACCACCACCCACCCAAAACAAACCACAACAACCACACAACACCAAACCAACCCACCACAACCCCCACCAACCAACCAAACACCAAACACCCCCCAAACCAACCCAACAACCACAAAAACCAAAAAACCCACACACCAAACCAAACAACCCCCCACAACACACAACACA...

output:

779

result:

ok single line: '779'

Test #60:

score: 28
Accepted
time: 42ms
memory: 19228kb

input:

3456 3456 1728
CAAACAACCCCCAAACAAAACCCAACCACCCCACAAAACACACCCACCAACCAAACACCCCCAAAACAAAACCCCCACCACCAAACACCCCACAAAACAAAAACACACCCAAACCAACCCCCCCAAACCACCACAAAAACCACCCAAACACAAAACCACCACCCCAAACCAAACACACAACAAAAACCACCAAAACCCACCCCCAAAACCCCCCCCCAAACACCACAACCCCAACCCCCAACCCAAAACCACACAAAAACCAAAACCAACACCCACCAAAAAACC...

output:

749

result:

ok single line: '749'

Test #61:

score: 28
Accepted
time: 41ms
memory: 20364kb

input:

4096 4096 2048
AACCACCAACCAACAACCCCCAAAACAAACCCAACAAACACACACACCCACAACCCAACCCCCCAAACAAAACCCCCAAACCAAAAACAAAACCCACCACCCACCAACACCCCCACACAACACACAAAAAAAACAACACAAAACAAAAAAACCAACCCCCAACAAACAACAAACACCCAAACACAAAAAACCCACAACCCCAAAACCACACCCAAACAAAACCCAACACCCCAACCAACCAAAAAACACCCCCCCCAACCAAACAACAAACCCCAAACCCCCCAC...

output:

398

result:

ok single line: '398'

Test #62:

score: 28
Accepted
time: 111ms
memory: 20312kb

input:

4096 4096 2048
ACACACCCCCCCCCCCAACCACAAACAAACCAACCCCACACCAAACCACACACCCCAAACCAACAAACACCAACCAACCACCACCAAACAAACCCACACACACAACACACCCAACCACAACACCCAACAAAACCACCCAACCCCACACACAAAACCCACACCACACAAAAACAACCCCAAACACCAACACCACAACCCCACACAAAACCAACAACCCAACAACCACAACCCCAACCACCCAAAACAACCCCAAAAAACCAACAAACCAAAAACACAACCCACAAC...

output:

2535

result:

ok single line: '2535'

Test #63:

score: 28
Accepted
time: 46ms
memory: 20452kb

input:

4096 4096 2048
AAAAAACCCAACACCAACACACCACAAACCAAAACACCCAAAACAAACAACACCCACACCACCCCACCACACACAAAAAACCCAAACAAAAAAAAACACCAACACACAACACAAAACAACAAAAACAAACCCACACACCACCCACAACCACCACCACCCAACAACACACACAAACCCACACAACACCACCACAAACACACACAAACACCCCACCCCCAAACACAAAACAAACACCCCACCACCACCCAAAAAACACAAAAAACACCCCCCACAACCACCCCCCAC...

output:

276

result:

ok single line: '276'

Test #64:

score: 28
Accepted
time: 97ms
memory: 20180kb

input:

3585 4096 2048
CCACACCACACAAAACACCAAACCCACAACCAAACCCCCCACCCACCCCCCCCCACACAAACCACCAACACAACACCCAACAACCAACAACAAAAACCAAACCAAACAACACAACACCAACCAAACAACAAAAAACAACCACACCCCACCCCAACCCACCCCACCAACCCCCACCAAACAACCACCAACCCCCCAACCCAACCACACCCACCACCCACCACCAAAACACCCACCCCAAACACCACCCAAACAAACAAAAACAAAAAACCCCCAACCCCAAACAAA...

output:

2005

result:

ok single line: '2005'

Test #65:

score: 28
Accepted
time: 116ms
memory: 18692kb

input:

3585 4096 2048
CCACAAAACAACAAACAACAAAACCAAAAAAACACCAAAAAACCACCCACACACCAAAAACAAACACCAAACCCACACCACACCACAACCCCAACAACAACACCAACACACAACCCCCACACCAAACCAACACCCCCACAAAACAACACCACCACCACAAACAAAAAACCACACCCCCCACCACACCCAACCCACCCCACACACCACACAACACAACCCACCAAAACACAAAAAAACAAACACACCCCAACCCAACCACACACACCCCACACAAACACAACCACC...

output:

3003

result:

ok single line: '3003'

Test #66:

score: 28
Accepted
time: 36ms
memory: 18172kb

input:

3073 4096 2048
CCCCACAACCACCCAACACAAACCAACAACCCCACCCCAAAAAAAACACCCACACAAACCACCCAACCCAACCCCCCACACCCCAAAACACCACAACCCAAAAACAAACCCAAACCCAAAACCCCAACACCCCACACACACACACACACCACCCCAACACACCAAACCACCAAAACAAACAACCAACCACCAAAACAACACCCACACACCACACACACACCCCACAACCCAACCACCACCCCCCCAACCACCAACCAAACACACAACAAAACCCCCAAAACCCCC...

output:

475

result:

ok single line: '475'

Test #67:

score: 28
Accepted
time: 94ms
memory: 17500kb

input:

3073 4096 2048
ACCCACACACCCACACCACCCACCAAACCCCCCAAACACACACCACCACAACCCCACAACAACACCAACCCAAAACCAAACAAAACAACAACCCAAAACAAAAAACACACCCACCCAACAACACCACAAAAACCCAAACCACCAACCAACCCACCCCCCACAACCCCCCACACCACCAACCACCCCCCCACCCCACACACACCACCCCAACAACAACCCCCACCACCACAACCCACAACACCACACCAACCCCCCCCCAACCCACAAACACCAACCCCAACAACA...

output:

2438

result:

ok single line: '2438'

Test #68:

score: 28
Accepted
time: 92ms
memory: 18120kb

input:

3457 4100 1728
AACCCACACCCACAAAACACCCAAAAAAAACAACCCCACCCAACACACACAAACCAACCACAAACCCAAACACCCAACACCCAACCCACCCAACACCCCACCCAACCCACCACCCCAACCACCCCACAAAACACACACCCAACACCCAAACACCCCCACAAAAAACCCAAACCAACCCCAACCAAACAAACACCCAACCCACCAACCCAACCCAACAAACAACACCCCAAACCCCCCAAAACCAACAAACACACCAACAAACCAACAAAACCCCCCACCACCAAA...

output:

2249

result:

ok single line: '2249'

Test #69:

score: 28
Accepted
time: 129ms
memory: 20108kb

input:

3994 4096 2048
AACAAAACCACCAACCACAACAACAAACACCACCCACACACACAACCAACCCACCAACAACCACCAACACACAAAACCCAACCAAACACACCAACAAAACCCACCCACCACAACACAAACCAAACCACCACAAACCCCACACAACACCCACACCCCCCCAACAACCAAAACACACCAAACACACCCCCACCAAACAAACAACCCACAAAACCAACCCCCACCCCCACACAAAAACAACCCCCAACACCCCCACACCAAACCCAACCCCCCCACCACCCAAAAACC...

output:

3180

result:

ok single line: '3180'

Test #70:

score: 28
Accepted
time: 134ms
memory: 19944kb

input:

3993 4096 2048
CCACCAAAACAACACCCCAACCAAACAACAAAAAACCCCACCAACCACACAAAAAACCAAAACCCAACACAAACACACAAAAACAACCCCACACACCAACCCAAAACCAAACAACCACCCACCCCAAAAAACCACCCCAACCAAACACACCAAACACACCAACAACCAAAACAAACACCACAACCAACAAACAACCAACCAAAACCCCAACAAACAACCCAACAAACACCCAAAAACAACCCAACAACCACCCACCAACCACACCCCCAACCCCAAAAACCAAAA...

output:

3371

result:

ok single line: '3371'

Test #71:

score: 28
Accepted
time: 46ms
memory: 19924kb

input:

4000 4000 1
CCCAACACAAAAAACAAAAACAAACCACCAAAACACACAACCCACAACCAAACAAACAACCACAAACCCCCCACCACACAACCCCCACACACAACACCCAACACCCCACACAAAACAACAACACAAACCAACAACCCAACCCCCACCCACACAAACACAACAACACAAAAACACCCCCAAAACACAAACAACCAAACCACCACAAACACAACCCAAACAACCCACCACACCAACCCACCCCCCACACACAACCCACCCAAAAACCACCCACAACCACAACCACAACCC...

output:

540

result:

ok single line: '540'

Test #72:

score: 28
Accepted
time: 110ms
memory: 19940kb

input:

4000 4000 10
AACAACAACCCAACCCCCACAAAACCACCAAAACAACACACACAAAAAACCAAACCCCACCACAACCAAACACACACAACCAAAAACAACCAACACCCCCAAACCCCAAAACACCACCCCCACCCACACAAACACCACCACCAAAACACACAACAACCCCAACCCCACAAAAAACACACAAACCACACACACACACCCCAACAAAACCAAAACCACAAACACAAACAACCACCACCCAACCCAAAACCCCCAAACCCCCCAAACAACACACACAACCACAAAACACC...

output:

3090

result:

ok single line: '3090'

Test #73:

score: 28
Accepted
time: 50ms
memory: 20140kb

input:

4000 4000 1000
ACACCCCAAAAAAAACCAACAACCCCCAAAACAACCAAACACCCCCCAAACAAACCACCCAAACACACACAACCACCAACACACCCCAACAAAACACCAAACAACCCAACCCACCACACACCCCCAACACCACAACACCAACACCCACAACAACCAACCAACCACCAACCACCACAACAACCAAAAACCCACAAACCACACAAACAAACAACACCCCACCCCCCCCAAACCCCCCCAACAACCAACACCCCCACACACCACCACCAACAAAAAAACCCAACCAAA...

output:

489

result:

ok single line: '489'

Test #74:

score: 28
Accepted
time: 144ms
memory: 19960kb

input:

4007 4096 2048
CCCCCCCCCCAAAACACCAACCCACAAACCCCCCCCCACACACCACAACAAAAAAAACACACCACCCCCCCCACACAACCACCCCACACCCCCAACAAACCAAAAAACACCAACCCACCCACCAACCCCCCACCCCCAAAAAACACCAAACCAACCCCACCACCCAACAACAACCCACCACCCAACACACCCAAACAACCAACCAACAACCAACCACCCAAACACACAAACCCAACAAAAACCCACAACCCAACACACACCCCCACAAACAAAAACAACCACCAC...

output:

3921

result:

ok single line: '3921'

Test #75:

score: 28
Accepted
time: 99ms
memory: 20100kb

input:

4007 4096 2048
CCACCCCCAAACAAACACAACACACCCAAACAAACAACAACACAAACCCAACCAACCAAACAACCCCCCCACAACACACCCAAAACCACAACAACCCAACACCCCACAACCAAAACACCACCACCACCAAACCCAAACAACCACACACCAACCCCACAACCCAACACAAACACAAAACCACCAAACAACACAAACAAAACCACCCAACACCAAAAAAACACACACCAACACCCCCAAAACACCACACCCCACCAAACAAAAAAACCACACCAAAAACACAAAACA...

output:

1940

result:

ok single line: '1940'

Test #76:

score: 28
Accepted
time: 68ms
memory: 20012kb

input:

3985 4096 2048
CCACAAACAAACCCAACACACAACCCCACACACCCAAAACAACAACCCAACCAAAAAACAACAACACAACCACACCCCCCAACAAAACACAACACCCAAAAAACCCCCACCAACCCACAACAACAAACACCCACAACAAACACCAAAACACAACCCAAACCACAACCAAACCCACCACAACCAAACAACAACACAAAAACAAACCCACACACAAAAACAACCCCCACCCAACCCAACAACACCCCCCAAACCAAACCAACAAACCCCCCCACCACAAACAACACA...

output:

1039

result:

ok single line: '1039'

Test #77:

score: 28
Accepted
time: 56ms
memory: 20180kb

input:

4011 4096 2048
CACCACCCAAACCAACCACCCCACCCACCCAACACAAAAAAAAACAAACCAACCCCCCCACCACACCACCACAAACACCACACCCCACCACCACCAACCCACCACACAACAACACACACCCCCCACCAACACAACACCCACAAACCACCACACCAAACCCAACACAACCCCCCCCCAAACAACCCACACAAACCACAAACCCAAACCAACCCCAACCACAACCAACAAACCAACCACACAACACAACCACCACAAACAAAACACCCACCCCAACAACAACAACAA...

output:

824

result:

ok single line: '824'

Test #78:

score: 28
Accepted
time: 68ms
memory: 19916kb

input:

3986 4096 2048
CACAACCACAACCACAAAAACAAAACAACACCCAAAACACAAACAACCCACACACCAACAAACCCCACCCACAACCACCCCCAAACAAACCCAAACACCACACCCCACCAACAACCAACAACAACACACCCACAACAAACACCCCAAAAAAACACACAAACAACAACCACAACCAAAACAACAAACCCACACACAACAAACACAACCCCAACACAACACACCACCCAACACAAACCCCCAACCCCCACCAACAAACCAAAACCACCACACCCAAAAACACCCAAA...

output:

1031

result:

ok single line: '1031'

Test #79:

score: 28
Accepted
time: 53ms
memory: 19932kb

input:

3969 4096 2048
AAAAACCAAACCAAACAACACCCCCCAAACCCCACAACCAACACAACCACACCCACCCAACCCAAACCACACACAAACACCCCCCACACCACCCCACAACCACCAACACACCCAACACCACACAAAAAACCCCCCCACACACAAACCCCACCCACACAAACACACCCCCAACAACACCACCCCCCACACCCCACCCCCCCCACACCCCACCACCACACCAACACACCACCACCAACACAAAAAAAAACACAACAACACCCACAACCCACCCCAACACCACCCCAA...

output:

644

result:

ok single line: '644'

Test #80:

score: 28
Accepted
time: 53ms
memory: 20168kb

input:

4005 4096 2048
CAAAACAAAACAACAAAAACCCCACCAACAACACCACCAAAACAACACCCCCAACAACCCCCCCACCACACACAACCCCCCCAAACACAAACCACACAAACAAACCAACAAAAACCCACCCCACCAAAACCAAACAAACAAACACACCAAACCACCCACCCACAACACCACAAACACAACACCCACCACACCCAACACCCACACCCACACAAAAACCCCACAAAACACACACCAAACCCCACCCACCAACAACCCCCACCACACAAACACCAAACACACAAACCC...

output:

330

result:

ok single line: '330'

Test #81:

score: 28
Accepted
time: 60ms
memory: 20116kb

input:

4002 4096 2048
AACAACAACACCAACCCCCCCCCAACAACAACCCCCAAACCCAACCACACCCCCCAAAAAAACCCCAAAACCAAACAACCAACACAAAACCACACACCACAACAAACCCACCCACACCCCCCCCCACCCCACAAACAAACAACCCCCCACCCACCAAACAACCCAAAACCAACACACACCACCACCAAACACCAAAACACCCCCCCCACAACACACAAAACCACCCACCCACCCCCCCAAACACACACCAAAACACACAACCCACACACACAACAAAAACAAAAA...

output:

715

result:

ok single line: '715'

Test #82:

score: 28
Accepted
time: 127ms
memory: 19972kb

input:

3990 4096 2048
AACCACAAAAAACAAACCCAACACCCCCACCACACAACCCACACCACAACCCCAAACCACAAACACAACAAACCACCCAACAACAACCACACACACCCACACACAAACACCCACCAACACACAACAAACACCAACAACCCAAACAACACCAACCAACAAACCCCAAAAAAAAACCCCACCAAAAACCACAAACCCACCCCCACCAAAACCACCACCAACAAACACACAACCACCCACAAAACAAAAACCAAAACACACCCCCCCCACCACACACAAACCACACCA...

output:

3170

result:

ok single line: '3170'

Test #83:

score: 28
Accepted
time: 118ms
memory: 20412kb

input:

3994 4096 2048
CACACAACAACCCACCACCCACAAAACAAACACAACAAAACCCCAACCCACCCAAACACACCCAACAAACCCAAAACCACAACCCCAACAACACAAACCCAACACAAACCACCAAAACCACCCCCACACCCAAACACCCACACCAACCACCCCACACACAACCACCAACCACCCCACCCACCCACCCCAAAACAAAAAACCACACCACCCCACCAAACCCAAACCCCCCAAACCCACCACACCCCCACAACCAAACAAACCCAAACACACAAACCACCAACAACA...

output:

2818

result:

ok single line: '2818'

Test #84:

score: 28
Accepted
time: 121ms
memory: 20012kb

input:

4009 4096 2048
ACACACCAAACCACCACCCAAAACACCCCCAACACAACACCACAAACCCCACAAACAACCCCACAAACCCCACCCCCCAACAAACACCAAAACAAACCCAAAAACCACCCAAACACCCACCAAACCCACCCAAACCAAAAAACCCACACCCCCAAAACAACCAACAAAACCAAACACCAACCAACCAAACCACCAACACAAACAACCCAACCACACCAAACCCACCAAACAAAAAACAACCCCCCACCCCACCCACCAAACAACCACACCCCACAAACAACACCA...

output:

2744

result:

ok single line: '2744'

Test #85:

score: 28
Accepted
time: 89ms
memory: 20040kb

input:

4007 4096 2048
ACAAAACCCAAAACAACCACACCACAAACAACAACACCACAAAAAAAAACAACAAAACCACCAAACCACAAAACCCACCAACAACCCACCACACACAACAACAACCCCCCACCCCACCCAACCCACCCACACACAACCCCACAACACAACACACACACCACACCCAACCCCCCCCCCAAACAAAAACAACCCAAACCACCACCAACAACACCCCAACAACCCAAAACCCCAAAAACCCCACAACAAAAAAAACAACACCACAAAACACAACACAAACACCACCCA...

output:

1760

result:

ok single line: '1760'

Test #86:

score: 28
Accepted
time: 49ms
memory: 19936kb

input:

3987 4096 2048
ACAACCCAACCCCAAAAACACACAACAAACCAACACAACAAACAACACCCAAACAAAAACCACAACCCAACCCCCACCAACCCCACACCCCAAAACCACCAAACAACACCACCCACCCAAACCCCAAACACACCCCACAAAACACAAAAAACCCCACACCCCCACCAAACACCAACAACACCACAAACAAAAACCCCACAAAAAACCCCAACCCCAACCAACCAACCCCCCCCCACCCACACACACCACACCACCCCCCAAAACCCCCACACCCACAACCACCAA...

output:

154

result:

ok single line: '154'

Test #87:

score: 28
Accepted
time: 116ms
memory: 19992kb

input:

4002 4096 2048
AACACCACCACAAACCCCACCAAAACACACCCAACAACAAAACCCACCACACCAACCAACACACAAAAAACACACCCCAACCAAAAACCCCCCCACACCCACCCACCACCACCACAAAAACAAACCCCAACAACCACACAACAACCACCCCAACAACCCAAAACCCCCAAAACAAACCACCAAAACAACACCCAACCAACCCAACCACACCAAAACAACCCCAAAACAAACACAAAAACCAAACACCACACAAACCCCACCACCCCCCACACAACACCCAAAAAC...

output:

2751

result:

ok single line: '2751'

Test #88:

score: 28
Accepted
time: 90ms
memory: 19920kb

input:

3985 4096 2048
CCCAACAACCAACACACACCCAAACAACCAACCCACACCCACCCCCACACAACAAACCAAAACACAACACCACAACCAAACAAACACCACAAAAACCACACACCAAAAAAAACCACCCCCACCCCAACACAACCCACCACAACAAACCCCAAACAACCACCCACCCAACCAACACCCCCAACAAAAAACAACCCCCACCCCCCACCACAACCACACAACCCACAACCACCAACCCCACACCAACACACCCACCAACCAAACCACCCCCCAACAAAAACACACAAC...

output:

1667

result:

ok single line: '1667'

Test #89:

score: 28
Accepted
time: 99ms
memory: 20188kb

input:

4017 4096 2048
CCCCACACACCCAAACAACAAACCAAAAACACCAAAAAACCAACCAACCCAACACCACCACAAACCACACCACACAACAACACACCAAACAAAACAACAACAACCAAAAACACACCCAACCCAAAAAAACAACACCCAACACACCAAACCACCCAACAAACCACACCAAAACCCAAAACCAACCAAACCCACACCCCAAAACAACCAAACACCACCACCCACAAAACACCCAAACAACCCCAACAAACCCCAACCCCCAAAACACACCACCACAACCCACCCCAC...

output:

1931

result:

ok single line: '1931'

Test #90:

score: 28
Accepted
time: 117ms
memory: 20028kb

input:

3990 4096 2048
CAAAAAAACCAACCACCCACAAACACCCCCAACCCACCCCCCAACCCACACCCACAAAAACCAACACCACCACCCACACCACACCCCACACCCAACAAAACACCCACCAAAACCACCCCACCCAACCCCACACCAACACACAACAAACAACCCAACAAAAACAAACCCACCAACCCCAAACCAACACACAAAACCAACCCACCACACACCAAAACACAAACCACCCAACCAAAAAAACCCACCACCACACCAACAACAACACAAACACCACCACACCACAAACAA...

output:

2555

result:

ok single line: '2555'

Test #91:

score: 28
Accepted
time: 0ms
memory: 3772kb

input:

10 3 1
CAA
ACA
CAA
ACA
ACA
AAA
CAA
CAA
CAA
AAC

output:

6

result:

ok single line: '6'

Test #92:

score: 28
Accepted
time: 1ms
memory: 4216kb

input:

100 100 1
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACACCAACCACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACAACAACAACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCA...

output:

68

result:

ok single line: '68'

Test #93:

score: 28
Accepted
time: 0ms
memory: 3964kb

input:

10 100 4
AACCCCCAAAAAAAACACCACAACCAACCCAAAACCACACCACCCACCACACAACCCACAAAAAAAAAAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCACCAAAAAAAACACCACAACAAACCAAAAACCACACCACCAACAAAACAACCCACAACAAAAACAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCCCAAAAAAAAACACCACAACAAACCCAAAACCACAACACACACAAAAAAACCCACAACAAAAAAAACCCCCCCACACCCAACCCC...

output:

10

result:

ok single line: '10'

Subtask #4:

score: 26
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #94:

score: 26
Accepted
time: 43ms
memory: 20092kb

input:

3878 4096 3072
CGGTTTGTAGCGGTCCGAGCCGTACGACACGCACATGTGCGACACCGGGCCAGCCATCGCAGCGCCGGGGCATTGGATATTCCTTGGGACCGTATGGTCTGTAGCATCCAATCCCCGGTAGTCTCCGTAGCGACAGTCATCCGATATCGGCACATTCAAGAGCACCGGCTGAACGGGTGAGCGGAGCAACCCACTGAGACGAAACACTGGCCGAGTCAGACTGTTATCAGTTTGGAGCCAGCATTTGACCATAGGTCTAAGCAGTAGAACCTAGAGCACTGTGAG...

output:

89

result:

ok single line: '89'

Test #95:

score: 26
Accepted
time: 118ms
memory: 20324kb

input:

4099 4100 2
TCAACATTCGTTCCCCGGTAACGGTCTTTTCTGCTATTCTTCGCAAGCTTGTTGGAATGAAGAGGGGTCACGATGCATCTGATTGCGAACGGCTGCGGGACCAATAAGCTCGGTGAAATTCACGGGGCAAATTAAAGTAACCGTATTATTTCCCATTCGAGCACCTCCTAACGCGGAGGAGGTAACCTTTAACACCGATCGGACGAGTATTTTCTTTGTACTAGATAATACAACAGGTCGATGATTAAGTAATTGGGTAGGATGCCGATAATCCATCCATCAAGTTGA...

output:

2282

result:

ok single line: '2282'

Test #96:

score: 26
Accepted
time: 183ms
memory: 20088kb

input:

4027 4096 3072
ATCATAAAATAGAAGTGTCATGGCCCGCTCCAATTCATACCACCAATTGAATTTCTAATGTTTCGGAGAATTCACAATTGTTAATTTCTGGTGCTAACGGCACGAGTTCCCCGGATTTTCGCAGTAGACACCTAGTGTTCAGTTAATGTATTTTGGCATGTGACCGAGGATCGCTAGCACAAGTCTACCCTACGTTACTGCTATGACGGTGTGGCGCTAAACGGTAGGTCTAATTCGACGATATTATCAACGAACAGACTACTCGCACCGTCTCGCGATAATCAT...

output:

4020

result:

ok single line: '4020'

Test #97:

score: 26
Accepted
time: 95ms
memory: 14312kb

input:

2188 4100 1458
CGTAAGTATGTCATCCACCCAAATCAGAACAGTCGCGGATGTACTGTCACTAGAGCAAACGGAGAGACAGGCTTAGGGATTACCATTATCTGCTAGGGATATGGCGGACAGCTCCGACGATAGGTATAAGCCCCTTAGGATTGGTAACTTGGGGGGCTCATATGGTCACTCTCCCCTGACCGGATGCGCGATGGTACGTGCGCTTAATATAGCTGTTACTGAACCACTTGCACTCCCCAAACACCTGCATACATCAACCCTTTTTTTCACGAGCAGGAACCTCCT...

output:

2133

result:

ok single line: '2133'

Test #98:

score: 26
Accepted
time: 48ms
memory: 19240kb

input:

3455 1728 864
CGCGGCCAGGAGAACGAGAGAAAAAAGACGCGGCGAAGAAGCAGCGCACCGGAAGCGAGGCAGCCAGACCCCGCGGAGCACCCGGAGGGAAGCCAGCCAGAAAACCCACCGGCCAAGGCCAGGCCGCAAGGAAACACCGACAACAAAGGGCAGGGAGGCGGCGGCGGGGGCACCAAACACGCGAAGAGCCGGCGCACAAGCACCCGCAGCAGAGCCCGCAAGAAAAGGGCACAAAGGAACAAACGCGACCGCAGCGCGCAAGGGGCCCACCCAAGACCAGGAGAGG...

output:

2057

result:

ok single line: '2057'

Test #99:

score: 26
Accepted
time: 125ms
memory: 20368kb

input:

4095 4100 1024
CAACACAAAACAAAAACACACACAAAACCCCAACCCACAACCCCCAACACCACAACACCCCAACCAACACACACCAACAACCCAACAACAACCCAACACAAAACCCCCCACCCAAACAACCCAAAACCACCAACACAACCACCCCCCACAAACAACACACACCAAAACACACCCAACCACAAACAACAAAAAACCCCACAACACCAAACCCCACAAAAAACCAAACCCACACACAAACCAAACACAAAAACAAAAACCCAACCCACCCAAACCCCACAACCAACA...

output:

2971

result:

ok single line: '2971'

Test #100:

score: 26
Accepted
time: 62ms
memory: 14140kb

input:

2047 4100 1536
GTGAATCATCGGGCCCGTCATGCAGCATTAGGGATTGTCCTCACAATACGGCCGTAGCGACTTACCGGAGCACCACTCCACGGTTGTCTAGCCCTTCAGGATTCCACATAGACTTTAGCACCTCTTTATCCAACCTCGGCACATACCAAATACATCTACAAAGGAGGCCTTTTGCTGACGCCTGCGGCCAGTTGAGATTGCGTGAGCTCTTCATGTGTCGTCGCTAAGGGCCTACCCGTAGTTATTCTCCGTGTTCCACTGAGGAGTTTGTGGCGGACTTCCTAT...

output:

1270

result:

ok single line: '1270'

Test #101:

score: 26
Accepted
time: 40ms
memory: 12448kb

input:

2047 4100 770
AGCCAGCCGCATCACGCAATACTACTTCCGCACAGGACTGCGTCCGCACAGTTGTACTATGATTGGCATCGCGCGAAACAAATGAAGACACTAGCTGCAAACTCCTCTCTAACATCCATCTCTCTTAGCAGAGTAATGAGTTGTAGAACGGTTATGATGACGTAAGTTTCCGCCCGAGGAATCGGCCGTCCGCTGGTCAAGACGTGCCCTTTGGTAGTTACGTAAGTCAGTCCTATATTATTCCCCGGTACCCAAGTCTGAAAGCTATGGCCAAATAGTCACAGAG...

output:

738

result:

ok single line: '738'

Test #102:

score: 26
Accepted
time: 48ms
memory: 19856kb

input:

3456 3456 1728
GGTCACCCTCCATGCAAGACTCAAAGAGGGTGGGCGTCACTTGCCAGGTGCATCGGATGCTTGATGAACCTGGGAGTGTTCTCAAGCAGCTAGTGAAGGCGCAAGACTTGGATGTTGTCCGTGCATGGTACATCGTGATTAAGTAAATCTAGCCCGTCCATATAGGCACTACAGCCAGCGACAGTACAGCGCTGAGTTATGCCTCCAACCACTATAGAGACCAAATTTTGTACGGCCTGACGGTTATTTATTGCAGAATTCATCATATGAGGTTGGAGCTAATTT...

output:

503

result:

ok single line: '503'

Test #103:

score: 26
Accepted
time: 74ms
memory: 20520kb

input:

4096 4096 2048
CAACACACAACACCCCACAAACCACAACCCACCACCAAAACCCACACCCCCCAAAAACCACACAACAAACCACAACCACCCCCCACCACACAAAACCCAACAAACCCAACCCCAACAACACCAAAACACCAACAACAAACACCAAACACCACAACAAAAAACAACCACACCAAACAAACCAAAAAACCCCCCAAAACCCAAAAAACAAACACACACCCCCCACCACCACAACCCAAACACCACCCCACACCAACAAACACCACCACACCCCCCACACCCACCCCC...

output:

1385

result:

ok single line: '1385'

Test #104:

score: 26
Accepted
time: 152ms
memory: 20520kb

input:

4096 4096 3072
AGACTAGAAATCGAGTTATATCTGGCGTATAACGCAGTGGTTATCTGTGAACCCTCTCTACTCTTTTCTTATTTAGGGGCAACTGAAGGTACATCGCCGCGCACGCATTCCCTAGTGAAAAGATCCTTTTAACAGTGTAGGCACGTCCGTGACCACGTCAGGTTTGTTAGCTCGCTGCACATGCAGGGGCTCGATGAACGTTAATACGCCCCCCCAGCTCTCGCCCTTAGGAGGAACCGATCCAAGTGGTTTCAATGCCTTGTTTAAGTCGGTTGCCTTTTGGCT...

output:

2891

result:

ok single line: '2891'

Test #105:

score: 26
Accepted
time: 184ms
memory: 20308kb

input:

4096 4096 3072
GATGAAGAATACTAGGATTTGACCACGCTCGCAGGGATATGGGTGCCAACCGCTACGACGCGGCATTACTAACGCTCACTCTAGTGACGATCGCTATGTGGGGTGGGTGAAAGGAGGTAAAGGCTTGTGACGCGTTAATGCACCCGACCCGAGAGGTGCCGACTTGTGACGCGTAGCCCGTCCGATCACCTAGGAGGATCAGAGCGCTCCACGCCCAATTAGTGGGGGCTGATACGCTGCATCACCGCAGTGCCCGGCTCGTTGCTCCCGCTGTCCCACTACGTC...

output:

3949

result:

ok single line: '3949'

Test #106:

score: 26
Accepted
time: 142ms
memory: 20372kb

input:

3890 4096 3072
TGTTTGCCAAATACTTAACCTGTTGGCTTATATGGTCAAGTCCGTATGATTAATTTGTGCCATGCGTCCTGGGTTTCTCCTAGAATAGGCGTACTAAGTAGAGCCAAACATTGTCGCGGACTGCCTAAAGTCATCGACAGAATCCAGCTAGTACGTCACGCACGCCCCAACAAGCGCCACTTCAACTGCGGCTATCTTCTGACTGATACAGAAGTGAGCCATTAGACACGAAAATTCACCTGACCATAGTCGAATCCGCGTCGACTCAGGCCCTCAGGGCCGGCT...

output:

3145

result:

ok single line: '3145'

Test #107:

score: 26
Accepted
time: 54ms
memory: 20260kb

input:

3585 4096 2048
CCAAACCAAACCCAACAACAACACCAACACCCCACCCCAACCCCCAACACCACAAACCCCCAACCCCCAAAACACACCCACCCCCAAAAAACCCAAAAACACAAAAAAAAACCCCACAACCAACCACCAACCACCCCCACCACACCACCCCCACAACCCACACACCCAACCCCCCAACACACCAAAAAAAAACCCCAAAAAAAAACACCAAACCCAACAAAACAAAACACACAAAAACCCAACACCCCCAAACCCACACACACCCCCAACCACAACCCAAAAACC...

output:

772

result:

ok single line: '772'

Test #108:

score: 26
Accepted
time: 84ms
memory: 17856kb

input:

3073 4096 2048
ACAAAAAAAACACACCCACCAAACACCACCACACACACCAACACACCCAAAACCAAACCCAACAACAACACACACAACCAAAAACAAACACAACACCCACAACCAACACACCCACACCAAAACAACAAAAACCACACAAAAACAAACCACCCCCAACCCCACCAAAAAAACCCCAACCAAAAAACAAACAACACCACCCAAACCACACCAAACCACAAAAAACACACCCCAACCCCCACCAACAAAACACCAACCACCCCAAACACCCCCAAAACACAACACCCA...

output:

1922

result:

ok single line: '1922'

Test #109:

score: 26
Accepted
time: 101ms
memory: 19484kb

input:

3532 4096 3072
TTATGTGCGGATCCAGCTCATTAATCTTGGATGCCAGTGCGCAGCCATGGAATCGCGTACTTGGCAGTGTACTTCAAGCGAAGTAGTGTTCTGAACATTTTTGTGCCAGTTGTCGTGGCGCAAGGAACAAATTCAGTTCTCCTATGCGGAGAACCGAAAGACCCGGCAACTCCCTCGTGTGCGAGTTCGGTCGAGGCATCGTTTACGCTACTAGACCGATCGCCGTCACCACGTGCGACCCTCGGATGTGACGGTGTAGAGCGCGCCGGAGGCCGACGGTACAGT...

output:

1866

result:

ok single line: '1866'

Test #110:

score: 26
Accepted
time: 134ms
memory: 17936kb

input:

3457 4000 1728
ACACCCGTTGATAAAGGATGGCAAGCGGCACTACGTTCGTAGACCCCAGGGAAAATCGATTGACGACTCCATAGCTACTGGATAGGTATAGTTACGACGTGTTGGGGTTATTTCGAAGCACCGTACTTTAAAATATGGGACGTTCGAACGGTTTATGCCAGTAGTGTCCGCCACAACAGTGTATAGATGTGTGCCCGCTGACAACCTGTTAGATACCGGCGTGCTCGAGCCTACCTTTCCTGGTGGAGAACGTCAATGTTCTACTCTCAATAAACGAAGTCGTAA...

output:

2977

result:

ok single line: '2977'

Test #111:

score: 26
Accepted
time: 57ms
memory: 20460kb

input:

4097 4096 2048
CGCCAAGAGCACGGGCCACGCAAACCCAGAAAACGACAGGCAGAACGCCACGCCAAGAAAACCAACGAAACGGGGGCAGAGACCGCAGCAAGAACCCAGCCCACAACCGACACGGACGCAGAGACAGGGCGCGGCGGGCGCAGAGCCCGGCCACAGGACCACCAGGGCGCCGAACCACGGCCCCGGCGACCAACCAAAGCGGCCGGGACGGACCGCCCACCCAAGCCGAACAACAAGAGAACAGAACAACGCGCAACCGACGGAGGAAAACAGGGACACGACGCA...

output:

660

result:

ok single line: '660'

Test #112:

score: 26
Accepted
time: 122ms
memory: 20192kb

input:

4044 4096 3072
TCTAGCGACAGTATTAGGCATCATGGGCTAGGAATTACAGTACTGTAAACGAGGGTAGCATAGAGGAATCTACCTACACTGGGCTTCTTCTTAGGCAACCCCTTGTAAGGGAGCGGAAATATGTGGCCCGAGTGCATGGGTGAGACACAATGTCTAAAGTACTCTCATTAATGCCGCCCCTTAAGGGAACCGTGAGTTCCTGGTTAAGCCGGCTAATCATTGATAACACGTCGATCACAAGGGCAATGTCGGGGTGTGGGGCCAGGAAGCTAAACCGCGCCAGGG...

output:

2358

result:

ok single line: '2358'

Test #113:

score: 26
Accepted
time: 154ms
memory: 20104kb

input:

4000 4000 1
GTTCCGGGGATGTGCGCGCCTCGATCTAAACGAATGGCACGATCGCTTACATGGACATGAATGCAGTGTAAGAATGCTGGATGTCGCGGTTTTGCTACGACGGCGGAACGTGGCGTATGGTCGTTTTACCCGATATGCTTATGGAACAAATACGTCGGGTTTCATGTCTTCTGTCGATTATTACCATTGCGGAAGAGCCGAGCGGGCGCCTCATGGAGCGTACACTAACGGGCTCTGTCAAACCAATAGCTGCAGTATTGGGCTCGGAGAAGCGTCGTGCAGTCTGCT...

output:

3308

result:

ok single line: '3308'

Test #114:

score: 26
Accepted
time: 44ms
memory: 20112kb

input:

4000 4000 10
AAAACACACACAACCCCCACCAAACACCCAAACAACACCAACAACAAACCACAACCCCCAACACCCAAAAACACCCAACCCCACAACCAACAAAACCAAACCACACAAAAACACCAAACACCACAACACCACACACACACCACAAAAACAAACCAACCACCCACAACCACACACACAACCAACACCACCAAACAACCCCCCCCACCCCACAACACCACACACCCCACCCACCACCCACACACAACCCCCACCCACCAAAACAAACACACACACCCACCAACCCCAAA...

output:

363

result:

ok single line: '363'

Test #115:

score: 26
Accepted
time: 145ms
memory: 20400kb

input:

4000 4000 1000
TTCGGTCCCCAATTACGTACTGCCATACAAGATATCTTGAGAATGCGAACATACCTACCACATAGGTATCTAAAGCTGTATTTTCATATGGCTAGTGATGCAGGGATGCTCATCAAGCGGCCTATAGGAGCGCGCATCTGACGTTTTGCGTCTTAGAGGGCGTATCAATGGTTTCTGCCATCCTGCGCAAGCGGCCGCCAATATGCGATACTCGTTAGCGGTTACGCCAGTGCTAACTGAAGACCTCTGGGGGGATCGAGCATGTTTATAGTCCAACTATCAACG...

output:

2947

result:

ok single line: '2947'

Test #116:

score: 26
Accepted
time: 148ms
memory: 20140kb

input:

4040 4096 3072
AACGAGCGGCGAGAGTTCTACCTCACGACCGTCTCTTGGCATTTCTCCATCATATCACCAAACAGCGAGTACGGCCACAAAAGAAACTCACATACACAGTAGCGTGCATGCTACTTTCACGATTTATACTACTGTCTAAGGAAAACCTCTAGCGTCCTCTGGTTACAAGTTTGGTGCTAGACCGTTGAAATATCCAGGGGGCTTGTACAACAGTAGGACCAGGTAGCGGTACGCACATGCCCGAAGATTCGGCCCATTATATTCCGTGTTAGTCCGCACCTGGGA...

output:

3038

result:

ok single line: '3038'

Test #117:

score: 26
Accepted
time: 135ms
memory: 20480kb

input:

4051 4096 3072
GGTGGAGCAACGCCGTGTTATATGCTCGGGAAAATATATAAAGAACCTCGTCGCTAATACGTGCTTTCTTGAGAAAGTGTGCCCGCAGAACAGTTGGATGCTGGACGTCATTAGTCCTATGTCTGGCAGGTAACCAACCATTCATGTCGTAAAGCAATTCGAGCGGAGATTCGCCCCACAAATGCTCGCAACTCTTCGGAATGCCAATCTCGAACATTTAGATGCTTTGGAGGAAGTGTTGCTCTCACGCTCGTGGATCCACGTCGCTGGGAGTGTCGGATGCAG...

output:

2672

result:

ok single line: '2672'

Test #118:

score: 26
Accepted
time: 128ms
memory: 20216kb

input:

4046 4096 3072
CGGGTCGTCGGTTCCACGCTTCCTGCCTAACCAGCAGGCGATCCACATTACAGGGCTAACATTATTTAACATAAACTCTTCGAGCACCCCGCTCGCGCACCCCTGGGCTTGGGGAAGGAGTATAACTCGTGTGATTATGGGTACTGTCGTACGATGAGAGAAAGGCATCGGCTAGCCTTGGAGCGTTGTATCATAGGGATGAAAACTTGTTTGCGACGGTCTTGAGGCACATCATGAGAATAGAATGCTTATTCTTACCCTATACCCATACCCCCTCGCAAGTAA...

output:

2366

result:

ok single line: '2366'

Test #119:

score: 26
Accepted
time: 96ms
memory: 20244kb

input:

4032 4096 3072
TTTATCTCCTTACTGGTACTGTTTCCGTTTACCTTTTGTGTGGAGTGGGAGCTACGTCTGTACGTTCCGTTGAAATCTGGGGCAACAGTGAGCTGGAGTTGTACCGCGCCTTAGATCAGTAGCTGCCGGGAAGGATACGTGCAAAGGTCATCACCCTCCCTGCATCTAACCCTGCACATGCTACCCGCTGGGAACCTTAGTGTCGTCCAGAGAGGACAAAATAATCCTGCCTCCTTCCCACGATGACTTGCAATCGGTTCGTTCTTCGGAAGGAGCATACCGATC...

output:

1603

result:

ok single line: '1603'

Test #120:

score: 26
Accepted
time: 141ms
memory: 20180kb

input:

4047 4096 3072
TTATTAGCGGTCGCTACTGATGTACATCGAAGATTCCGTATATGTCCCGGTATTTCTAACTGCCAGCGAAGCGATCGGGCAATGCCGGAATTGACGAAATGGTGGACGATAGGCGAGGTTTACACCAGGCCCACAAATCACTGGGCTCTGATCTTGCGCGCAGACCTCAGACCGATAGCAAGTACTACTAGTGCTCTCATTCTGTTTAGTCTTTGCAACATTGGCGGAAACTAATTATGTGTAGGTATTGGTGACAGCGAGAGAAGACCGGGGCGTATTCATATA...

output:

2854

result:

ok single line: '2854'

Test #121:

score: 26
Accepted
time: 85ms
memory: 20032kb

input:

3585 4096 2048
AAAACCACCCAAAACCCACACACCACAACAAACACCACCAACAAACCAACCAAAACAAAAAAACAAAACCCCACAAACACCAAAAACCCCAACCACACCAACACCCCCCCACAAACAAAACACAACCACCCACACCACAAACCCCCCCACAACACCACCCCCCCCCCCCCAACAACACACCCCACCCACACCCAACCCACAAACCCCCACCCCCCCAAAACAACAACCACCACCCCCCACCAAAAAAACACCAAACAAACCAACCAACCAACAAAAAAACACCAC...

output:

1755

result:

ok single line: '1755'

Test #122:

score: 26
Accepted
time: 75ms
memory: 20512kb

input:

4099 4100 2
CAACAACCCAAACACAACCCACCAACCACACAAACACCAACAAACAAAAAACCCACACACAAACCACCACACACACAACAAAACCAAAAACCACAACCAACAACCACACAACAAAACCCCCACCACACCACCAACCCCACCACCCAAAAACCAACCCCAAACACACACCCCCCCACACCCACAAACAACAACCCACACACACAAACAAAACCACCCAACCCCAAACCACAACACCACAACCAACAACCAACAACAAACCCACACCAACCCACCCCACACAACCACACC...

output:

1356

result:

ok single line: '1356'

Test #123:

score: 26
Accepted
time: 148ms
memory: 20120kb

input:

4001 4096 2048
CCCACCAAAACACCACACAACAAACACACCAAAAACAACCCCACCCAAAAAACAAAACCCCACACACCAAACCCACAAACAACCCCACAACCAAAAACAACCCAAAACCACACAACCAACCCCAACCACCAAACAACAAAAAACCACAAAACCCCCCCCACACACAACCACCACACAACAACACCAACCCCCACAAAAACCCCCCCCAAAACACCAAAAAACCCCACCAACCCCCAACACCAACCAAACCCACCCCACACCCCCCCAAACACCCCCACACCCACC...

output:

3856

result:

ok single line: '3856'

Test #124:

score: 26
Accepted
time: 0ms
memory: 3768kb

input:

10 3 1
CAA
ACA
CAA
ACA
ACA
AAA
CAA
CAA
CAA
AAC

output:

6

result:

ok single line: '6'

Test #125:

score: 26
Accepted
time: 1ms
memory: 4132kb

input:

100 100 1
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACACCAACCACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACAACAACAACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCA...

output:

68

result:

ok single line: '68'

Test #126:

score: 26
Accepted
time: 0ms
memory: 3916kb

input:

10 100 4
AACCCCCAAAAAAAACACCACAACCAACCCAAAACCACACCACCCACCACACAACCCACAAAAAAAAAAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCACCAAAAAAAACACCACAACAAACCAAAAACCACACCACCAACAAAACAACCCACAACAAAAACAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCCCAAAAAAAAACACCACAACAAACCCAAAACCACAACACACACAAAAAAACCCACAACAAAAAAAACCCCCCCACACCCAACCCC...

output:

10

result:

ok single line: '10'