QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#514944 | #325. AB-Strings | skittles1412# | 100 ✓ | 31ms | 9992kb | C++17 | 5.6kb | 2024-08-11 13:41:55 | 2024-08-11 13:41:55 |
Judging History
answer
#include "bits/extc++.h"
using namespace std;
template <typename T, typename... U>
void dbgh(const T& t, const U&... u) {
cerr << t;
((cerr << " | " << u), ...);
cerr << endl;
}
#ifdef DEBUG
#define dbg(...) \
cerr << "L" << __LINE__ << " [" << #__VA_ARGS__ << "]: "; \
dbgh(__VA_ARGS__)
#else
#define dbg(...)
#define cerr \
if (false) \
cerr
#endif
using u64 = uint64_t;
using ll = long long;
template <typename T>
using min_pq = priority_queue<T, vector<T>, greater<T>>;
#define endl "\n"
#define long int64_t
#define sz(x) int(std::size(x))
inline void init_io() {
cin.tie(nullptr);
cin.exceptions(ios::failbit);
ios_base::sync_with_stdio(false);
}
template <typename T>
vector<T> iota(int n, const T& init) {
vector<T> arr(n);
iota(begin(arr), end(arr), init);
return arr;
}
template <typename T>
vector<vector<T>> transposed(const vector<vector<T>>& arr) {
int n = sz(arr), m = sz(arr[0]);
vector ans(n, vector<T>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
ans[i][j] = arr[j][i];
}
}
return ans;
}
template <typename T>
bool on(const T& mask, int bit) {
return (mask >> bit) & 1;
}
template <typename T>
ostream& operator<<(ostream& out, const vector<T>& arr) {
out << "[";
for (int i = 0; i < sz(arr); i++) {
if (i) {
out << ", ";
}
out << arr[i];
}
return out << "]";
}
template <typename A, typename B>
ostream& operator<<(ostream& out, const pair<A, B>& p) {
return out << "(" << p.first << ", " << p.second << ")";
}
template <typename A, typename T>
int lbs(const A& arr, const T& x) {
return int(lower_bound(begin(arr), end(arr), x) - begin(arr));
}
inline vector<bool>::reference& operator&=(vector<bool>::reference&& a, bool b) {
return a = a & b;
}
struct Engine {
static deque<pair<bool, int>> from_s(const string& s) {
deque<pair<bool, int>> ans;
for (auto& a : s) {
bool cb = a == 'b';
if (sz(ans) && ans.back().first == cb) {
ans.back().second++;
} else {
ans.emplace_back(cb, 1);
}
}
return ans;
}
static void m_push_front(deque<pair<bool, int>>& arr,
const pair<bool, int>& cp) {
if (sz(arr) && arr.front().first == cp.first) {
arr.front().second += cp.second;
} else {
arr.push_front(cp);
}
}
static int pop_front_n(deque<pair<bool, int>>& arr,
vector<pair<bool, int>>& out,
int kv) {
int tot_sum = 0;
for (int i = 0; i < kv; i++) {
out.push_back(arr.front());
tot_sum += arr.front().second;
arr.pop_front();
}
return tot_sum;
}
deque<pair<bool, int>> arr0, arr1;
vector<array<int, 2>> ans;
bool swapped = false;
Engine(const string& s0, const string& s1)
: arr0(from_s(s0)), arr1(from_s(s1)) {}
void swap_arr() {
swapped ^= true;
swap(arr0, arr1);
}
void do_swap(int i0, int i1) {
dbg(i0, i1);
vector<pair<bool, int>> buf0, buf1;
int a0 = pop_front_n(arr0, buf0, i0), a1 = pop_front_n(arr1, buf1, i1);
reverse(begin(buf0), end(buf0));
reverse(begin(buf1), end(buf1));
for (auto& a : buf0) {
dbg(a);
m_push_front(arr1, a);
}
for (auto& a : buf1) {
dbg(a);
m_push_front(arr0, a);
}
if (swapped) {
ans.push_back({a1, a0});
} else {
ans.push_back({a0, a1});
}
}
};
void print(const vector<array<int, 2>>& ans) {
int an = sz(ans);
cout << an << endl;
#ifndef STRESS
for (auto& [i0, i1] : ans) {
cout << i0 << " " << i1 << endl;
}
#endif
}
void solve() {
string s0, s1;
cin >> s0 >> s1;
Engine engine(s0, s1);
auto swap_to_large = [&]() -> void {
if (sz(engine.arr0) < sz(engine.arr1)) {
engine.swap_arr();
}
};
swap_to_large();
{
int sz0 = sz(engine.arr0), sz1 = sz(engine.arr1), d = sz0 - sz1;
dbg(sz0, sz1);
if (engine.arr0.front().first == engine.arr1.front().first) {
if (d == 0) {
engine.do_swap(1, 0);
} else if (d % 2 == 0) {
engine.do_swap((d / 4) * 2 + 1, 0);
} else {
if (d % 4 == 1) {
engine.do_swap(d / 2 + 1, 0);
} else {
dbg(engine.arr0.front(), engine.arr1.front());
engine.do_swap(d / 2 + 1, 1);
dbg(d, d / 2 + 1, 1);
dbg(sz(engine.arr0), sz(engine.arr1));
dbg(engine.arr0.front(), engine.arr1.front());
engine.do_swap(1, 0);
}
}
} else if (d > 2) {
if (d % 2 == 1) {
engine.do_swap((d + 2) / 4 * 2 + 1, 1);
} else {
engine.do_swap(d / 4 * 2 + 1, 1);
}
}
}
swap_to_large();
while (sz(engine.arr0) > 1) {
engine.do_swap(1, 1);
}
print(engine.ans);
}
int main() {
init_io();
solve();
}
详细
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 1ms
memory: 3556kb
input:
a b
output:
0
result:
ok Operations: 0
Test #2:
score: 5
Accepted
time: 0ms
memory: 3600kb
input:
b a
output:
0
result:
ok Operations: 0
Test #3:
score: 5
Accepted
time: 0ms
memory: 3620kb
input:
a bb
output:
0
result:
ok Operations: 0
Test #4:
score: 5
Accepted
time: 0ms
memory: 3828kb
input:
b ab
output:
1 1 1
result:
ok Operations: 1
Test #5:
score: 5
Accepted
time: 0ms
memory: 3608kb
input:
b ba
output:
1 0 1
result:
ok Operations: 1
Test #6:
score: 5
Accepted
time: 0ms
memory: 3784kb
input:
ab bb
output:
1 1 2
result:
ok Operations: 1
Test #7:
score: 5
Accepted
time: 0ms
memory: 3532kb
input:
ba bb
output:
1 1 0
result:
ok Operations: 1
Test #8:
score: 5
Accepted
time: 0ms
memory: 3528kb
input:
bab bbb
output:
2 1 0 1 4
result:
ok Operations: 2
Test #9:
score: 5
Accepted
time: 0ms
memory: 3524kb
input:
abb bbb
output:
1 1 3
result:
ok Operations: 1
Test #10:
score: 5
Accepted
time: 0ms
memory: 3608kb
input:
a bbbb
output:
0
result:
ok Operations: 0
Test #11:
score: 5
Accepted
time: 0ms
memory: 3600kb
input:
abbb b
output:
1 1 1
result:
ok Operations: 1
Test #12:
score: 5
Accepted
time: 0ms
memory: 3828kb
input:
b bbba
output:
1 0 3
result:
ok Operations: 1
Test #13:
score: 5
Accepted
time: 0ms
memory: 3592kb
input:
bbb abbbb
output:
1 3 1
result:
ok Operations: 1
Test #14:
score: 5
Accepted
time: 0ms
memory: 3552kb
input:
bbbbba bbbb
output:
1 5 0
result:
ok Operations: 1
Test #15:
score: 5
Accepted
time: 0ms
memory: 3524kb
input:
abbbbb bbbbbb
output:
1 1 6
result:
ok Operations: 1
Test #16:
score: 5
Accepted
time: 0ms
memory: 3756kb
input:
bbbbba bbbbbb
output:
1 5 0
result:
ok Operations: 1
Test #17:
score: 5
Accepted
time: 0ms
memory: 3600kb
input:
bbbbbb bbbbba
output:
1 0 5
result:
ok Operations: 1
Test #18:
score: 5
Accepted
time: 0ms
memory: 3612kb
input:
bbabbb bbbbbb
output:
2 2 0 1 8
result:
ok Operations: 2
Test #19:
score: 5
Accepted
time: 0ms
memory: 3752kb
input:
bbbbbb bbbabb
output:
2 0 3 9 1
result:
ok Operations: 2
Subtask #2:
score: 10
Accepted
Dependency #1:
100%
Accepted
Test #20:
score: 10
Accepted
time: 0ms
memory: 3616kb
input:
aaaaaa bbbbbb
output:
0
result:
ok Operations: 0
Test #21:
score: 10
Accepted
time: 0ms
memory: 3576kb
input:
aaaaaa aaaabb
output:
1 0 4
result:
ok Operations: 1
Test #22:
score: 10
Accepted
time: 0ms
memory: 3612kb
input:
aaaaba aaaaaa
output:
2 4 0 1 10
result:
ok Operations: 2
Test #23:
score: 10
Accepted
time: 0ms
memory: 3532kb
input:
bbabba bbbbbb
output:
3 3 6 8 0 1 10
result:
ok Operations: 3
Test #24:
score: 10
Accepted
time: 0ms
memory: 3612kb
input:
bbabab bbbbbb
output:
3 4 0 1 2 3 2
result:
ok Operations: 3
Test #25:
score: 10
Accepted
time: 1ms
memory: 3528kb
input:
bbbbbb bababa
output:
3 0 3 1 1 2 2
result:
ok Operations: 3
Test #26:
score: 10
Accepted
time: 0ms
memory: 3532kb
input:
bbbbba bbbba
output:
2 5 0 1 9
result:
ok Operations: 2
Test #27:
score: 10
Accepted
time: 0ms
memory: 3532kb
input:
aaaaba aaabbb
output:
2 4 0 1 7
result:
ok Operations: 2
Test #28:
score: 10
Accepted
time: 0ms
memory: 3604kb
input:
bbbbba baaaba
output:
3 0 1 6 3 4 7
result:
ok Operations: 3
Test #29:
score: 10
Accepted
time: 0ms
memory: 3616kb
input:
baabab bbbbaa
output:
3 3 4 5 0 1 6
result:
ok Operations: 3
Test #30:
score: 10
Accepted
time: 0ms
memory: 3616kb
input:
bababa bbbaaa
output:
4 3 0 1 1 2 2 3 6
result:
ok Operations: 4
Test #31:
score: 10
Accepted
time: 0ms
memory: 3592kb
input:
abbbba aaaaba
output:
3 1 0 4 5 6 5
result:
ok Operations: 3
Test #32:
score: 10
Accepted
time: 0ms
memory: 3832kb
input:
abbaa abbabb
output:
3 0 1 2 2 4 3
result:
ok Operations: 3
Test #33:
score: 10
Accepted
time: 0ms
memory: 3752kb
input:
baabab bbbabb
output:
4 1 0 2 4 5 3 4 7
result:
ok Operations: 4
Test #34:
score: 10
Accepted
time: 0ms
memory: 3616kb
input:
bababa bbbabb
output:
4 2 3 4 0 1 5 6 3
result:
ok Operations: 4
Test #35:
score: 10
Accepted
time: 0ms
memory: 3552kb
input:
baabaa baabaa
output:
4 1 0 2 2 3 4 6 4
result:
ok Operations: 4
Test #36:
score: 10
Accepted
time: 0ms
memory: 3828kb
input:
bbbaba bababb
output:
4 0 1 4 1 2 5 6 3
result:
ok Operations: 4
Test #37:
score: 10
Accepted
time: 1ms
memory: 3620kb
input:
bababa bbabaa
output:
5 1 0 1 3 4 2 3 5 6 5
result:
ok Operations: 5
Test #38:
score: 10
Accepted
time: 0ms
memory: 3616kb
input:
babaab bbabab
output:
5 1 0 1 3 4 2 4 5 6 5
result:
ok Operations: 5
Test #39:
score: 10
Accepted
time: 0ms
memory: 3828kb
input:
bbabab bababa
output:
5 0 1 3 1 2 4 5 3 4 6
result:
ok Operations: 5
Test #40:
score: 10
Accepted
time: 0ms
memory: 3788kb
input:
bababa bababa
output:
6 1 0 1 2 3 2 3 4 5 4 5 6
result:
ok Operations: 6
Test #41:
score: 10
Accepted
time: 0ms
memory: 3464kb
input:
bbbbba aaaaaa
output:
1 5 6
result:
ok Operations: 1
Test #42:
score: 10
Accepted
time: 0ms
memory: 3612kb
input:
aabaaa bbbbbb
output:
2 2 6 7 2
result:
ok Operations: 2
Test #43:
score: 10
Accepted
time: 0ms
memory: 3816kb
input:
bbabba aaaaaa
output:
3 5 6 7 2 2 8
result:
ok Operations: 3
Test #44:
score: 10
Accepted
time: 0ms
memory: 3752kb
input:
abbaba bbbbbb
output:
3 4 6 7 1 2 9
result:
ok Operations: 3
Test #45:
score: 10
Accepted
time: 0ms
memory: 3556kb
input:
bbbbbb ababab
output:
3 6 3 1 7 8 2
result:
ok Operations: 3
Test #46:
score: 10
Accepted
time: 0ms
memory: 3788kb
input:
bbbaa aaaabb
output:
1 3 4
result:
ok Operations: 1
Test #47:
score: 10
Accepted
time: 0ms
memory: 3536kb
input:
bbbbba aabaaa
output:
2 5 2 3 6
result:
ok Operations: 2
Test #48:
score: 10
Accepted
time: 0ms
memory: 3752kb
input:
bbaaaa aababb
output:
3 2 2 6 3 3 7
result:
ok Operations: 3
Test #49:
score: 10
Accepted
time: 0ms
memory: 3592kb
input:
bbbbaa abbaba
output:
3 4 4 1 5 7 2
result:
ok Operations: 3
Test #50:
score: 10
Accepted
time: 0ms
memory: 3552kb
input:
bababa aaaabb
output:
3 3 4 5 1 2 6
result:
ok Operations: 3
Test #51:
score: 10
Accepted
time: 0ms
memory: 3596kb
input:
bbaaab abaaaa
output:
2 2 1 4 3
result:
ok Operations: 2
Test #52:
score: 10
Accepted
time: 0ms
memory: 3528kb
input:
baabaa aabba
output:
3 1 2 4 3 4 5
result:
ok Operations: 3
Test #53:
score: 10
Accepted
time: 0ms
memory: 3616kb
input:
babbab abbbaa
output:
4 1 1 2 4 6 4 5 6
result:
ok Operations: 4
Test #54:
score: 10
Accepted
time: 0ms
memory: 3516kb
input:
aaabba bababa
output:
4 3 3 1 4 5 2 5 6
result:
ok Operations: 4
Test #55:
score: 10
Accepted
time: 0ms
memory: 3600kb
input:
aabbab baaaba
output:
3 2 1 3 5 6 4
result:
ok Operations: 3
Test #56:
score: 10
Accepted
time: 0ms
memory: 3816kb
input:
baabab aabbab
output:
4 1 2 4 3 4 5 6 5
result:
ok Operations: 4
Test #57:
score: 10
Accepted
time: 0ms
memory: 3812kb
input:
bbabba ababab
output:
5 2 1 2 3 5 3 4 6 6 5
result:
ok Operations: 5
Test #58:
score: 10
Accepted
time: 0ms
memory: 3536kb
input:
aababa baabab
output:
4 2 1 2 4 5 3 4 6
result:
ok Operations: 4
Test #59:
score: 10
Accepted
time: 1ms
memory: 3784kb
input:
babaab ababab
output:
5 1 1 2 2 3 3 5 4 5 6
result:
ok Operations: 5
Test #60:
score: 10
Accepted
time: 0ms
memory: 3488kb
input:
ababab bababa
output:
5 1 1 2 2 3 3 4 4 5 5
result:
ok Operations: 5
Subtask #3:
score: 20
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Test #61:
score: 20
Accepted
time: 0ms
memory: 3616kb
input:
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
output:
0
result:
ok Operations: 0
Test #62:
score: 20
Accepted
time: 0ms
memory: 3752kb
input:
bababababababababababababababababababababababababa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
output:
25 25 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24
result:
ok Operations: 25
Test #63:
score: 20
Accepted
time: 0ms
memory: 3752kb
input:
aaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ababababababababababababababababababababababababab
output:
26 0 25 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 44 25
result:
ok Operations: 26
Test #64:
score: 20
Accepted
time: 0ms
memory: 3828kb
input:
bbbbbbbbbbbbbbbbbbbbbbbbbbbbaabbbbbbbbbbbbbbbbbbbb bababababababababababababababababababababababababa
output:
26 28 24 0 29 30 1 2 31 32 3 4 33 34 5 6 35 36 7 8 37 38 9 10 39 40 11 12 41 42 13 14 43 44 15 16 45 46 17 18 47 48 19 20 49 50 21 22 51 52 23 26 53
result:
ok Operations: 26
Test #65:
score: 20
Accepted
time: 0ms
memory: 3604kb
input:
bababababababababababababababababababababababababa bbbbbbbbbbbbbbbbbbbaaaaaaaaabbbbbbbbbbbbbbbbbbbbaa
output:
27 23 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 42 43 32 33 63 64 35
result:
ok Operations: 27
Test #66:
score: 20
Accepted
time: 1ms
memory: 3552kb
input:
ababababababababababababababababababababababababa aabbbabbbbabbbaabbbabbaabaaaaabaaabaabaababbaaba
output:
37 13 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 15 16 16 17 17 18 21 22 19 20 25 26 22 23 29 30 24 25 32 33 27 28 34 35 33 34 36 37 37 38 38 39 40 41 40 41 43 44 42 43 45 46 45 46 48 49 47
result:
ok Operations: 37
Test #67:
score: 20
Accepted
time: 0ms
memory: 3608kb
input:
bababababababababababababababababababababababababa bababababababababababababababababababababababababa
output:
50 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50
result:
ok Operations: 50
Test #68:
score: 20
Accepted
time: 0ms
memory: 3592kb
input:
ababababababababababababababababababababababababab ababababababababababababababababababababababaababa
output:
49 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 47 48 46 47 49 50 48
result:
ok Operations: 49
Test #69:
score: 20
Accepted
time: 0ms
memory: 3544kb
input:
ababababababababababababababbababababababababababa abababababababababababababababababaabababababababa
output:
49 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 37 38 37 38 39 40 39 40 41 42 41 42 43 44 43 44 45 46 45 46 47 48 47 48 49 50 49
result:
ok Operations: 49
Test #70:
score: 20
Accepted
time: 0ms
memory: 3620kb
input:
abababababababababababababaabababababababbabababab ababababababababababababababababababababababababab
output:
49 0 1 2 1 2 3 4 3 4 5 6 5 6 7 8 7 8 9 10 9 10 11 12 11 12 13 14 13 14 15 16 15 16 17 18 17 18 19 20 19 20 21 22 21 22 23 24 23 24 25 26 25 26 27 29 27 28 30 31 29 30 32 33 31 32 34 35 33 34 36 37 35 36 38 39 37 38 40 41 39 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50
result:
ok Operations: 49
Test #71:
score: 20
Accepted
time: 0ms
memory: 3536kb
input:
bababababababababababababababababababababababababa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
output:
25 25 49 50 1 2 51 52 3 4 53 54 5 6 55 56 7 8 57 58 9 10 59 60 11 12 61 62 13 14 63 64 15 16 65 66 17 18 67 68 19 20 69 70 21 22 71 72 23 24 73
result:
ok Operations: 25
Test #72:
score: 20
Accepted
time: 0ms
memory: 3784kb
input:
bababababababababababababababababababababababababa aaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
output:
25 25 14 15 1 2 16 17 3 4 18 19 5 6 20 21 7 8 22 23 9 10 24 25 11 12 26 27 13 14 28 29 15 16 30 31 17 18 32 33 19 20 34 35 21 22 36 37 23 24 38
result:
ok Operations: 25
Test #73:
score: 20
Accepted
time: 0ms
memory: 3528kb
input:
bbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbb ababababababababababababababababababababababababab
output:
26 14 25 1 15 16 2 3 17 18 4 5 19 20 6 7 21 22 8 9 23 24 10 11 25 26 12 13 27 28 14 15 29 30 16 17 31 32 18 19 33 34 20 21 35 36 22 23 37 38 24 46 39
result:
ok Operations: 26
Test #74:
score: 20
Accepted
time: 0ms
memory: 3620kb
input:
bababababababababababababababababababababababababa aaabbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaabbbbb
output:
27 23 3 4 1 2 5 6 3 4 7 8 5 6 9 10 7 8 11 12 9 10 13 14 11 12 15 16 13 14 17 18 15 16 19 20 17 18 21 22 19 20 23 24 21 22 25 26 50 51 41 42 56 57 42
result:
ok Operations: 27
Test #75:
score: 20
Accepted
time: 0ms
memory: 3532kb
input:
ababababababababababababababababababababababababa babbaaaabbbbabbaaabbaabbaaababbaaaabaababaabaaab
output:
36 13 1 2 1 2 3 4 3 4 5 6 5 6 7 8 7 8 9 10 9 10 11 12 11 12 13 14 14 15 16 17 19 20 21 22 21 22 24 25 25 26 27 28 28 29 30 31 32 33 32 33 34 35 35 36 39 40 37 38 42 43 39 40 44 45 41 42 47 48 43 44 51
result:
ok Operations: 36
Test #76:
score: 20
Accepted
time: 0ms
memory: 3824kb
input:
ababababababababababababababababababababababababab bababababababababababababababababababababababababa
output:
49 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49
result:
ok Operations: 49
Test #77:
score: 20
Accepted
time: 1ms
memory: 3532kb
input:
ababababababababababababababababababababababababab babababababababaababababababababababababababababab
output:
49 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 17 18 17 18 19 20 19 20 21 22 21 22 23 24 23 24 25 26 25 26 27 28 27 28 29 30 29 30 31 32 31 32 33 34 33 34 35 36 35 36 37 38 37 38 39 40 39 40 41 42 41 42 43 44 43 44 45 46 45 46 47 48 47 48 49 50 49
result:
ok Operations: 49
Test #78:
score: 20
Accepted
time: 0ms
memory: 3532kb
input:
bababbabababababababababababababababababababababab abababababababababababbabababababababababababababa
output:
48 1 1 2 2 3 3 4 4 6 5 6 7 8 7 8 9 10 9 10 11 12 11 12 13 14 13 14 15 16 15 16 17 18 17 18 19 20 19 20 21 22 21 22 24 25 23 24 26 27 25 26 28 29 27 28 30 31 29 30 32 33 31 32 34 35 33 34 36 37 35 36 38 39 37 38 40 41 39 40 42 43 41 42 44 45 43 44 46 47 45 46 48 49 47 48 50
result:
ok Operations: 48
Test #79:
score: 20
Accepted
time: 0ms
memory: 3532kb
input:
bababababababababababababababababababababababababa aabababababababababababababababababababababababaab
output:
49 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 49 50 48 49 50
result:
ok Operations: 49
Subtask #4:
score: 20
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Test #80:
score: 20
Accepted
time: 0ms
memory: 3480kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
0
result:
ok Operations: 0
Test #81:
score: 20
Accepted
time: 0ms
memory: 3832kb
input:
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb babababababababababababababababababababababababab...
output:
125 0 125 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52...
result:
ok Operations: 125
Test #82:
score: 20
Accepted
time: 0ms
memory: 3816kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb ababababababababababababababababababababababababa...
output:
126 0 125 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52...
result:
ok Operations: 126
Test #83:
score: 20
Accepted
time: 1ms
memory: 3536kb
input:
ababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
126 124 146 147 0 1 148 149 2 3 150 151 4 5 152 153 6 7 154 155 8 9 156 157 10 11 158 159 12 13 160 161 14 15 162 163 16 17 164 165 18 19 166 167 20 21 168 169 22 23 170 171 24 25 172 173 26 27 174 175 28 29 176 177 30 31 178 179 32 33 180 181 34 35 182 183 36 37 184 185 38 39 186 187 40 41 188 189 ...
result:
ok Operations: 126
Test #84:
score: 20
Accepted
time: 0ms
memory: 3760kb
input:
bababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa bbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
127 123 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52...
result:
ok Operations: 127
Test #85:
score: 20
Accepted
time: 0ms
memory: 3624kb
input:
ababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab ababababababababababababababababababababababababa...
output:
250 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 53 ...
result:
ok Operations: 250
Test #86:
score: 20
Accepted
time: 1ms
memory: 3596kb
input:
ababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab ababababababababababababababababababaabababababab...
output:
249 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 39 40 38 39 41 42 40 41 43 44 42 43 45 46 44 45 47 48 46 47 49 50 48 49 51 52 50 51 53 54 ...
result:
ok Operations: 249
Test #87:
score: 20
Accepted
time: 0ms
memory: 3628kb
input:
abababababababababababababababababababababababababababababababababababababababababaabababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa ababababababababababababababababababababababababa...
output:
249 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 53 ...
result:
ok Operations: 249
Test #88:
score: 20
Accepted
time: 0ms
memory: 3828kb
input:
bababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababaabababababababababababababababababababababababababa bababaabaaaaabababbaababbbbbbabbabbabbbbbabbaaabba...
output:
199 49 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 50 51 50 51 52 53 ...
result:
ok Operations: 199
Test #89:
score: 20
Accepted
time: 0ms
memory: 3492kb
input:
abababababaabbaaabababababababbbaaababaaabbaababaababaabababaabaababbabababaababaabababababaabbabaabaabbabababbabbaaabaabababababababaababbaabaababbbabababaaabaabaabbababababbabaabaababbabbaababababaabbababaaabbaababaabaababababababbaabaabababbababba aaaaaaaaaaaabbbaaabaaaaabbbbbbbbbbbaaaaaaaaaaabbb...
output:
111 105 0 1 1 2 2 3 3 4 4 6 5 6 7 9 7 10 10 11 11 13 12 13 15 16 15 16 19 20 17 18 21 22 19 20 23 24 21 22 25 26 23 24 27 28 25 26 29 31 27 28 32 33 31 33 36 38 34 35 39 41 36 37 44 45 39 42 47 48 43 44 49 50 45 46 52 53 47 48 54 57 49 50 59 61 51 52 62 64 53 55 65 66 56 57 68 69 58 59 71 72 60 61 7...
result:
ok Operations: 111
Test #90:
score: 20
Accepted
time: 0ms
memory: 3792kb
input:
ababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
125 125 250 251 1 2 252 253 3 4 254 255 5 6 256 257 7 8 258 259 9 10 260 261 11 12 262 263 13 14 264 265 15 16 266 267 17 18 268 269 19 20 270 271 21 22 272 273 23 24 274 275 25 26 276 277 27 28 278 279 29 30 280 281 31 32 282 283 33 34 284 285 35 36 286 287 37 38 288 289 39 40 290 291 41 42 292 293...
result:
ok Operations: 125
Test #91:
score: 20
Accepted
time: 0ms
memory: 3536kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb babababababababababababababababababababababababab...
output:
125 205 125 1 206 207 2 3 208 209 4 5 210 211 6 7 212 213 8 9 214 215 10 11 216 217 12 13 218 219 14 15 220 221 16 17 222 223 18 19 224 225 20 21 226 227 22 23 228 229 24 25 230 231 26 27 232 233 28 29 234 235 30 31 236 237 32 33 238 239 34 35 240 241 36 37 242 243 38 39 244 245 40 41 246 247 42 43 ...
result:
ok Operations: 125
Test #92:
score: 20
Accepted
time: 0ms
memory: 3604kb
input:
aaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa babababababababababababababababababababababababab...
output:
126 5 125 1 6 7 2 3 8 9 4 5 10 11 6 7 12 13 8 9 14 15 10 11 16 17 12 13 18 19 14 15 20 21 16 17 22 23 18 19 24 25 20 21 26 27 22 23 28 29 24 25 30 31 26 27 32 33 28 29 34 35 30 31 36 37 32 33 38 39 34 35 40 41 36 37 42 43 38 39 44 45 40 41 46 47 42 43 48 49 44 45 50 51 46 47 52 53 48 49 54 55 50 51 ...
result:
ok Operations: 126
Test #93:
score: 20
Accepted
time: 0ms
memory: 3552kb
input:
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ababababababababababababababababababababababababa...
output:
127 124 123 1 125 126 2 3 127 128 4 5 129 130 6 7 131 132 8 9 133 134 10 11 135 136 12 13 137 138 14 15 139 140 16 17 141 142 18 19 143 144 20 21 145 146 22 23 147 148 24 25 149 150 26 27 151 152 28 29 153 154 30 31 155 156 32 33 157 158 34 35 159 160 36 37 161 162 38 39 163 164 40 41 165 166 42 43 ...
result:
ok Operations: 127
Test #94:
score: 20
Accepted
time: 1ms
memory: 3832kb
input:
bababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa ababababababababababababababababababababababababa...
output:
249 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53...
result:
ok Operations: 249
Test #95:
score: 20
Accepted
time: 0ms
memory: 3624kb
input:
ababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab babababababababababababababababababababababababab...
output:
249 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53...
result:
ok Operations: 249
Test #96:
score: 20
Accepted
time: 1ms
memory: 3608kb
input:
bababababababababababababababababababababababababababababababababaabababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab ababababababababababbabababababababababababababab...
output:
248 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 21 22 21 22 23 24 23 24 25 26 25 26 27 28 27 28 29 30 29 30 31 32 31 32 33 34 33 34 35 36 35 36 37 38 37 38 39 40 39 40 41 42 41 42 43 44 43 44 45 46 45 46 47 48 47 48 49 50 49 50 51 52 51 52 53 54...
result:
ok Operations: 248
Test #97:
score: 20
Accepted
time: 1ms
memory: 3492kb
input:
ababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababbabababababababab bababbaababbbababababaabaabbbbabbaaaababbbababaaab...
output:
199 49 1 2 1 2 3 4 3 4 5 6 5 6 7 8 7 8 9 10 9 10 11 12 11 12 13 14 13 14 15 16 15 16 17 18 17 18 19 20 19 20 21 22 21 22 23 24 23 24 25 26 25 26 27 28 27 28 29 30 29 30 31 32 31 32 33 34 33 34 35 36 35 36 37 38 37 38 39 40 39 40 41 42 41 42 43 44 43 44 45 46 45 46 47 48 47 48 49 50 50 51 51 52 52 53...
result:
ok Operations: 199
Test #98:
score: 20
Accepted
time: 0ms
memory: 3820kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbaaaaaaaaabbbbbaabbbbbbbbbbbaaaabbbaaaabbbbbbbbabbbaaaaaaaaaabbbbbaaaaaaaaaaaabbbbbbbbbaaabbbbbbbbbbbbbbbaaaaaaaaaaaaaaaabaaaaaaaaaaabbbbbbbbbbbbbbbbbaaaaaabbbbbbbbaaaaabbbbbbbbbbbbaaaaaaaabbbbbbbbbbbbbaaabaaa baababababaabababbabababababbababababababababaaaba...
output:
110 31 103 1 32 34 2 3 36 37 4 5 38 39 7 8 41 42 9 10 43 45 11 12 46 47 14 15 48 49 17 19 50 51 20 21 52 53 22 23 54 55 24 25 57 58 28 29 59 60 30 32 64 65 33 34 66 67 35 36 69 70 37 38 71 72 39 40 73 74 44 45 75 76 46 47 77 78 49 50 80 81 52 53 82 85 56 57 86 87 58 59 89 90 61 62 91 93 63 64 94 95 ...
result:
ok Operations: 110
Subtask #5:
score: 20
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Test #99:
score: 20
Accepted
time: 0ms
memory: 3632kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
0
result:
ok Operations: 0
Test #100:
score: 20
Accepted
time: 1ms
memory: 3652kb
input:
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
1001 2000 1000 0 2001 2002 1 2 2003 2004 3 4 2005 2006 5 6 2007 2008 7 8 2009 2010 9 10 2011 2012 11 12 2013 2014 13 14 2015 2016 15 16 2017 2018 17 18 2019 2020 19 20 2021 2022 21 22 2023 2024 23 24 2025 2026 25 26 2027 2028 27 28 2029 2030 29 30 2031 2032 31 32 2033 2034 33 34 2035 2036 35 36 2037...
result:
ok Operations: 1001
Test #101:
score: 20
Accepted
time: 1ms
memory: 3800kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
1001 999 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 5...
result:
ok Operations: 1001
Test #102:
score: 20
Accepted
time: 0ms
memory: 3660kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
1001 0 999 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 5...
result:
ok Operations: 1001
Test #103:
score: 20
Accepted
time: 1ms
memory: 3864kb
input:
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
1002 0 999 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 5...
result:
ok Operations: 1002
Test #104:
score: 20
Accepted
time: 1ms
memory: 3700kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
2000 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 53...
result:
ok Operations: 2000
Test #105:
score: 20
Accepted
time: 1ms
memory: 3612kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
1999 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 53...
result:
ok Operations: 1999
Test #106:
score: 20
Accepted
time: 1ms
memory: 3564kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
1999 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 53...
result:
ok Operations: 1999
Test #107:
score: 20
Accepted
time: 1ms
memory: 3608kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
1998 0 1 2 1 2 3 4 3 4 5 6 5 6 7 8 7 8 9 10 9 10 11 12 11 12 13 14 13 14 15 16 15 16 17 18 17 18 19 20 19 20 21 22 21 22 23 24 23 24 25 26 25 26 27 28 27 28 29 30 29 30 31 32 31 32 33 34 33 34 35 36 35 36 37 38 37 38 39 40 39 40 41 42 41 42 43 44 43 44 45 46 45 46 47 48 47 48 49 50 49 50 51 52 51 52...
result:
ok Operations: 1998
Test #108:
score: 20
Accepted
time: 1ms
memory: 3656kb
input:
aaaaaaaaabbbbaaaaaabbbbbbaaaaabbbbbbbbbbbbbbbbbbbbbbaaabbbbaaaabaabbabbaaaabbbaaaaaaaaaabbbbbbaaaabbbbbbbbbbbbbabbbbbbbaaaabbbbbbbaaaaaabbbbbbbbbbbabbbaaababbaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbaaaaaabbbbbbbbbbbbaaabbbbbbbbaaaaaaabbaaaaaaaaabbbbbbbaabaaaaaaaaaaaaaaaaabbbbbbbbb...
output:
1114 0 850 2 2 3 3 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 14 12 13 15 16 14 15 17 18 16 17 19 20 18 19 21 22 20 21 23 24 22 23 25 26 24 25 27 28 26 27 29 30 28 29 31 32 30 31 33 34 33 36 35 36 37 38 37 39 39 40 40 41 41 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 53 52 53 54 55 54 55 5...
result:
ok Operations: 1114
Test #109:
score: 20
Accepted
time: 1ms
memory: 3648kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
1001 1001 2000 2001 1 2 2002 2003 3 4 2004 2005 5 6 2006 2007 7 8 2008 2009 9 10 2010 2011 11 12 2012 2013 13 14 2014 2015 15 16 2016 2017 17 18 2018 2019 19 20 2020 2021 21 22 2022 2023 23 24 2024 2025 25 26 2026 2027 27 28 2028 2029 29 30 2030 2031 31 32 2032 2033 33 34 2034 2035 35 36 2036 2037 3...
result:
ok Operations: 1001
Test #110:
score: 20
Accepted
time: 1ms
memory: 3532kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
1001 999 1890 1891 1 2 1892 1893 3 4 1894 1895 5 6 1896 1897 7 8 1898 1899 9 10 1900 1901 11 12 1902 1903 13 14 1904 1905 15 16 1906 1907 17 18 1908 1909 19 20 1910 1911 21 22 1912 1913 23 24 1914 1915 25 26 1916 1917 27 28 1918 1919 29 30 1920 1921 31 32 1922 1923 33 34 1924 1925 35 36 1926 1927 37...
result:
ok Operations: 1001
Test #111:
score: 20
Accepted
time: 1ms
memory: 3576kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
1001 999 300 301 1 2 302 303 3 4 304 305 5 6 306 307 7 8 308 309 9 10 310 311 11 12 312 313 13 14 314 315 15 16 316 317 17 18 318 319 19 20 320 321 21 22 322 323 23 24 324 325 25 26 326 327 27 28 328 329 29 30 330 331 31 32 332 333 33 34 334 335 35 36 336 337 37 38 338 339 39 40 340 341 41 42 342 34...
result:
ok Operations: 1001
Test #112:
score: 20
Accepted
time: 1ms
memory: 3644kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
1001 559 999 1 560 561 2 3 562 563 4 5 564 565 6 7 566 567 8 9 568 569 10 11 570 571 12 13 572 573 14 15 574 575 16 17 576 577 18 19 578 579 20 21 580 581 22 23 582 583 24 25 584 585 26 27 586 587 28 29 588 589 30 31 590 591 32 33 592 593 34 35 594 595 36 37 596 597 38 39 598 599 40 41 600 601 42 43...
result:
ok Operations: 1001
Test #113:
score: 20
Accepted
time: 1ms
memory: 3688kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
1999 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...
result:
ok Operations: 1999
Test #114:
score: 20
Accepted
time: 1ms
memory: 3628kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
1999 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...
result:
ok Operations: 1999
Test #115:
score: 20
Accepted
time: 1ms
memory: 3600kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
1998 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...
result:
ok Operations: 1998
Test #116:
score: 20
Accepted
time: 1ms
memory: 3668kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
1998 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...
result:
ok Operations: 1998
Test #117:
score: 20
Accepted
time: 0ms
memory: 3608kb
input:
abababababababababababababaababaabababababababababababababababababababaababababababababababababababababababababababababababababababababababaabababababababababababababababababababababababababababbabababababababaababababababababababababababababababababababababaabababbabababababababababababababbabababa...
output:
1114 832 6 7 1 2 8 9 3 4 10 11 5 6 12 13 7 8 14 16 9 10 17 18 11 12 19 20 13 14 21 22 15 16 23 24 17 18 25 26 19 20 27 28 21 22 29 30 23 24 31 32 25 26 33 34 28 29 35 37 30 31 38 39 33 34 40 41 35 36 42 43 37 38 44 45 39 40 46 47 41 42 48 49 43 44 50 51 45 46 52 53 47 48 54 55 49 50 56 57 51 52 58 5...
result:
ok Operations: 1114
Subtask #6:
score: 25
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Test #118:
score: 25
Accepted
time: 2ms
memory: 3672kb
input:
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
0
result:
ok Operations: 0
Test #119:
score: 25
Accepted
time: 14ms
memory: 6948kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
100001 200000 100000 0 200001 200002 1 2 200003 200004 3 4 200005 200006 5 6 200007 200008 7 8 200009 200010 9 10 200011 200012 11 12 200013 200014 13 14 200015 200016 15 16 200017 200018 17 18 200019 200020 19 20 200021 200022 21 22 200023 200024 23 24 200025 200026 25 26 200027 200028 27 28 200029...
result:
ok Operations: 100001
Test #120:
score: 25
Accepted
time: 17ms
memory: 6852kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
100001 99999 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 ...
result:
ok Operations: 100001
Test #121:
score: 25
Accepted
time: 17ms
memory: 7028kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
100001 0 99999 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 ...
result:
ok Operations: 100001
Test #122:
score: 25
Accepted
time: 13ms
memory: 6984kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
100002 99999 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 ...
result:
ok Operations: 100002
Test #123:
score: 25
Accepted
time: 13ms
memory: 6972kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
100002 99998 4940 4941 0 1 4942 4943 2 3 4944 4945 4 5 4946 4947 6 7 4948 4949 8 9 4950 4951 10 11 4952 4953 12 13 4954 4955 14 15 4956 4957 16 17 4958 4959 18 19 4960 4961 20 21 4962 4963 22 23 4964 4965 24 25 4966 4967 26 27 4968 4969 28 29 4970 4971 30 31 4972 4973 32 33 4974 4975 34 35 4976 4977...
result:
ok Operations: 100002
Test #124:
score: 25
Accepted
time: 25ms
memory: 8092kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
150000 50000 1 2 0 1 3 4 2 3 5 6 4 5 7 8 6 7 9 10 8 9 11 12 10 11 13 14 12 13 15 16 14 15 17 18 16 17 19 20 18 19 21 22 20 21 23 24 22 23 25 26 24 25 27 28 26 27 29 30 28 29 31 32 30 31 33 34 32 33 35 36 34 35 37 38 36 37 39 40 38 39 41 42 40 41 43 44 42 43 45 46 44 45 47 48 46 47 49 50 48 49 51 52 ...
result:
ok Operations: 150000
Test #125:
score: 25
Accepted
time: 23ms
memory: 8932kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
200000 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 ...
result:
ok Operations: 200000
Test #126:
score: 25
Accepted
time: 28ms
memory: 8892kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
199999 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 ...
result:
ok Operations: 199999
Test #127:
score: 25
Accepted
time: 22ms
memory: 8792kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
199999 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 ...
result:
ok Operations: 199999
Test #128:
score: 25
Accepted
time: 27ms
memory: 9040kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
199999 1 0 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 ...
result:
ok Operations: 199999
Test #129:
score: 25
Accepted
time: 30ms
memory: 8840kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
199998 1 2 0 2 3 1 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 ...
result:
ok Operations: 199998
Test #130:
score: 25
Accepted
time: 19ms
memory: 9992kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
199998 3 0 1 1 2 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51 52 ...
result:
ok Operations: 199998
Test #131:
score: 25
Accepted
time: 18ms
memory: 6236kb
input:
aaababbaabbbbaababababababbbabbaaaababbabababbabaabbbabbabbbbabaaabbbaaabbababbaabbbaabbbababbaabbabaababbbaaaabbbababbbabbabaaaabbbababababaababaababbaabbbbbbabbaaabbbaaaababababaaabbbabbbaabaabbabaabababaaabaaabaaabababaabababbbaaababaaabaabbbbababaababbababbabaabbbaababababbbababaabbababbbabbbbaa...
output:
101948 32114 0 3 3 4 4 5 5 6 7 8 8 10 12 13 12 13 14 15 14 15 16 18 16 17 19 21 18 20 22 23 21 22 24 25 23 27 28 29 28 32 31 32 36 38 33 35 39 40 37 38 41 42 39 41 43 48 42 43 49 50 45 48 51 53 49 52 55 56 55 56 57 58 58 59 59 60 63 64 61 62 65 66 65 67 69 70 70 72 72 73 73 74 74 75 75 79 77 80 81 8...
result:
ok Operations: 101948
Test #132:
score: 25
Accepted
time: 18ms
memory: 7148kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
100001 200000 100001 1 200001 200002 2 3 200003 200004 4 5 200005 200006 6 7 200007 200008 8 9 200009 200010 10 11 200011 200012 12 13 200013 200014 14 15 200015 200016 16 17 200017 200018 18 19 200019 200020 20 21 200021 200022 22 23 200023 200024 24 25 200025 200026 26 27 200027 200028 28 29 20002...
result:
ok Operations: 100001
Test #133:
score: 25
Accepted
time: 14ms
memory: 6968kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
100001 99999 121207 121208 1 2 121209 121210 3 4 121211 121212 5 6 121213 121214 7 8 121215 121216 9 10 121217 121218 11 12 121219 121220 13 14 121221 121222 15 16 121223 121224 17 18 121225 121226 19 20 121227 121228 21 22 121229 121230 23 24 121231 121232 25 26 121233 121234 27 28 121235 121236 29...
result:
ok Operations: 100001
Test #134:
score: 25
Accepted
time: 10ms
memory: 7024kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
100001 74153 99999 1 74154 74155 2 3 74156 74157 4 5 74158 74159 6 7 74160 74161 8 9 74162 74163 10 11 74164 74165 12 13 74166 74167 14 15 74168 74169 16 17 74170 74171 18 19 74172 74173 20 21 74174 74175 22 23 74176 74177 24 25 74178 74179 26 27 74180 74181 28 29 74182 74183 30 31 74184 74185 32 33...
result:
ok Operations: 100001
Test #135:
score: 25
Accepted
time: 13ms
memory: 7032kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
100001 99999 86958 86959 1 2 86960 86961 3 4 86962 86963 5 6 86964 86965 7 8 86966 86967 9 10 86968 86969 11 12 86970 86971 13 14 86972 86973 15 16 86974 86975 17 18 86976 86977 19 20 86978 86979 21 22 86980 86981 23 24 86982 86983 25 26 86984 86985 27 28 86986 86987 29 30 86988 86989 31 32 86990 86...
result:
ok Operations: 100001
Test #136:
score: 25
Accepted
time: 13ms
memory: 6968kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
100002 99999 13939 13940 1 2 13941 13942 3 4 13943 13944 5 6 13945 13946 7 8 13947 13948 9 10 13949 13950 11 12 13951 13952 13 14 13953 13954 15 16 13955 13956 17 18 13957 13958 19 20 13959 13960 21 22 13961 13962 23 24 13963 13964 25 26 13965 13966 27 28 13967 13968 29 30 13969 13970 31 32 13971 13...
result:
ok Operations: 100002
Test #137:
score: 25
Accepted
time: 20ms
memory: 7956kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
150000 1 50001 1 2 3 2 3 4 5 4 5 6 7 6 7 8 9 8 9 10 11 10 11 12 13 12 13 14 15 14 15 16 17 16 17 18 19 18 19 20 21 20 21 22 23 22 23 24 25 24 25 26 27 26 27 28 29 28 29 30 31 30 31 32 33 32 33 34 35 34 35 36 37 36 37 38 39 38 39 40 41 40 41 42 43 42 43 44 45 44 45 46 47 46 47 48 49 48 49 50 51 50 51...
result:
ok Operations: 150000
Test #138:
score: 25
Accepted
time: 26ms
memory: 9000kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
199999 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52...
result:
ok Operations: 199999
Test #139:
score: 25
Accepted
time: 31ms
memory: 8852kb
input:
babababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...
output:
199998 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52...
result:
ok Operations: 199998
Test #140:
score: 25
Accepted
time: 23ms
memory: 8924kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
199999 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52...
result:
ok Operations: 199999
Test #141:
score: 25
Accepted
time: 27ms
memory: 8860kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
199999 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52...
result:
ok Operations: 199999
Test #142:
score: 25
Accepted
time: 27ms
memory: 8984kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
199998 1 3 1 2 3 2 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52...
result:
ok Operations: 199998
Test #143:
score: 25
Accepted
time: 27ms
memory: 8816kb
input:
abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
199997 3 1 2 1 2 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52...
result:
ok Operations: 199997
Test #144:
score: 25
Accepted
time: 14ms
memory: 6216kb
input:
aaabaaaababababbaabababbabaaaaaabbaabababbaabbbabaabaaaabbaabbbabbaaababbbaabbbbaabaabaaabaabaabaabababaaaabaaabaabbbbabbababbbabbaababababbabbaabbbbabaaababbbabbabaaaabbabaabaaaabbbababaaaabaababababbaabbbbababababaaabaabbbbabaaababbbababababbaaabaaaabaabbaababbaababbabbabbababababbababbbabbbbaaaaa...
output:
101948 32038 3 4 3 4 5 6 8 9 7 9 10 11 10 11 12 13 12 14 14 15 16 17 17 19 18 19 20 22 20 21 23 31 23 24 32 33 25 28 39 42 30 31 44 45 32 34 46 48 35 38 49 52 40 41 54 56 44 45 57 58 46 52 60 62 53 55 66 67 57 58 69 70 61 62 71 74 64 66 77 78 67 68 79 80 71 73 82 83 77 79 85 86 80 82 88 89 83 84 92 ...
result:
ok Operations: 101948
Extra Test:
score: 0
Extra Test Passed