QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#323432#43. Geneticsjames1BadCreeper27 48ms24552kbC++141022b2024-02-09 19:54:212024-02-09 19:54:23

Judging History

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

  • [2024-02-09 19:54:23]
  • 评测
  • 测评结果:27
  • 用时:48ms
  • 内存:24552kb
  • [2024-02-09 19:54:21]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std; 
const char ch[] = "ATGC";
const int N = 4105, T = 30; 

int n, m, k, sz[T + 5], cnt[T + 5][N + 5][4], b[N + 5];
int str[N + 5][N + 5];
char s[N + 5];
bool ok[N + 5]; 
mt19937 Rand(time(0)); 

int main(void) {
    ios::sync_with_stdio(0); 
    cin >> n >> m >> k; 
    for (int i = 1; i <= n; ++i) {
        cin >> s; ++sz[b[i] = rand() % T]; 
        for (int j = 0; j < m; ++j)
            for (int o = 0; o < 4; ++o)
                if (ch[o] == s[j]) {
                    ++cnt[b[i]][j][o];
                    str[i][j] = o;
                    break;
                }
    }
    for (int i = 1; i <= n; ++i) {
        bool flag = true;
        for (int o = 0; o < T; ++o) {
            int t = (m - k) * sz[o];
            if (b[i] == o) t += k; 
            for (int j = 0; j < m; ++j) t -= cnt[o][j][str[i][j]]; 
            if (t) { flag = 0; break; }
        }
        if (flag) return cout << i << "\n", 0; 
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 27
Accepted

Test #1:

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

input:

85 96 48
AACAAACCACACCAACCCACACCACCCAAAACCACCCAACCCAACCAAACCCACACAAAACCAAACACACCCACAAAACCAACAAACCAAAACAAC
AAAACACAAACCCAAAAAACCCCAACCACCCCACAAACACAACAACAACCACACCCACCCACCCACCCCACAACCACACAACCCACAACCAAAACC
AAACCAAAACCCAACCCAAACAAAAACAACACAACACACCACCAACCCAACACACCCCCACAAACCCACACCCCAAAAACAACCAAAACACCACAC
...

output:

10

result:

ok single line: '10'

Test #2:

score: 0
Accepted
time: 1ms
memory: 4368kb

input:

99 100 2
TCGCTAGGAGCCCCGAGGTACATGAATTCAGCCATACAGGGCTATGACCACTAAGTCGCTCCTGGCAGTTTCCAGCACTGTTCGGGCCCCGCATACACTA
TCGCTAGGAGCCCCGAGGTACATGAATTCAGCCATACAGGGCTATGACCACTAAGTCGGTCCTGGCAGTTACCAGCACTGTTCGGGCCCCGCATACACTA
TCGCTAGGAGCCCCGAGGTACATGAATTCAGCCATACAGGGCTATGACCACTAAGTCGCTCCAGGCAGTTACCAGCACTGTTCGGGCCC...

output:

2

result:

ok single line: '2'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3764kb

input:

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

output:

6

result:

ok single line: '6'

Test #4:

score: 0
Accepted
time: 1ms
memory: 4248kb

input:

73 81 54
GACGACGCCACACGCGAACGAAGGGCCGCAAGCCGACACAACGGGCCAACCCAGGACACAGCCGGCAGCGCGGAGGCGGCG
AAGCACCCCCGGCGGACGCCACCACGACAACGAGCCAAACGGGCAGCGACAGGAACCCAGGAGAGGAGCCCGAACCCCACC
AAACGCAAGACAAGACGGACGAGGGCAGCAGAGCAGGAGCCGGAACAGCGAAGAAAGCCCCACAGAACAAGGACGCGGCGG
GACGGAAGGCAGAGCGGCCGACAACCGCCCGCACCCCGCGCCACC...

output:

69

result:

ok single line: '69'

Test #5:

score: 0
Accepted
time: 1ms
memory: 4352kb

input:

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

output:

81

result:

ok single line: '81'

Test #6:

score: 0
Accepted
time: 1ms
memory: 4236kb

input:

95 100 24
ACAACCCCCAACCCAAACAAAACCCAACACCCCAAACCACACCCCACACAAAAAACCACAAAAAACCCACCAACAACCCAACAACCCCCCCACCCAAAAA
CCACCCACACCCCCAAACCAACCCCACAAACCCAACCCACACAACAAAACAAAAACCACAAAAAACCCACCAACCACCACACCAACCCCACACACAAAAA
CCCACCACCAACCAAAACCAACCCCAACAACCCCACCCACACAACACACCAAAAACCACAAAAAAACCCCCAACACCCCAAACAAACA...

output:

90

result:

ok single line: '90'

Test #7:

score: 0
Accepted
time: 1ms
memory: 4036kb

input:

47 100 14
GCCAGGCAAGCGAAAGAGCGGAGGCCACACGAGGGCAGGAACAGAGAGCACAGAAGAAAGCCAAGCGACAGCAACAAAGGCGAGCGAAACGAAAGACCCC
GCCAGGGAGGCGAAACAGAGGAAGCAACACGAGGGCAGGGACAAAGAGCCCAGAAGAAAGCCAAACCACAGCACCAAAGGCGGGCGAAACGAAAGACCCG
GCCAGGCAAACCAAACAGAAGAGGCAACACGAGGGCAGGGACAGAGAGCACAGCAGAAGGGCAAACGACAGCACCAAAGGCGGGCGAA...

output:

41

result:

ok single line: '41'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

4 4 2
CAAC
AAAA
CCCC
CCCC

output:

1

result:

ok single line: '1'

Test #9:

score: 0
Accepted
time: 0ms
memory: 4036kb

input:

64 64 48
CAAAGACAGCATGAGTGCGAACGTAGATGCAGGCTGCGATGGCGTGATCGCACCGATGTTACAA
AAGCGTACTGGTTGTGGGCATGCGATCTACGTCCCATTGCAGTGGGGAAAGAGCCTAGTCTAGT
CCCCCATAGGCGCGTCCCAGGCGTTCGCGACCATTCCTCCCGCGGTTCTCAAACCCACCCCGGT
ATTCGGTGCGGCGTCTTCTGTACTTCCTGACTAGCTGAAGAGATTGATGCGTCTGGGAGCCTAG
CATCCGGCCGCCTAATTATCGGGCGGGCCGA...

output:

57

result:

ok single line: '57'

Test #10:

score: 0
Accepted
time: 1ms
memory: 4296kb

input:

96 96 48
GGTCGTCTTTTGGACCGTGCGATCGACTCCGATATTTGATGTTCCTTAAGAAGTACGAAAAGTGTAGTCCTGCCAATACAGACTCAGAGCATTATT
GGTATTCTTGGTGAACTTGAGATCTCATCATAGAGGGGAGGTGCATGCCTCCGTCAGCCAATTGTAGGCCTTACACTCCCTACGACGATACGGCGT
TGTAGGATTGGGGCAATGGCTCGAGCAGACGCTATGGGATGGGCAGTACTAATTACTCCACTTGTCTTCCGGACACTCAAGCCGCCGAGAATGAGG
...

output:

36

result:

ok single line: '36'

Test #11:

score: 0
Accepted
time: 1ms
memory: 4184kb

input:

83 96 48
CAAACCAAACACCCAACCACAAACAACCCAACCACCCCCCCACCAACAACAAACACCAAAAACAAAAAAACCACAACCCCCACAACACACACCAAC
CCCACCCCCACCCCACCAACCACCAACAACCCCCACCAAAAACAACACACAAAAAAACACCACAAAACCACAACCCCCACCCACAAAAAAAAACCA
CACAAAACAACAACCAACCCCCCCCCAACCCCAACACAACACCAACCAAACCCCACAACAAACCAAAAACCCCACACCACACCAACAAAAAACCCA
...

output:

61

result:

ok single line: '61'

Test #12:

score: 0
Accepted
time: 1ms
memory: 4352kb

input:

97 96 48
CGTCGTCAGAAATTAGCGCTGATGAATGACTGTGGCTGACGGCTTTTTAGTAGATCGTTGGCCGAACGGACCATAGATTTGTTCCGAGCCTCTAGT
CTGAGGAATAACGTATCGATTCTGACGTAATTTGGATGAAGTAGTTTTCTGCGAGATTTGGCAGCACGTCACCGAGAGTGGGGCCGCTAATAGCTT
CGGAGTAAGACATTAGCGATTCGTCCTTCCGGTTGCGGCCTTATTGTGATGAGAGCGGTTTCAGAACGTCAACTCGCGGGTGTAAGAGCAGCGCGG
...

output:

96

result:

ok single line: '96'

Test #13:

score: 0
Accepted
time: 1ms
memory: 4368kb

input:

100 100 1
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACACCAACCACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCACAACAACAACAA
CCCCCAAAAACACAACACAACACCAACACAACAACCACCCACCCACCACCCAACAACCCCACAACCCACCCCCCCCCAAAACCCACCA...

output:

68

result:

ok single line: '68'

Test #14:

score: 0
Accepted
time: 1ms
memory: 4280kb

input:

100 100 2
GGCAAGCCAGAAACGCAACAGCCCACCGAACAGCCGCGAGGAGAGAGACCACCCACAGAAGACGCACCACACACGAGGCGGGCAGCCAAGCCCAGAGAGG
GGCAAGCCAGAAACGCAACAGCCCACCGAACAGCCACGAGGAGAGAGACCACCCACAAAAGACGCACAACACACGAGGCGGGCAGCCAAGCCCAGAGAGA
GACAAGCCAGAAACGCAACAACCCACCGAACAGCCACGAGGAGAGAGACCACCCACAGAAGACGCACCACACACGAGGCGGGCAGCCA...

output:

47

result:

ok single line: '47'

Test #15:

score: 0
Accepted
time: 0ms
memory: 4284kb

input:

100 100 60
ACCCAAAGACGAGCTATCCAACAAAGTTTTCCGGCGCAATTGGCGCCGTCTTCCCTCACCGCTAGGGAGCAACGGTCCTGGAGCTCGCCGCGATTAGCAA
GTGACCCACGCATCGGTACGGAATCAAATAGGCGTTCTGCTGCGCAATGACGTGCGGTGCCCTCACTCACCTCTGATTAGACATCCAGGGTGGATTACTG
TTACAATGCACGCTCGTACTGGGTTAACTGAAGCCGTCCAGTTGCACTGCACTCCCGAAAGGTACCTGGCGAGAGTACTAGCGTTCC...

output:

86

result:

ok single line: '86'

Test #16:

score: 0
Accepted
time: 0ms
memory: 4292kb

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: 0
Accepted
time: 0ms
memory: 3740kb

input:

10 100 4
AACCCCCAAAAAAAACACCACAACCAACCCAAAACCACACCACCCACCACACAACCCACAAAAAAAAAAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCACCAAAAAAAACACCACAACAAACCAAAAACCACACCACCAACAAAACAACCCACAACAAAAACAACCCCCCCACACCCAACCCCCCCAACCCCAC
AACCCCAAAAAAAAACACCACAACAAACCCAAAACCACAACACACACAAAAAAACCCACAACAAAAAAAACCCCCCCACACCCAACCCC...

output:

10

result:

ok single line: '10'

Subtask #2:

score: 0
Wrong Answer

Test #18:

score: 19
Accepted
time: 48ms
memory: 21056kb

input:

1513 1728 864
AAACCCCCCACAACAACACAACCAACAACAAACCCAAACCCACCACACAAACACAAACAAAAACCCACACACCACAAACCACACCCCCCCCAAACCACCCAACACACAACCAAACACCCACCAACAAACCAACACCAACAAACAAACCACAAAACCACACAACAACAAAAACACAAAAAACAACCACAAACCACCAACACACCACCAACAAAAACCACCACCCCAAAAAACACACACCCCACACCCCCACCCCACAACCCAACAACCAAACCCCAAACAACACAAA...

output:

1448

result:

ok single line: '1448'

Test #19:

score: 0
Accepted
time: 23ms
memory: 24540kb

input:

1799 1800 2
AACACCCACCCCACCCACAAACAAAAAAAAAACCACACCCACACCACCACACCACACAACCACCACCACCAAACCACCCCCCAAACACAACCAACCCCACAACCACCCAAACCAACACCAACCACACCCCAACACCAACACCAAACACAACAAAAAACACACCAACCCACAACCACAAACCCCCACACCACCAAAACACACCAACCAACACCACCAAACCACCCACACACACCACCCAACCACAACCACAAAACACAAACAACCCCCCACCAAACCCCCCCCCCCCCC...

output:

1245

result:

ok single line: '1245'

Test #20:

score: 0
Accepted
time: 36ms
memory: 23736kb

input:

1718 1800 864
ACCCAACCACAACCCAACACACAACACACAAAAAAAAAAAAACAACAACCCACCACACACCACCCACACCACAACCCAACACCACCAACCCCCCACCCCAAAAAACAAACACACCACACCACAACCAAACCCCAACCACCAACAAACCACAAAACCAACCAAAACCCCACAAACCAAACCACACAAACAAAACCACAAACACCCCAACACCCAACCCACCCACACCCACAAAACCCCAAACCACCCCCAAACCAAAAAAACCAACCCCACAACAACCCACCAACCC...

output:

1709

result:

ok single line: '1709'

Test #21:

score: 0
Accepted
time: 4ms
memory: 11304kb

input:

1151 576 288
AACAAAACCAACCAACCACCAAAAAACAAAACAAAACCCCAAAAAACAAAACACCAACCCAACAACAAACCCCAAAAAACCAAACCCAACACCACCCAACCCCCACACAACACCCCCCACAAACAACAACCCCCCCCACACCCCACAACCCCCACAACCACAACAACACCCAACAAAACAACAACAAAAAAACACCCCCACCCCAAACCAAACAAACACCCCCCCACCCCACAAAAAAAACACAACAAACAACCCCAAAACACCACAAAAACAAAACACACACCAAC...

output:

1007

result:

ok single line: '1007'

Test #22:

score: 0
Accepted
time: 16ms
memory: 24552kb

input:

1799 1800 512
AAACCAACCCCCCAACCACCACCAAACCCACCACCAACCACCAACACCCACAACCAACCACCACACACCCACCCACACCACCCAACAACCAAAACCACCACCAAACCCCACCAACCAACCAACCACCACACCCCACCCCCACACCAAAACCAACACCCAAAAACCAACCAACACAACCCCCAAAAACCAACAAAAAAACAAAACCAAAACCCACCAACACAAAAAACAAACCAAAAACACCCCCCAACAAACCCCAACAACACAAACCCAACCACACAAACACAAC...

output:

172

result:

ok single line: '172'

Test #23:

score: 0
Accepted
time: 20ms
memory: 24536kb

input:

1799 1800 512
CCCCAACACCCCACCAACCACAAACCCAAAAAAAAAAACCAACCCACCCACAAACCCCCCAACCCAAAACCCCCCCCCCACACACACAAACACCAACAAACCAAAACCAACACACAAAAACAACCACAACAACAAAAAAAACAACACCACCAACAAACACAACAACACAACCCACAAACCAAACCAACAAACAAACACAACACCCACAACACACACACCACACCCCCCCCCCAACCAACCCAAAACAACAACAAACCACAAACAAACACCACACACAAAACAACAA...

output:

646

result:

ok single line: '646'

Test #24:

score: 0
Accepted
time: 17ms
memory: 13292kb

input:

767 1800 704
CACAAACCCACACACCCCCCCACACAAACCACAACCACCCCCACCCACACCCAACACCAAACCCACCACAACCCAAAAACACCCACCCAACCCCCACAAAAACAACAAAACCACAAAACCAAACCAAACCCAAACAACCCAAAAAACCAACAAAAAAACCACAACCACACCACACAACAACACCACACACAACAACCAACCAAAACCACCACACCCCACAAAACCCCACCCACACAAAAACCAAAAACCACAAAACCAACAACACCCACCAAAACAACCCACCCCCA...

output:

698

result:

ok single line: '698'

Test #25:

score: 0
Accepted
time: 20ms
memory: 13156kb

input:

767 1800 194
AACAAAACCCACCACAAACCCCACCCAACACCCCACACACAACAAAAACAACAAAAACAAAAAACCCCAAACAACCCAAACACCACCACCCCAAAACAAACCCACACCACAAAACAACCCCAAACACACAAACAACCCAACCAAACACCCCAACACCCCACACAAACACCCCCAAAAACACACACCACCAAAAACCAACCCACAAAAAACACAACAAAACAACAACAACCCCACCCAAAAACAACCACCCACAAACCAACAAAAACAAAAACCAAACAACCAAACAA...

output:

610

result:

ok single line: '610'

Test #26:

score: 0
Accepted
time: 12ms
memory: 23376kb

input:

1728 1728 864
ACACCCACCACCAACCCACACCCCCCACACACCCACCAACCCCCCCCAAACCCCCAAACAACCACCAAAACAAACCCAACAACACCCCCACACAAAACAAAAACCCCCCACCACAACAAAACAAAACAAACCCCACCACCCAACCAACAAACAAACACCAAAAAACAAAACCACCAACCAAACCCACACCACACCAAACCACACAACAAACCCAACAACCACAAAAACCCACCCCACAACCACCCACCAACACCAAAAACACCCACCCCCACAAAACACCAACCAA...

output:

39

result:

ok single line: '39'

Test #27:

score: 0
Accepted
time: 14ms
memory: 23160kb

input:

1728 1728 864
CCCACCCAAACAAACCCCCACCCCCAACACACCCCCCCAACACCCCCAACACCAACCCAAACCACACCACAAACCACAAAACCAAACCCCCAACCCCCAACAACCCCCACAAACAAAAAACCACCAACAAACACCACCCAACACCCCCAACAAACCAACAACAACCACAAAAACCACCACCCCCAAAAACCACACCAACACCAACCACAACCCACACACCCCCCCACAACCACAAACCACAAACCCCAAACCCACCAACCAACACAAACCCACAAACCACCACACC...

output:

1277

result:

ok single line: '1277'

Test #28:

score: -19
Wrong Answer
time: 17ms
memory: 21008kb

input:

1513 1728 864
ACCCAAAACCACCACCCACCCAACACAAACAAACAACAAAAACCAACCACAACCACCAACCACCCAACAACAAACACAACCCAACAAAACAACCCACCCACACAACCCCAAACAAAAAAAACACACACCAACAAAAAAACCACCACCACACACCAACAAACCAAACAACAAAAAAACACCAAAACACAACCCAAAACCCCACACACAACAAACCAACCACACAAAACCCAACCCCCAACACCCAACAAACACACCCAAACAACCCACCAAACCCCCCCCCCAACAA...

output:

27

result:

wrong answer 1st lines differ - expected: '887', found: '27'

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%