QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#46819 | #4669. Genetic Modifications | Qingyu | WA | 12ms | 4404kb | C++23 | 2.1kb | 2022-09-01 23:25:25 | 2022-09-01 23:25:26 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
string s, t;
int n, m;
bool vis[110000];
int L[110000], R[110000];
void myfill(int x, int tot, char col) {
while (tot--) {
while (vis[x] || s[x] != col) x++;
vis[x++] = true;
// cerr << x << ' ';
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cin >> s;
n = s.length();
cin >> t;
m = t.length();
int l = -1, r = -1;
for (int i = 0, j = 0; i < m; i = j) {
char c = t[i];
while (j < m && t[j] == t[i]) j++;
for (int k = 0; k < j - i; k++) {
if (l < n) {
l++;
while (l < n && s[l] != c) l++;
}
if (r < n) {
r++;
if (r < n) {
if (s[r] == c)
while (r + 1 < n && s[r + 1] == c) r++;
else
while (r < n && s[r] != c) r++;
}
}
}
L[j] = l;
R[j] = r;
}
if (l == n) {
cout << "NO\n";
return 0;
}
if (r < n) {
r++;
while (r + 1 < n && s[r + 1] == s[r]) r++;
if (r < n - 1) {
cout << "NO\n";
return 0;
}
}
cout << "YES\n";
int x = n;
while (s[x - 1] != t[m - 1]) x--;
bool flg = false;
for (int i = m - 1, j = m - 1; i >= 0; i = j) {
char c = t[i];
while (j >= 0 && t[j] == t[i]) j--;
if (flg) {
myfill(L[j + 1], i - j, c);
continue;
}
for (int k = 0; k < i - j; k++) {
x--;
if (s[x] == c)
while (s[x - 1] == c) x--;
else
while (s[x] != c) x--;
if (x < L[j + 1]) {
myfill(L[j + 1], i - j - k, c);
flg = true;
break;
}
vis[x] = true;
}
}
for (int i = 0; i < n; i++)
if (vis[i]) cout << i + 1 << ' ';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3644kb
input:
BBAAABBAAABAAA BAAB
output:
YES 2 5 8 11
result:
ok good solution
Test #2:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
ABABABABAB ABAB
output:
NO
result:
ok no solution
Test #3:
score: 0
Accepted
time: 4ms
memory: 3756kb
input:
BBAAAAABBAAAAAABBABAABBBBBAABBBAAABABBABABBBAAABBAAAABBBBBABAABBBAABBBBBBBABBABABBAAAABBAAAABAAAABBABAAAAAAABBBBAAAAAABAABABBAAAAABBBBAABABABAAAAABBBABABBAABABBBBAABAABBBBBABBABABBAAABBAAAABBBABBABAAAABBBAABAAABBBAAAAAAAAAAAAABABBAABBBBABABAABBBBABAABBAAABABBBBAAAAAAAABBAAAABBABABABBBAAABAABBABBAAAA...
output:
NO
result:
ok no solution
Test #4:
score: 0
Accepted
time: 5ms
memory: 3776kb
input:
BABABAABABBABAAAAABAABBAAAAABABABBABABBBBBBBAAAAAAABAAAAABAABBABBABABBBABBBAAAABBBABABBAAAABBBAABBBBBBBAAAABAAAABBBBABBAABAABBBAABBBBABAABABBBBAABABBABBAABAABBBBBAAABBAABABBBBAABABBABAABAAAABBABABAABBBABBBBABABABABAAABBABABABABBABAABBBBABAABBABBBBABABBABBBBBAABBBBBAAABAABAAAABBBBBABBABABABBBBABBBABA...
output:
YES 1 2 4 5 6 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 61 63 64 66 67 69 70 71 72 73 74 75 76 77 78 79 80 81 83 85 86 87 88 89 90 91 92 95 96 97 98 99 100 101 102 104 105 106 107 108 109 110 11...
result:
ok good solution
Test #5:
score: 0
Accepted
time: 4ms
memory: 3764kb
input:
BAABBBBBBAAABABABAAAAABAABBAAABBAABBBAABABBBABBABBBABBBBABAABAAAAABBBBBBBABABABAABABAABAABBBBBBABABABABBABBBBAABAABBAAABABBAAAAAAABBAAAAAAAABAAABABBAAABABABBBABAAABBBAABAABBABBBBBBBBBABBBABBBABBAABAABBABABBBBAAAABABAABAABABBABBABBBBBAABABABBBBBABAABBABABAABBABAABABBBBABABBBBBBABBBABABBAAABBAAABBABBA...
output:
NO
result:
ok no solution
Test #6:
score: 0
Accepted
time: 5ms
memory: 4004kb
input:
BBAABBAAABBBBAAABABBBABBBAABABAABBBABABBBAABBBBBBABBBAABABBBAAAAABABBABAABBAABABAABBAAABBBABAABBBAABAABABABBBBAABBBBBBBBBBBABBABABABBABBAAAAAAABAABABAABBABBABABBBBBAABBABBAABAABBBABBABBAABBBAAABBAAABABBBBBAAAABBAAABBAABABBABAABBBBAABBBAAAAAABBBAAAAABBBAAAABAABAAABBBAAABABBBABBBBBBBBAABABBABBBABAABAA...
output:
NO
result:
ok no solution
Test #7:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
BABBBBAABAAAAAABAAAAAABBABBABABAAABAAABAAAAABABAABABAABBBAAAABABBABAAABBBABAABBAABBBAABABBBABBBBBAAAABBAAABBBABBABBBAAABAABABABBABABABABBBAABABABAABBBBBAABAABBABAABABBBBBAABBAABABBAAABAAABABBBABABBBBAAABAABBBAABAABABBAABABAAAAABBBBAABABBBBBBABBBBBABBBABABBBAAAAAAABBAABAAAABAAAABBAABAABAABAABBBABBBAB...
output:
YES 1 2 3 7 8 10 11 16 17 18 19 23 24 26 27 29 30 31 32 33 35 36 37 38 40 41 45 47 48 50 51 53 54 58 62 64 66 67 68 69 71 72 74 76 78 80 82 85 86 87 88 89 92 93 94 95 96 98 99 102 104 105 107 108 109 111 112 114 117 118 119 121 123 124 125 126 127 129 130 132 133 134 135 136 137 139 140 141 142 143 ...
result:
ok good solution
Test #8:
score: 0
Accepted
time: 1ms
memory: 3956kb
input:
AABABBAAAAABBAAAAABBBAAAAABBAABBBBBABBABABBAAAABAAABAABAAABBABBABBABAABBBBBBBAABABBBBBAAABABABABBBAABABABAAAAABBAABAABAABABABABBAABBBAABAABBAAAABBBBBBBBABBBBABAAAABAABBABABAAABABABBBAAABAAAABBBAAABBBAAABABBBAAABBBAAABBBBABAABAAABABAABABBAAAABBBAAABBBAABAAABABABBBBAABBABABBBBAAABAABBBBABBAABBBAAAABAA...
output:
NO
result:
ok no solution
Test #9:
score: 0
Accepted
time: 6ms
memory: 4316kb
input:
BBAAAAAABAAABBBAABABABAABABAAABABAAAAABBBAAAABBABBABAAABABAAAABBAABBBBBBBAABABABBBBABBABAABBBABAAAABBABABBBAABBAABBBABBABBAABBBAAABBABABAAAAAABBBABBBAABAAAABAAAABAAABAAAAAAABAAAAABBABBBAAAAABBBAAABBBABBBBBAAABBAABAAABAAABBBAABBABBAABAAABBAAABAAAAABAAABBBABAAABABAAAAAAAABBBAAAAAABAAABAAABBABABBABABBA...
output:
YES 1 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 32 34 35 36 39 40 41 42 43 44 46 47 49 51 52 53 54 55 56 57 58 59 60 61 62 63 65 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 87 88 89 90 91 92 93 94 95 96 97 100 101 102 103 104 105 106 108 110 111 114 115 ...
result:
ok good solution
Test #10:
score: 0
Accepted
time: 6ms
memory: 3960kb
input:
BABBABBABBBAAABABBBBAAAABBBABBBAABBAAAAABBBBABBBAABAAAAAABAABAABABABBABABBBBBBBAAABAABABBBBABBAABBAAAABBBAAABAABBBBAABABBABBABBABAAAAABBABABBABBABBAABABBABBBBBAAAABABABAABAAABABBBAABBAAABAABBBBABAABBBBBBABBABAABBAAABBBBBBAABABABABAAABAABBAABAABABAABBBBBBBBABABABBBABABBBABABAAAAABBBBBAAAAAAABBBBABABA...
output:
NO
result:
ok no solution
Test #11:
score: 0
Accepted
time: 4ms
memory: 3996kb
input:
AAABBAAABABBBBBABBAAAAABABBABBBABABBAAABAABBBABBBAABBBBABBBAAABBBBBABAABBABABBBABAAABBAAABBBBBABBBBAAAABBAAABBBBABABAAAAAAAABBAAABAABBBABAAABBAAAAABABABABABABAABBBABBBBAABBAABBBBABBBBBBBBBBBAABAAABABBABAAABABABBABBBABBAABABAABBBBABAABAABABBABABBBBABAAABABABBAAABABABAAABBBAAABABAABBBBABAABBBAAABBBBBA...
output:
YES 1 2 4 6 7 9 10 11 12 13 14 16 17 19 20 21 22 24 25 28 29 30 31 33 35 37 38 40 41 43 46 47 48 50 51 52 53 54 55 57 60 61 63 64 65 66 67 68 69 72 74 75 77 78 80 82 85 87 90 91 92 93 94 96 100 101 102 103 106 109 110 113 114 115 117 125 127 128 129 130 131 133 136 137 138 139 140 141 143 144 148 14...
result:
ok good solution
Test #12:
score: 0
Accepted
time: 3ms
memory: 3648kb
input:
BAABBAABBBAABBAABAABABABBABBABABBAAAAABBBBBBABBABAAABBAAAAABBBABABABBABBBAAABABAABBABABAABAABBBAABBAAAABBBBABBBBBBBBBABAABBABAAABAAAABBABAABABBBBBBBABBAAAAAABABABBBABABBBABABABABBAAAAAAAABABBABBBABABBBBABAAABBBBBABBAAABAABABBBAABABABBBBAABBBBBABABBBBABABBAAABABAABABAAAABABBABAAAAABBBABAAABABABAABAAA...
output:
NO
result:
ok no solution
Test #13:
score: 0
Accepted
time: 5ms
memory: 3964kb
input:
BBAAAAABBBBBABAAAABABAAABBBABBBAABAAABAAABABAABBABAABABBBBBABABABAAAABABAAABABABBAABBABBBBBAABBABBABBABABBBAAABABBBBBBBBBBABBBBBABAAAABBABBAABBBBBAABAAABBAABABBBBBAAAAABAABABAAAAAAABBBBBAABBBBAABABAAABABABAABBAAABAABBAAABBBABAABAABAABBAABBABBABAABABBABBBABABAAABBABBBBAAABAAABBBBBBABABBBBBBAAAABAABAB...
output:
NO
result:
ok no solution
Test #14:
score: 0
Accepted
time: 3ms
memory: 3920kb
input:
BBBAAABABBBABAABBAAABAABAAABABABAAAAABABABBABAAABBABBAAABAABBBABABABBABBBAAAAABAABBBABBBBAABBBBBABAABBABABBBABBBBBAABABBAAAABBABABBAAABBBAAAABAAABAABBBBBABBBBABABABAAAABAAAAAAAABABBBABAAABBAAAABBAABAAAABABABAAAABAAAAABBBBBABAABAAAAAAAAAABABABBBBBAAABABAABABAABBBAABABBAABAAABAAAABABABAAABABBAAAABABAA...
output:
YES 1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 40 41 42 43 44 45 46 47 49 51 52 54 55 56 57 58 59 60 63 64 65 66 67 68 69 70 71 72 74 75 76 77 79 82 83 84 85 86 87 88 89 90 91 92 93 94 95 97 98 99 100 101 102 103 104 106 107 108 110 111 112 11...
result:
ok good solution
Test #15:
score: 0
Accepted
time: 5ms
memory: 3776kb
input:
BBBABABABBBABAABAAAABBAABABBAABAABBBBAAAAABABBABABBBBBABABBBBABBBABBBBBABBBAABABAABAABBBBBBABAAABAABAABAABBBBBBBBBBAABABAABBAAABBAABBBBBBABBAABBBAAAABBBBAAAABAAAABBBAAAABAAABBBBAABABAAAAAABABAABAAAAABBBBBBAAABAABABBABBBAAABABBBAABBBBBBBBAAABABABBABABAABBBABAABAAAABABBBBBBBAAABAABBBBBBBAAABABABBBAAAA...
output:
NO
result:
ok no solution
Test #16:
score: 0
Accepted
time: 0ms
memory: 4032kb
input:
BABAAABAAABABBAAAAABBBABAABBABABABBBBBABABAABBAABAABAAAAAABABBBABABAABBBABAABBAABBBABBBAAAAAABBABAAAAAABAABABABBBBABABBABBBBBBBBBBBBBBAAAABAAABBBBBBBABBABBBAABBBBBBBAAAAABABBBAABAABABABBBBAAAABAAAABBABABBBABBABBABBBAAABBBABBBABBABBAABABAAABBAAABAAAAABAAAABABAABBABAAAAABAAAAABBABBBABBABBAAABABAAABAAA...
output:
NO
result:
ok no solution
Test #17:
score: 0
Accepted
time: 5ms
memory: 3992kb
input:
BBBBABBBABBAAAABBBBBBBBBBBABAABBAAAABBBABAAABABBBBABAAAAAABABABBABBBAAAAAAAABBABABBBABAABBABBAABABAABBAABBBBBABAABBBBAABBAABBBBAABABAAABBAAAAABABABAABAAABBBAABBABABBBAAAAAAAABAABABABBAABABABBBBBBBABABAAABBBBAAABABBAABBBBAAAAAAABBAAAABBAABBABBAAAABBAABABABBBAAAAABBAABABBBBAABBAABABBAAABBBAAABABAABBBA...
output:
YES 1 2 5 6 9 10 11 16 17 27 28 29 31 32 33 34 37 38 39 40 42 43 45 47 48 49 51 53 54 55 56 59 61 62 65 66 69 77 78 79 81 85 86 89 90 92 93 94 95 96 98 101 102 103 104 110 112 113 118 120 122 123 128 129 131 132 136 137 138 139 140 143 144 146 148 150 151 154 155 156 159 161 163 167 175 178 180 181 ...
result:
ok good solution
Test #18:
score: 0
Accepted
time: 0ms
memory: 4188kb
input:
BBABABAABBBBBABBBAAAABABBAAABBBBBBBBBBABAABABBAAABAAAABBBBAABBABABBBBAABBBBBBBBAAABABBABAAABBBAAAAAABBBBABBBAABBAAABAAAABABBBBAABAAABBAABABABBBABBBABBABBABBABABABBBBAABAAAAAAAAAAABBBABBBAAABBBBABAABBBBABAAAABAABBBAAABABAABABAABABABBAAABABBAABAAABBAAABABABAABAABABBAABBBAAABAABBAABAAABBAABAABBABAAAABA...
output:
YES 1 2 3 5 7 9 10 11 12 14 15 16 18 19 20 21 22 24 25 26 27 29 30 31 32 33 34 35 39 40 43 44 45 47 48 49 50 51 52 53 55 56 57 58 61 63 64 65 66 67 68 70 72 73 74 75 76 77 78 80 81 82 84 85 86 87 88 89 92 93 95 96 97 98 99 101 102 103 104 106 109 110 111 112 113 114 115 116 117 118 121 122 123 124 1...
result:
ok good solution
Test #19:
score: 0
Accepted
time: 6ms
memory: 3868kb
input:
BAABABBAAAAABAABBABBBBBBBBABBABABABAABABAABAABBBAAAABAABBAAABBBBBABABAABBBBAAAABAAABBBAAABABBAAABBAAABBBBABBBBBABABABBBABBBAAAABBABBAABAAABBBABAAAAABABAAABABAABBBAAABAABAABABAAAAAABBBABABBBBBBBABAAAAAABAAABAAAAABBABAABBBABBBBAABAABAABAABBBBAAABBABAABBAABBAABBAABBABBAAAABBBABABBBAAAAAAABAABBAAAAABBAB...
output:
NO
result:
ok no solution
Test #20:
score: 0
Accepted
time: 10ms
memory: 4116kb
input:
AAABBBBBBAAAAABABAAAABABABBAABAABBAAABBAAAABABBBBABABBBABAAABBBBABABABAAABAAABAABABBAABBABAAABABABABAABBAAAABBBBAAAAABBAABBBBAABABBBBBABAABAABBBAABABAABABBAAAAABAABBABAABABABAABBABAABBABBBBBABABBBAABABAABBBBAABBAABABBAABAAAABAABABAAAAABBBABBABAABBABABAABAAABAAABBAABAAAAAABBAAAAAAAAABABBBBBABBAAAAABB...
output:
YES 1 4 5 10 15 16 18 22 23 25 26 28 30 31 33 35 36 38 40 44 46 50 51 53 54 55 56 57 58 61 65 67 69 71 74 75 78 79 81 83 85 87 89 90 91 94 95 96 97 99 100 103 105 106 107 108 109 110 113 118 120 122 123 124 125 126 128 129 130 135 136 137 138 139 140 141 145 146 147 148 149 152 153 156 161 162 163 1...
result:
ok good solution
Test #21:
score: 0
Accepted
time: 7ms
memory: 4220kb
input:
BBBAABBAAAAABBAABBAAAAAABBABBBAABABABBBAABBBABABBABABAABABBABBABBAAABABBBBAABAABBBBABAAABABABBABBBBBBBABBABABAAABBAAAABABBBBAABBBAABBBBBABBBBBABBBABABABAAAABABABABAABBABBBABAAAABBAAAAABABBBABABAAAAABABBBAAABBAABBBBABABBAAABAAAAABBAABBAAABAAABBBABBBBAABABAABBBBABBAABABBABABAAABABAAAAAAABBABBBBAABAAAA...
output:
YES 1 2 4 5 6 8 9 10 11 13 14 15 17 18 19 20 21 22 23 24 25 26 28 29 30 31 32 33 34 35 37 40 41 42 43 45 46 48 50 52 53 56 57 58 60 63 66 69 71 72 75 76 77 80 81 84 86 87 89 91 92 93 94 95 96 97 103 106 108 110 111 113 115 116 117 118 119 121 122 123 124 125 127 128 129 132 137 138 143 144 147 149 1...
result:
ok good solution
Test #22:
score: 0
Accepted
time: 11ms
memory: 4232kb
input:
BBBABBAABAABBAAABBAAABAAABAAABBAABBBBBBBBABAABAABBBBAAABAABBBAABAABBBABABBABBAABBBAAABBABAAAAABABAAAAABBBABABBBAABAABBBBABBAAAAAABABAABABBBABBAABBBAABABBABAAABAAAABAAAAABBAABBBBBABBABBABBABAAABAAAABBBAAAABABABBBBBAAAAABBABAAAABABAAABABBBAAAABABBBAAABABAAAABAAABAABBBBBABAAABABAABBBBAAABAAAAAABABBAABA...
output:
YES 1 2 3 5 6 7 9 10 11 12 14 15 17 19 20 21 23 24 26 27 28 30 32 33 34 35 36 37 38 42 43 44 45 46 49 53 56 57 59 62 63 65 67 68 70 72 73 74 76 77 80 83 84 85 86 88 89 90 91 92 93 94 95 96 98 99 103 104 106 107 108 109 110 112 114 115 116 117 118 119 120 121 124 125 130 131 132 133 134 135 137 138 1...
result:
ok good solution
Test #23:
score: 0
Accepted
time: 8ms
memory: 4000kb
input:
BBAABBAABBABBABABBBABBBABBABBABBAABABABBBAABBABAABAABBABABABAABBAABBBBAAAAABABABABAAAABABBBABBBBBBBBBBAAABBBAAAAAABBBAAABBBBABABABABABBAAAAABBBBBABBBBBBAABBBABAABBBABABAABBBBBBBAABABAAAABABAABBBBABBAABBAAAAABABABBAAAAABBABABAABABBBBBAAAAABABABAAAAABAAAAABAAABBBBAAABBAABBABABBBAAABBBBBBABBAABBBABABBA...
output:
YES 1 2 3 5 6 9 10 11 12 14 15 16 17 20 24 25 26 28 29 30 31 32 35 36 37 39 40 42 43 44 46 48 49 51 52 53 55 57 58 60 61 63 64 67 68 69 71 76 77 79 81 82 83 87 89 90 91 93 94 95 103 106 107 108 115 116 118 119 120 125 126 128 130 132 134 135 141 146 153 155 158 160 161 165 167 168 169 171 178 180 18...
result:
ok good solution
Test #24:
score: 0
Accepted
time: 4ms
memory: 4044kb
input:
BBAAAABAABABBABBBBBABBAAAABBAAAAAABBAAAAAABBAAAAABABBBBAAAAAAAABBABBABABBAABAAABBBAABBABABABBBBABAABBBBBBABBBAABAABBBBBBAAAAABBABAAAABBAABABABBBAABAAABAABAAAAABAAABABABBBBAABAABBBBABAAABBBBBBBAAABBBABBBABABABABBABABABBBAAABBBAAABBABBBBBBBBABABAABABBBBBBAABABAAABBAABABAABAAAABBBBABABBAAAABAAABAABBBAA...
output:
YES 1 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 20 21 22 23 24 25 27 28 29 30 31 32 33 35 37 38 39 40 43 45 46 47 48 49 50 51 52 53 56 57 58 59 60 61 62 64 65 66 67 68 69 70 71 72 73 74 76 77 78 79 80 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 100 101 102 103 104 105 106 107 110 112 113 114 115 116 1...
result:
ok good solution
Test #25:
score: 0
Accepted
time: 3ms
memory: 4032kb
input:
AAAABAAAABABABABBBABABABABBABABBBBAAABBBABBBBBABBABAABAABBBAAABBBABBABABABABBBBAAABBBBABBBABABBBBBBBABBBAAABBBBAAAABABBAABAAABAABAAABABBBBAAABABBBBABAAABABBBBAABABABAABABAABABBBBAABABABBABAABABBAAABAAABAAABBBBAABAABABBAABBBBBBBAAABBAABBAAAAAAAABAAABABAAABBBBBBAABAABBBAAABABAAAAAABBAAABBBBABBBABBABAA...
output:
YES 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 38 39 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 72 73 74 75 76 77 78 79 80 81 82 83 84 85 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 1...
result:
ok good solution
Test #26:
score: 0
Accepted
time: 4ms
memory: 4400kb
input:
BAABBBABBBBBABAAAAABBBBBBBBBAAAAAABAAABABABBBBBBBABBAABABBBAABAAAABAAAABABBBAABAAAABAABBAAABBAAAAAAABABBBBAAAABAAAABABABBAAABABABAAABBBBBBBABBBBBBABABAAAAAAAAAABABBBAAAABABAAABABBABBABBBBABBBBBAABAAAABBAAAAABABABABAABAABBAAAAABABBABBBBBBABABABBBAAAABAAAABBABAAAABBBABAAAAAABABABAAAAABABABBBAABBBBAAAB...
output:
YES 1 2 4 5 6 7 8 9 10 11 13 14 15 16 17 18 20 21 22 23 24 25 29 30 31 32 33 35 36 37 38 39 40 41 43 44 45 46 47 50 53 55 56 57 60 61 63 67 68 69 70 71 72 73 74 75 77 79 80 84 85 86 89 92 94 95 96 97 98 99 100 101 103 104 105 107 108 109 110 112 113 114 116 117 118 119 122 123 125 126 127 128 129 13...
result:
ok good solution
Test #27:
score: 0
Accepted
time: 0ms
memory: 3852kb
input:
BAAAABBBBBBBBAAAABAAABAABABBBBBBABABAAAABBABABABABBBBBBBBBAAAABABAAABBBAABAAABABAABAABABBABABBAAAABAABBBBABAAABAAAAABBABBBAABABBBABABABAAABBAABBABABBABABBBABBBBBABBBABBAABAAABAABBABBBABBAAABAABBBBABABBBABAABABBABABBBBBBAAAABAAABBBAAABBBBAABAAABBBAAABABBBBAAABABABAAAABAAABBABBABABABBABBBAABAABABAAAAA...
output:
NO
result:
ok no solution
Test #28:
score: 0
Accepted
time: 4ms
memory: 3988kb
input:
ABABAABAAAABAAAABAAAAAABAABAABABBABBABAAABABBBABBAAABAAABAABBAABABABAABAABBBABBAAABBAABBBBBBAABBABAABBAABBAAABBAABBBBABAABABABABABBBBAAABBABAABBBBAAABBBBAABBBABAABBABAABBABBABBBABABBABBBBBABABBABABBABBBBBBAAAAAABAABABAABABBABABAABAAABBBAAABBBBBBAAABBBABBAABBAABABABBBAAABBBBBBBBAAAAAABBBBBBBAABAABABB...
output:
YES 1 2 4 5 7 8 9 10 11 12 13 14 17 18 19 20 21 22 24 25 26 27 28 29 30 31 32 33 35 37 38 39 40 41 42 43 44 45 46 48 50 51 52 53 54 55 57 58 59 60 62 64 65 66 67 69 71 72 73 74 75 76 77 78 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 101 103 105 106 107 110 111 112 113 114 115 116 117 118 1...
result:
ok good solution
Test #29:
score: 0
Accepted
time: 2ms
memory: 3772kb
input:
BBAABAABBBBAAAAAAAAABABABBAAAABAAAAAAAAABBABABBBBBABBAAABBABBAABBBBBBBBAABBBBABBBABBBBABAABABAABAABABAABBABABAABAAAABAABBABAABBAABAAABABBBBBBBAABAABBABABBAABABAABABBBBAABABABABAAAABAAAABABBAABBBBAABAABABBABBAAABAABBABABBBBABAAABAABAABBBAAAABAAAAAAAAAAAAABBAABABBBBABBABBAABBABBAABBAABBBABABBBABBAAAAA...
output:
NO
result:
ok no solution
Test #30:
score: 0
Accepted
time: 5ms
memory: 3900kb
input:
AABAABBAAABBAABBAAABABBBAABAABAAAABBBAAABABABBBBAAABBBBBBBABBABAABBAAABBBAABABABABABABABAAAAABBABABBBABAAABBAABBBBABBABABBBBBBABBABAABBABBABBBABBBBABABAABBAAABAABBBABBABBAAAAAAABBBAAABBBABBAABBBAABAABBABAABBAAAAABAABBBBABAABABBBAAABBBABBABAAABABAABABABAAAABAAAAAAABABBBAAABAABBBBAAABBAAABAAABBAAABAAB...
output:
NO
result:
ok no solution
Test #31:
score: 0
Accepted
time: 5ms
memory: 3920kb
input:
BBABBBBAAABAAAAABABAABAABABBAAABBBBBBBABABBBABAABBAABAABAAAAABAAAAAAABABABAAABBABBBBBBBABABAAAAAAABAAAABBBAAAAABABAABABBBABAABBBAABAABAABBAABAABAABBBBAABABBBABBABABBAAAAAAABBBBABABBABABAABBABAABABBBAABBAABBBABBBBAABBBABABBABAABAABBBBABBBABBABBBBBABBABBABABAABABBABBBAAABBBAAABBAABABBBBBABBBBABBBAAAAA...
output:
YES 1 2 4 5 6 7 8 9 11 12 13 14 15 17 18 19 20 21 22 23 24 25 26 27 28 29 32 33 34 35 36 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 88 89 90 91 92 93 94 95 96 99 100 101 102 103 104 105 107 108 109 110 ...
result:
ok good solution
Test #32:
score: 0
Accepted
time: 1ms
memory: 3724kb
input:
ABBABABBBBBABAAAABAAABABBABAAABABAABBBBABABABBBBAABAAABABBAABAAAABABAAABBABAAAABABBBBAAAABAABABABAABABBAABABBBAAABBAAABABABAABBABAABAAABAABBABBBABBBBBBABABABBBBBBAAAABBBAAAABABBBAAAAABABBBABBAAABAABAAAAAAABABABBBBABBAAAAABAAABBABAABAAABAABBAABABAAABBABBBBAAAAABBBBBBABAABABAAAABBBBBABBABAAAAABABABAAB...
output:
NO
result:
ok no solution
Test #33:
score: 0
Accepted
time: 3ms
memory: 3880kb
input:
BAAABABABAABBABAABABABBAABAAABABBABABBBBBAAAABAABAABBAAABBAABABBBABABBBBBBBBBBABABABABAABABBBAABAABBBAAABAAAAAAAABBAAAABBAABBBBABBABAAAAABAABBBAAABBBAABBABBABBBAAAAAABBABBBAAAABAAAABBAAABABAABBAABABBBBBAAABBAAABBAAAAABBAAABABBBABAABAAABBBABBAABBAAAABABAAAAABABAAAABAAABBBBBBAABABABBABBABBBBBBAABABBAB...
output:
YES 2 3 4 6 7 8 9 12 14 15 16 18 19 20 21 22 24 25 26 30 31 32 33 35 37 38 42 43 44 46 49 50 51 54 55 56 57 59 60 62 63 64 66 68 69 70 71 72 73 74 75 79 80 81 82 83 84 85 86 87 89 91 92 94 95 96 97 98 99 100 102 103 105 106 107 108 109 110 111 112 114 115 116 117 120 121 122 123 124 128 129 130 131 ...
result:
ok good solution
Test #34:
score: 0
Accepted
time: 12ms
memory: 4404kb
input:
AABAAABBBBAAAABAAABAAABABAAAABAABBBAABBBABAAABAAAAABBABBAABBBBBBBBBABBBAAABBABBAAAABBBBABBABBABBAABAABBBABABABAABAAAABAAAAAABBAAABAABBBBAABBABAAABAABBABBBAAAAAAAABABBAAAAAABBBBBBBABABAABAABAABBABBAABAABABBAAAAABAABABAABBBBBBBAABABAAABABAAABBAAAAAABBBBAAABAABABBBAABABAABBABAAABABAABAABABBBABBAAABAABA...
output:
YES 1 2 3 4 5 6 7 8 9 11 12 13 15 16 17 18 19 20 23 24 26 27 28 29 30 33 36 38 39 41 42 43 44 46 47 48 49 50 52 54 55 57 58 59 60 61 62 63 64 68 69 70 72 75 76 78 79 80 81 82 84 85 86 87 89 90 91 92 93 95 97 99 102 103 105 106 108 109 111 113 114 115 116 118 119 120 121 122 123 125 127 128 129 131 1...
result:
ok good solution
Test #35:
score: 0
Accepted
time: 5ms
memory: 3816kb
input:
ABAABAABABABBABAAABBBBABBAAABBBBBAAABAABBABAAABABABBABAABBBAAABABAAAABBAABABAAABBAAAAAAAAAAAABBAAABAAABAAAAAAABABBABABBABABAABABAABBABBAAAAABAABBABBABAABBBBAABAAABABBABBBAAAAABABABABAAABBBAAABAABAAABBBBBAAABBBBBAAABBAABAAAAABBBABAABAABAAABBBBAABBABAABAABABBBAABBABBBBBABBAAAAAABAAABABBBAABBAAAABBABAA...
output:
YES 1 2 3 4 6 7 8 9 10 11 12 14 16 17 18 19 20 21 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 50 51 52 53 54 55 56 57 58 60 61 62 64 65 66 67 70 71 72 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 ...
result:
ok good solution
Test #36:
score: 0
Accepted
time: 0ms
memory: 4228kb
input:
ABABBBBBBABAAABBBAAABAABAAAAAABAABAAABABABAAAABAAAAABAABBBBBBBAABAAABAABBABBBBBBBABAAAAAAAAABABBABABBAABBAABBAABBABABBBBBAABABABAABAAAAAABABBAAAABBBABBAAAABBAABAAAAABBAABBBBAABAAAAABABAAAAABABABABBBAABABABBBBBABAAAABBBAAAAABABAABABAABBABBBBAAAAABAABBBBBBAABBBBBABBBBAABABBBBBBBBBBAABBABBBABAAAABABBBA...
output:
YES 2 3 4 5 6 7 8 10 11 12 13 14 15 18 19 21 22 23 24 25 26 27 28 29 31 32 33 35 38 39 40 41 42 43 44 45 46 47 48 49 50 53 54 55 56 57 58 59 60 61 63 64 65 66 67 68 69 70 72 73 74 75 76 77 78 79 80 82 83 84 85 86 87 88 89 90 93 95 96 97 99 100 101 102 104 105 106 107 108 109 110 111 112 114 115 116 ...
result:
ok good solution
Test #37:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
AAAABABBBBBAAAAAAABABBABBABBABBBAABBAABABBBABAABABABABBBAAAAAABAABABBABBAAAABAAAABABBBBABAABABBBBBABBBABAABBBAABAAAABABAAABBBBBABBABABBAABBAAAAAAABBBBBABBBBAAAABABABAABBABBBBBAAABABBABAAABBABAABBABBAABBBBBBAABBAAAABABABBABAAABBBBABABBABABAAABABAAAAABBBBBBABAABAAABBAABABAABBBAAAAAABABBAAABAABBABAAAAB...
output:
YES 1 2 3 4 5 7 8 12 13 14 19 20 21 23 26 29 30 31 33 34 37 38 39 41 42 44 46 47 49 50 51 52 54 57 58 59 60 61 63 64 66 68 69 70 71 72 73 74 77 78 79 80 82 84 85 88 89 90 91 92 93 94 95 96 97 98 100 101 103 105 107 110 111 113 114 117 119 120 121 123 124 128 129 130 131 132 134 135 138 140 141 142 1...
result:
ok good solution
Test #38:
score: 0
Accepted
time: 3ms
memory: 3976kb
input:
AABBBBBAABABAABBBBBBAABBABABBABBBABBBAAAAABABBBBBBBAAABBBBBBABABABBBBBABABABABBABABBBAABABBBAABABBABBBBBABABBBAABBBBBAAAABABBBBBABBABBBBAABABBBBABABABAAAAAABBBBAABABABBABAAAAABAABBBABBAABBBAAABBAAAABABBBABAABABAABABABBAAAAAABBBAABBABBAABABAAABABABABBABBABAABBBBBABBABAABAAABAABAAABABBBBAAAABABBBAAABA...
output:
NO
result:
ok no solution
Test #39:
score: 0
Accepted
time: 5ms
memory: 4204kb
input:
BABBABAABBABBABAAABBABAABBBBBBABBBABBBAAABBAABBBABAAABBAABABABAABBAABABABAAAABBAABBBBABABBBBAAABAABAAABABAABABABABABABBBBBBBBABBBABAABAAABBBAABAAABABBBAABBBBBAABAAAAABAAABABABBBAAABAABAAABBBABBAABABABAAAAAAABBAAABAAAABBBBBABAAAABBBAAAABAAABABBABABBAABABBAABABBBABAAABBBAABBBAAABBAAABAAAABBAAAABBBABBA...
output:
YES 1 3 5 6 7 9 10 11 12 14 15 16 19 20 21 23 25 26 27 28 29 31 32 33 35 36 39 40 41 42 43 44 45 46 47 49 50 51 52 54 56 58 60 61 62 63 65 66 67 68 70 71 73 74 75 76 78 80 82 83 84 86 87 88 89 90 91 92 93 94 95 96 99 100 101 102 103 104 105 106 107 108 109 110 111 112 114 116 118 119 120 121 122 126...
result:
ok good solution
Test #40:
score: -100
Wrong Answer
time: 6ms
memory: 3796kb
input:
ABABABABBBAABBABBBAABBBBBBBAABBABABBBABABBBABABAAABABBABAABBBBAABBABABABABBABBBABBBBBABBBAABBBAABBBBAAAABBBAAABABBABABAABBAAABBBABBAABABAABABAABABAAABBBBBABBABBBABABAABBBBBABAAAAAAAABAABBBBABBBABBBAAABBBAAAABBBBAABAABBBBBAAAAABBABABBABAABABBBBBAABAAAABBBAAAAABAAAAAAAAAAAABBBAABAAABABAABAABABBBBABBBB...
output:
YES 2 4 6 7 11 12 13 15 16 17 19 21 28 30 31 32 34 35 36 37 38 40 44 46 47 51 52 53 54 56 57 59 60 63 65 66 68 70 72 73 74 75 77 78 80 86 87 90 92 93 95 96 97 98 101 102 105 106 108 111 112 113 115 116 118 121 122 123 124 126 127 128 130 131 134 136 137 139 140 141 144 145 147 148 150 151 152 155 15...
result:
wrong answer wrong solution [2]