QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#175219#7186. "Memo" Game With a HintmaspyAC ✓2ms3868kbC++2312.2kb2023-09-10 16:50:372023-09-10 16:50:37

Judging History

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

  • [2023-09-10 16:50:37]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3868kb
  • [2023-09-10 16:50:37]
  • 提交

answer

#line 1 "library/my_template.hpp"
#if defined(LOCAL)
#include <my_template_compiled.hpp>
#else
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using u32 = unsigned int;
using u64 = unsigned long long;
using i128 = __int128;
using u128 = unsigned __int128;
using f128 = __float128;

template <class T>
constexpr T infty = 0;
template <>
constexpr int infty<int> = 1'000'000'000;
template <>
constexpr ll infty<ll> = ll(infty<int>) * infty<int> * 2;
template <>
constexpr u32 infty<u32> = infty<int>;
template <>
constexpr u64 infty<u64> = infty<ll>;
template <>
constexpr i128 infty<i128> = i128(infty<ll>) * infty<ll>;
template <>
constexpr double infty<double> = infty<ll>;
template <>
constexpr long double infty<long double> = infty<ll>;

using pi = pair<ll, ll>;
using vi = vector<ll>;
template <class T>
using vc = vector<T>;
template <class T>
using vvc = vector<vc<T>>;
template <class T>
using vvvc = vector<vvc<T>>;
template <class T>
using vvvvc = vector<vvvc<T>>;
template <class T>
using vvvvvc = vector<vvvvc<T>>;
template <class T>
using pq = priority_queue<T>;
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;

#define vv(type, name, h, ...) \
  vector<vector<type>> name(h, vector<type>(__VA_ARGS__))
#define vvv(type, name, h, w, ...)   \
  vector<vector<vector<type>>> name( \
      h, vector<vector<type>>(w, vector<type>(__VA_ARGS__)))
#define vvvv(type, name, a, b, c, ...)       \
  vector<vector<vector<vector<type>>>> name( \
      a, vector<vector<vector<type>>>(       \
             b, vector<vector<type>>(c, vector<type>(__VA_ARGS__))))

// https://trap.jp/post/1224/
#define FOR1(a) for (ll _ = 0; _ < ll(a); ++_)
#define FOR2(i, a) for (ll i = 0; i < ll(a); ++i)
#define FOR3(i, a, b) for (ll i = a; i < ll(b); ++i)
#define FOR4(i, a, b, c) for (ll i = a; i < ll(b); i += (c))
#define FOR1_R(a) for (ll i = (a)-1; i >= ll(0); --i)
#define FOR2_R(i, a) for (ll i = (a)-1; i >= ll(0); --i)
#define FOR3_R(i, a, b) for (ll i = (b)-1; i >= ll(a); --i)
#define overload4(a, b, c, d, e, ...) e
#define overload3(a, b, c, d, ...) d
#define FOR(...) overload4(__VA_ARGS__, FOR4, FOR3, FOR2, FOR1)(__VA_ARGS__)
#define FOR_R(...) overload3(__VA_ARGS__, FOR3_R, FOR2_R, FOR1_R)(__VA_ARGS__)

#define FOR_subset(t, s) \
  for (ll t = (s); t >= 0; t = (t == 0 ? -1 : (t - 1) & (s)))
#define all(x) x.begin(), x.end()
#define len(x) ll(x.size())
#define elif else if

#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second

#define stoi stoll

int popcnt(int x) { return __builtin_popcount(x); }
int popcnt(u32 x) { return __builtin_popcount(x); }
int popcnt(ll x) { return __builtin_popcountll(x); }
int popcnt(u64 x) { return __builtin_popcountll(x); }
int popcnt_mod_2(int x) { return __builtin_parity(x); }
int popcnt_mod_2(u32 x) { return __builtin_parity(x); }
int popcnt_mod_2(ll x) { return __builtin_parityll(x); }
int popcnt_mod_2(u64 x) { return __builtin_parityll(x); }
// (0, 1, 2, 3, 4) -> (-1, 0, 1, 1, 2)
int topbit(int x) { return (x == 0 ? -1 : 31 - __builtin_clz(x)); }
int topbit(u32 x) { return (x == 0 ? -1 : 31 - __builtin_clz(x)); }
int topbit(ll x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
int topbit(u64 x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
// (0, 1, 2, 3, 4) -> (-1, 0, 1, 0, 2)
int lowbit(int x) { return (x == 0 ? -1 : __builtin_ctz(x)); }
int lowbit(u32 x) { return (x == 0 ? -1 : __builtin_ctz(x)); }
int lowbit(ll x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }
int lowbit(u64 x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }

template <typename T, typename U>
T ceil(T x, U y) {
  return (x > 0 ? (x + y - 1) / y : x / y);
}
template <typename T, typename U>
T floor(T x, U y) {
  return (x > 0 ? x / y : (x - y + 1) / y);
}
template <typename T, typename U>
pair<T, T> divmod(T x, U y) {
  T q = floor(x, y);
  return {q, x - q * y};
}

template <typename T, typename U>
T SUM(const vector<U> &A) {
  T sum = 0;
  for (auto &&a: A) sum += a;
  return sum;
}

#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define LB(c, x) distance((c).begin(), lower_bound(all(c), (x)))
#define UB(c, x) distance((c).begin(), upper_bound(all(c), (x)))
#define UNIQUE(x) \
  sort(all(x)), x.erase(unique(all(x)), x.end()), x.shrink_to_fit()

template <typename T>
T POP(deque<T> &que) {
  T a = que.front();
  que.pop_front();
  return a;
}
template <typename T>
T POP(pq<T> &que) {
  T a = que.top();
  que.pop();
  return a;
}
template <typename T>
T POP(pqg<T> &que) {
  assert(!que.empty());
  T a = que.top();
  que.pop();
  return a;
}
template <typename T>
T POP(vc<T> &que) {
  assert(!que.empty());
  T a = que.back();
  que.pop_back();
  return a;
}

template <typename F>
ll binary_search(F check, ll ok, ll ng, bool check_ok = true) {
  if (check_ok) assert(check(ok));
  while (abs(ok - ng) > 1) {
    auto x = (ng + ok) / 2;
    tie(ok, ng) = (check(x) ? mp(x, ng) : mp(ok, x));
  }
  return ok;
}
template <typename F>
double binary_search_real(F check, double ok, double ng, int iter = 100) {
  FOR(iter) {
    double x = (ok + ng) / 2;
    tie(ok, ng) = (check(x) ? mp(x, ng) : mp(ok, x));
  }
  return (ok + ng) / 2;
}

template <class T, class S>
inline bool chmax(T &a, const S &b) {
  return (a < b ? a = b, 1 : 0);
}
template <class T, class S>
inline bool chmin(T &a, const S &b) {
  return (a > b ? a = b, 1 : 0);
}

// ? は -1
vc<int> s_to_vi(const string &S, char first_char) {
  vc<int> A(S.size());
  FOR(i, S.size()) { A[i] = (S[i] != '?' ? S[i] - first_char : -1); }
  return A;
}

template <typename T, typename U>
vector<T> cumsum(vector<U> &A, int off = 1) {
  int N = A.size();
  vector<T> B(N + 1);
  FOR(i, N) { B[i + 1] = B[i] + A[i]; }
  if (off == 0) B.erase(B.begin());
  return B;
}

// stable sort
template <typename T>
vector<int> argsort(const vector<T> &A) {
  vector<int> ids(len(A));
  iota(all(ids), 0);
  sort(all(ids),
       [&](int i, int j) { return (A[i] == A[j] ? i < j : A[i] < A[j]); });
  return ids;
}

// A[I[0]], A[I[1]], ...
template <typename T>
vc<T> rearrange(const vc<T> &A, const vc<int> &I) {
  vc<T> B(len(I));
  FOR(i, len(I)) B[i] = A[I[i]];
  return B;
}
#endif
#line 1 "library/other/io2.hpp"
#define INT(...) \
  int __VA_ARGS__; \
  IN(__VA_ARGS__)
#define LL(...) \
  ll __VA_ARGS__; \
  IN(__VA_ARGS__)
#define STR(...) \
  string __VA_ARGS__; \
  IN(__VA_ARGS__)
#define CHR(...) \
  char __VA_ARGS__; \
  IN(__VA_ARGS__)
#define DBL(...) \
  long double __VA_ARGS__; \
  IN(__VA_ARGS__)

#define VEC(type, name, size) \
  vector<type> name(size);    \
  read(name)
#define VV(type, name, h, w)                     \
  vector<vector<type>> name(h, vector<type>(w)); \
  read(name)

void read(int &a) { cin >> a; }
void read(long long &a) { cin >> a; }
void read(char &a) { cin >> a; }
void read(double &a) { cin >> a; }
void read(long double &a) { cin >> a; }
void read(string &a) { cin >> a; }
template <class T, class S> void read(pair<T, S> &p) { read(p.first), read(p.second); }
template <class T> void read(vector<T> &a) {for(auto &i : a) read(i);}
template <class T> void read(T &a) { cin >> a; }
void IN() {}
template <class Head, class... Tail> void IN(Head &head, Tail &...tail) {
  read(head);
  IN(tail...);
}

template <typename T, typename U>
ostream& operator<<(ostream& os, const pair<T, U>& A) {
  os << A.fi << " " << A.se;
  return os;
}

template <typename T>
ostream& operator<<(ostream& os, const vector<T>& A) {
  for (size_t i = 0; i < A.size(); i++) {
    if(i) os << " ";
    os << A[i];
  }
  return os;
}

void print() {
  cout << "\n";
  cout.flush();
}

template <class Head, class... Tail>
void print(Head&& head, Tail&&... tail) {
  cout << head;
  if (sizeof...(Tail)) cout << " ";
  print(forward<Tail>(tail)...);
}

void YES(bool t = 1) { print(t ? "YES" : "NO"); }
void NO(bool t = 1) { YES(!t); }
void Yes(bool t = 1) { print(t ? "Yes" : "No"); }
void No(bool t = 1) { Yes(!t); }
void yes(bool t = 1) { print(t ? "yes" : "no"); }
void no(bool t = 1) { yes(!t); }
#line 2 "library/random/base.hpp"

u64 RNG_64() {
  static uint64_t x_
      = uint64_t(chrono::duration_cast<chrono::nanoseconds>(
                     chrono::high_resolution_clock::now().time_since_epoch())
                     .count())
        * 10150724397891781847ULL;
  x_ ^= x_ << 7;
  return x_ ^= x_ >> 9;
}

u64 RNG(u64 lim) { return RNG_64() % lim; }

ll RNG(ll l, ll r) { return l + RNG_64() % (r - l); }
#line 2 "library/random/shuffle.hpp"

template <typename T>
void shuffle(vc<T>& A) {
  FOR(i, len(A)) swap(A[i], A[RNG(0, i + 1)]);
}
#line 4 "main.cpp"

const int N = 50;

string prepare(string BOARD) {
  string INFO;
  /* 案1:A から L / M から Y
  for (auto&& ch: BOARD) {
    if ('A' <= ch && ch <= 'L') {
      INFO += '0';
    } else {
      INFO += '1';
    }
  }
  */
  // 案4
  string x(50, '?');
  FOR(i, 10) {
    int v = BOARD[i] - 'A';
    FOR(k, 5) { x[5 * i + k] = '0' + (v >> k & 1); }
  }
  return x;
}

// state
// 0: 未着手
// 1: 空けたことがあるが取られていない
// 2: 取得済
// int strategy(string BOARD, string INFO, vc<int> state, int pre) {
int strategy(string BOARD, vc<int> state, int pre) {
  if (pre != -1) {
    FOR(i, N) {
      if (i != pre && state[i] == 1 && BOARD[i] == BOARD[pre]) { return i; }
    }
    // 戦略ポイント!
    /* 何でもいいからとる
    FOR(i, N) {
      if (i != pre && state[i] == 0) return i;
    }
    */
    FOR(i, N) {
      if (i != pre && state[i] == 0) { return i; }
    }
  }
  // まだ空けたことがない場所があれば空ける
  FOR(i, N) if (state[i] == 0) return i;
  // ペアが作れるならば作れる
  FOR(i, N) FOR(j, i) {
    if (state[i] == 1 && state[j] == 1 && BOARD[i] == BOARD[j]) return i;
  }
  // 終わってるはず
  assert(MIN(state) == 2);
  return -1;
}

int test_play(string BOARD, string INFO) {
  vc<int> state(N, 0);
  FOR(i, 10) state[i] = 1;
  int miss = 0;
  while (1) {
    // int p = strategy(BOARD, INFO, state, -1);
    int p = strategy(BOARD, state, -1);
    if (p == -1) return miss;
    assert(state[p] != 2);
    state[p] = 1;
    // int q = strategy(BOARD, INFO, state, p);
    int q = strategy(BOARD, state, p);
    assert(state[q] != 2);
    state[q] = 1;
    if (BOARD[p] == BOARD[q]) {
      state[p] = state[q] = 2;
      continue;
    }
    ++miss;
    continue;
  }
}

void solve_prepare() {
  STR(S);
  string INFO = prepare(S);
  print(INFO);
}

void solve_play() {
#if defined(LOCAL)
  string INFO = "00000100000100011000001001010001100111000001010010";
#else
  STR(INFO);
#endif

  string BOARD(50, '?');
  vc<int> state(50);
  FOR(i, 10) state[i] = 1;
  FOR(i, 10) {
    int x = 0;
    FOR(k, 5) { x |= (INFO[5 * i + k] - '0') << k; }
    BOARD[i] = 'A' + x;
  }

  auto ask = [&](int p) -> void {
    print(1 + p);
#if defined(LOCAL)
    string god = "ABCDEFGHIJKLMNOPQRSTUVWXYABCDEFGHIJKLMNOPQRSTUVWXY";
    BOARD[p] = god[p];
    return;
#else
    STR(S);
    BOARD[p] = S[0];
#endif
  };

  int miss = 0;
  while (1) {
    int p = strategy(BOARD, state, -1);
    if (p == -1) return;
    assert(state[p] != 2);
    ask(p);
    state[p] = 1;

    int q = strategy(BOARD, state, p);
    assert(state[q] != 2);
    ask(q);
    state[q] = 1;

    if (BOARD[p] == BOARD[q]) {
      state[p] = state[q] = 2;
      continue;
    }
    ++miss;
    continue;
  }
  return;
}

void solve() {
  STR(S);
  if (S == "prepare") {
    INT(T);
    FOR(T) { solve_prepare(); }
  }
  elif (S == "play") {
    INT(T);
    FOR(T) { solve_play(); }
  }
}

void test() {
  int T = 10000;
  int total = 0;
  FOR(T) {
    vc<int> A;
    FOR(x, 25) A.eb(x), A.eb(x);
    shuffle(A);
    string BOARD;
    for (auto&& x: A) BOARD += 'A' + x;
    string INFO = prepare(BOARD);
    // print(INFO);
    int miss = test_play(BOARD, INFO);
    total += miss;
  }
  print(total / (T + 0.0));
}

signed main() {
  // test();
  solve();
  return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3800kb

First Run Input

prepare
2
ABCDEFGHIJKLMNOPQRSTUVWXYABCDEFGHIJKLMNOPQRSTUVWXY
AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYY

First Run Output

00000100000100011000001001010001100111000001010010
00000000001000010000010000100011000110000010000100

Second Run Input

play
2
00000100000100011000001001010001100111000001010010
K.
L-
M.
N-
O.
P-
Q.
R-
S.
T-
U.
V-
W.
X-
Y.
A-
B.
B+
C.
C+
D.
D+
E.
E+
F.
F+
G.
G+
H.
H+
I.
I+
J.
J+
K.
K+
L.
L+
M.
M+
N.
N+
O.
O+
P.
P+
Q.
Q+
R.
R+
S.
S+
T.
T+
U.
U+
V.
V+
W.
W+
X.
X+
Y.
Y+
A.
A!
00000000001000010000010000100011000110000010...

Second Run Output

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
2
28
3
29
4
30
5
31
6
32
7
33
8
34
9
35
10
36
11
37
12
38
13
39
14
40
15
41
16
42
17
43
18
44
19
45
20
46
21
47
22
48
23
49
24
50
25
26
1
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
37
38
39
40
41
42
43
44
45
46
47
...

result:

ok Correct! The number of the misses is 8 (2 test cases)

Test #2:

score: 100
Accepted
time: 1ms
memory: 3864kb

First Run Input

prepare
1
FNETFOMMJTYCXKCRYLGXKSPAIVQNBURJAPQHUDWSDWVIHGELBO

First Run Output

10100101100010011001101000111000110001101001011001

Second Run Input

play
1
10100101100010011001101000111000110001101001011001
Y.
C-
X.
K-
C.
C+
R.
Y-
L.
G-
X.
X+
K.
K+
S.
P-
A.
I-
V.
Q-
N.
N+
B.
U-
R.
R+
J.
J+
A.
A+
P.
P+
Q.
Q+
H.
U-
D.
W-
S.
S+
D.
D+
W.
W+
V.
V+
I.
I+
H.
H+
G.
G+
E.
E+
L.
L+
B.
B+
O.
O+
F.
F+
M.
M+
T.
T+
Y.
Y+
U.
U!

Second Run Output

11
12
13
14
15
12
16
17
18
19
20
13
21
14
22
23
24
25
26
27
28
2
29
30
31
16
32
9
33
24
34
23
35
27
36
37
38
39
40
22
41
38
42
39
43
26
44
25
45
36
46
19
47
3
48
18
49
29
50
6
5
1
8
7
10
4
17
11
37
30

result:

ok Correct! The number of the misses is 10 (1 test case)

Test #3:

score: 100
Accepted
time: 0ms
memory: 3628kb

First Run Input

prepare
50
FDAVHJWICNELMBTQGPMHCYSTUUKWOYBJNRLGEFXXSIVOAQDRKP
NPBEHYAERLSHAKCMGTQFUYXDVUIWDPBSOXCMFRJOJTNKIGLQWV
AEFGFISMPACJJYRBXUCKNOPEHODITLXWSMGVWBDQKLUQHRYVTN
CKFXOIQOLCSHAGDEUJTYBAVKWPMHDBJNRMFXTEYQUGVNPILWRS
JYIRTLMHQGUUAEDJXTSDCKPCXWPBAWHQRMGNLONVOYEKFVBIFS
IHDCXSWTUHOFXLGLGWJPACUVTBOESDMYAK...

First Run Output

10100110000000010101111001001001101000100100010110
10110111101000000100111000001100000001001000111010
00000001001010001100101000001001001001101111000000
01000010101010011101011100001000001011101101001000
10010000110001010001110011101000110111000000101100
000101110011000010001110101001011011100100101...

Second Run Input

play
50
10100110000000010101111001001001101000100100010110
E.
L-
M.
B-
T.
Q-
G.
P-
M.
M+
H.
H+
C.
C+
Y.
S-
T.
T+
U.
U+
K.
W-
O.
Y-
B.
B+
J.
J+
N.
N+
R.
L-
G.
G+
E.
E+
F.
F+
X.
X+
S.
S+
I.
I+
V.
V+
O.
O+
A.
A+
Q.
Q+
D.
D+
R.
R+
K.
K+
P.
P+
W.
W+
Y.
Y+
L.
L!
1011011110100000010011100000110000000100100...

Second Run Output

11
12
13
14
15
16
17
18
19
13
20
5
21
9
22
23
24
15
25
26
27
28
29
30
31
14
32
6
33
10
34
35
36
17
37
11
38
1
39
40
41
23
42
8
43
4
44
29
45
3
46
16
47
2
48
34
49
27
50
18
28
7
30
22
35
12
11
12
13
7
14
15
16
17
18
19
20
21
22
6
23
24
25
26
27
28
29
24
30
2
31
3
32
11
33
34
35
15
36
16
37
20
38
9
39...

result:

ok Correct! The number of the misses is 510 (50 test cases)

Test #4:

score: 100
Accepted
time: 2ms
memory: 3604kb

First Run Input

prepare
75
EAHSMUJLVDPNLEKPCNIICFRTMHYWVSTQBBWRXKFDXOJQUAGGOY
CUWYVQJPSRIDKXMKTFXTFDOJVWLBEMNULIAAPYCHNGHEOGSRQB
UJTQMFLPJRGSECWAHXDCIVRQOIEPANHUBYVGFKMKLDTSWYBNOX
EYOUSDBNEQXIPMFUJCYKJVLSVWOXKLCFWARPBTIHGTMNDRGHAQ
PBHANSDUVHNKYRQVMOBLQAXSEXOLYJRGTWCFKGMWPJIFTIEDCU
YREKISUWLRFFQDIWNUASLJXGMVHBXDMBJT...

First Run Output

00100000001110001001001100010110010110101010111000
01000001010110100011101010000110010111100100110001
00101100101100100001001101010011010111101001010001
00100000110111000101010011100010000101100010000001
11110100001110000000101100100111000001011010111100
000111000100100010100001001001001010110111010...

Second Run Input

play
75
00100000001110001001001100010110010110101010111000
P.
N-
L.
L+
E.
E+
K.
P-
C.
N-
I.
I+
C.
C+
F.
R-
T.
M-
H.
H+
Y.
W-
V.
V+
S.
S+
T.
T+
Q.
B-
B.
B+
W.
W+
R.
R+
X.
K-
F.
F+
D.
D+
X.
X+
O.
J-
Q.
Q+
U.
U+
A.
A+
G.
G+
O.
O+
Y.
Y+
P.
P+
N.
N+
M.
M+
K.
K+
J.
J!
0100000101011010001110101000011001011...

Second Run Output

11
12
13
8
14
1
15
16
17
18
19
20
21
17
22
23
24
25
26
3
27
28
29
9
30
4
31
24
32
33
34
33
35
28
36
23
37
38
39
22
40
10
41
37
42
43
44
32
45
6
46
2
47
48
49
42
50
27
16
11
18
12
25
5
38
15
43
7
11
12
13
14
15
16
17
18
19
14
20
17
21
18
22
12
23
24
25
5
26
3
27
28
29
30
31
32
33
27
34
11
35
36
37
8
...

result:

ok Correct! The number of the misses is 742 (75 test cases)

Test #5:

score: 100
Accepted
time: 2ms
memory: 3856kb

First Run Input

prepare
85
RSHXLIARGTANBOIMVCQUCBGQWEDTPMYJWYUFPKESKJODLNFVXH
GEFNCRFLXMNOJGIQPLMSBKHDVIUVCHRAAUYWQBPTWYXSJOTEDK
PNCEFQSMQNOUJPKTWEAHFSRKGCIVJXXLRHLYBWGODVBYDUTAIM
EBFQNGFUKBOYENJSUTTPKPVSIRADCMVRHAHMDCLGLXQXIOJYWW
OSYHICRXEQAMWBDUDWANLLNCVBTXMTGEPJYPGFSKIJFHUKRQOV
SESXRAXOUIGPVJUNLMJFYEBVFCOBDQHKGW...

First Run Output

10001010011110011101110100001000000100010110011001
01100001001010010110010001000110100110101110100110
11110101100100000100101000000101001001100000110110
00100100001010000001101100110010100001010101010000
01110010010001111100000100100010001111010010000001
010010010001001111011000100000111010111000101...

Second Run Input

play
85
10001010011110011101110100001000000100010110011001
A.
A+
N.
B-
O.
I-
M.
V-
C.
Q-
U.
C-
B.
B+
G.
G+
Q.
Q+
W.
E-
D.
T-
P.
M-
Y.
J-
W.
W+
Y.
Y+
U.
U+
F.
P-
K.
E-
S.
S+
K.
K+
J.
J+
O.
O+
D.
D+
L.
L+
N.
N+
F.
F+
V.
V+
X.
X+
H.
H+
R.
R+
I.
I+
C.
C+
T.
T+
M.
M+
P.
P+
E.
E!
0110000100101001011001000...

Second Run Output

11
7
12
13
14
15
16
17
18
19
20
21
22
13
23
9
24
19
25
26
27
28
29
30
31
32
33
25
34
31
35
20
36
37
38
39
40
2
41
38
42
32
43
14
44
27
45
5
46
12
47
36
48
17
49
4
50
3
8
1
15
6
21
18
28
10
30
16
37
29
39
26
11
4
12
13
14
1
15
16
17
18
19
10
20
21
22
23
24
25
26
15
27
28
29
5
30
23
31
6
32
33
34
27
3...

result:

ok Correct! The number of the misses is 856 (85 test cases)

Test #6:

score: 100
Accepted
time: 2ms
memory: 3628kb

First Run Input

prepare
90
HPBUYCSIRIQTEVJLTDYGMNBEKMSFHNCRXVDAUFQAWPLGJWKOXO
DGTONCNKSQVCREJMUPOGFWIQPALERLASDYBFVIWKXHTMXBJUHY
KODTYFIXXRTNWNCUSLOREEBCUJPABHIDVGLGJMYKWMSQHAPQVF
BGTFHKOEJPGLWJIHPWAYVDKIFXSUUQYTENNVCMDRMOASRBXCLQ
YSJXTDDMCLKFFBOWVRCSHNPTGARXJQPBKMYWUEAUNGEIIQVHOL
QTXVHWNRFUOHCPMGWMLFRSCQKGEIPKEADY...

First Run Output

11100111101000000101000110100001001000101000100010
11000011001100101110101100100010110010100100100001
01010011101100011001000111010000010111011110110001
10000011001100110100111000101001110001001001011110
00011010011001011101110011100011000001100100011010
000011100111101101011110001101101101000110100...

Second Run Input

play
90
11100111101000000101000110100001001000101000100010
Q.
T-
E.
V-
J.
L-
T.
T+
D.
Y-
G.
M-
N.
B-
E.
E+
K.
M-
S.
S+
F.
H-
N.
N+
C.
C+
R.
R+
X.
V-
D.
D+
A.
U-
F.
F+
Q.
Q+
A.
A+
W.
P-
L.
L+
G.
G+
J.
J+
W.
W+
K.
K+
O.
X-
O.
O+
I.
I+
Y.
Y+
B.
B+
M.
M+
H.
H+
V.
V+
U.
U+
P.
P+
X.
X!
1100001100110010111...

Second Run Output

11
12
13
14
15
16
17
12
18
19
20
21
22
23
24
13
25
26
27
7
28
29
30
22
31
6
32
9
33
34
35
18
36
37
38
28
39
11
40
36
41
42
43
16
44
20
45
15
46
41
47
25
48
49
50
48
10
8
19
5
23
3
26
21
29
1
34
14
37
4
42
2
49
33
11
12
13
14
15
16
17
18
19
4
20
2
21
22
23
24
25
18
26
27
28
14
29
13
30
27
31
26
32
9
...

result:

ok Correct! The number of the misses is 907 (90 test cases)

Test #7:

score: 100
Accepted
time: 2ms
memory: 3572kb

First Run Input

prepare
95
CXKFQPTEDJGCNSIWIDLVHJBTMEUMLQVYOHGPKNRYOFXRSBUWAA
DKGIBMTPLXOCTJEVQYVUMAFHNXEOCRDPNQHSUGSWAJRIFYBWKL
QHTADVKMABFWXHRLNICEGJOCPXWTYNVMBESJURIODUGFLYSKQP
WPTDMLIIEOWCKYSSREBDBFXNQGVNXAPVJHYLUKUCGHQRAFJMOT
PUYIWXOSXDQNITNCYWFEKGHPLKVJABJQTUSVRMLCEDFMGAOBHR
YFMQKSXVBUIYLCBRDWWNVFHTTMRHUDOGLA...

First Run Output

01000111010101010100000011111011001001001100010010
11000010100110000010100000011011001111101101011101
00001111001100100000110001010101010001100000010000
01101111101100111000001101101000010000100010001110
11110001010001100010011011110101110010011110111000
000111010000110000010101001001111011010110000...

Second Run Input

play
95
01000111010101010100000011111011001001001100010010
G.
C-
N.
S-
I.
W-
I.
I+
D.
D+
L.
V-
H.
J-
B.
T-
M.
E-
U.
M-
L.
L+
Q.
Q+
V.
V+
Y.
O-
H.
H+
G.
G+
P.
P+
K.
K+
N.
N+
R.
Y-
O.
O+
F.
F+
X.
X+
R.
R+
S.
S+
B.
B+
U.
U+
W.
W+
A.
A+
C.
C+
J.
J+
T.
T+
E.
E+
M.
M+
Y.
Y!
1100001010011000001010000001101...

Second Run Output

11
12
13
14
15
16
17
15
18
9
19
20
21
22
23
24
25
26
27
28
29
19
30
5
31
20
32
33
34
21
35
11
36
6
37
3
38
13
39
40
41
33
42
4
43
2
44
39
45
14
46
23
47
27
48
16
49
50
12
1
22
10
24
7
26
8
28
25
40
32
11
12
13
7
14
15
16
17
18
19
20
21
22
23
24
25
26
10
27
15
28
11
29
12
30
31
32
8
33
25
34
17
35
24...

result:

ok Correct! The number of the misses is 955 (95 test cases)

Test #8:

score: 100
Accepted
time: 2ms
memory: 3868kb

First Run Input

prepare
100
NKXFSXFWWAOBPEJOTMVHIPUKCGQSRLCRHYNVDMETALGIJQUDBY
LQEXDPFVMOMABELGPHCWBJTVCTNYXGRYWJUQKFIHOSNSKAIURD
MBTKVSCAPAXWHBEHUSQOGYJIUVTNEIRPFYQXJORNLFDCMKWDGL
EBBOJXCXNECGAQQALWPPMJVTGSHIORNMHRDFSYUYLFIUVDKWKT
GKOAHWLYQXVKCLRRTCYMFBSQUPDIWIJPVGDFMNAUTSJXHBEEON
EQEDVJGKUIXMCYQTANIHSADKWRNFYBGOT...

First Run Output

10110010101110110100010011110110100011010110100000
11010000010010011101110001111010100101010011001110
00110100001100101010101010100101000000001111000000
00100100001000001110100101110101000111011011000100
01100010100111000000111000110111010000110000111101
001000000100100110001010110010011000101000101...

Second Run Input

play
100
10110010101110110100010011110110100011010110100000
O.
B-
P.
E-
J.
O-
T.
M-
V.
H-
I.
P-
U.
K-
C.
G-
Q.
S-
R.
L-
C.
C+
R.
R+
H.
H+
Y.
N-
V.
V+
D.
M-
E.
E+
T.
T+
A.
A+
L.
L+
G.
G+
I.
I+
J.
J+
Q.
Q+
U.
U+
D.
D+
B.
B+
Y.
Y+
X.
X+
F.
F+
W.
W+
O.
O+
P.
P+
K.
K+
S.
S+
N.
N+
M.
M!
110100000100100111...

Second Run Output

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
25
32
29
33
20
34
35
36
19
37
38
39
14
40
17
41
10
42
30
43
26
44
21
45
15
46
27
47
23
48
37
49
12
50
34
6
3
7
4
9
8
16
11
22
13
24
2
28
5
35
1
38
18
11
9
12
13
14
3
15
1
16
17
18
19
20
21
22
23
24
8
25
19
26
23
27
28
29
4
30
16
31
32
33...

result:

ok Correct! The number of the misses is 1025 (100 test cases)

Test #9:

score: 100
Accepted
time: 2ms
memory: 3864kb

First Run Input

prepare
100
BULRJTVXIHFVSKOMPWMCGENUNYAKIQQXSPBADERWHJCYFDOLGT
FIHEGHKMALOKAVTSYYWTMQJCERQNBLFIOPSBDUCXVNRWJXUGPD
IGMAXBJVQJGTTPKQCFEEUWRSONNSHBRKUPWHCDDYLXFYVLOIMA
FKYUXTNHQBVLPWEOPREKVIMHCOJLXNDGBFUGIRSASJYADMWTCQ
RYIDFMJOWUBQNXLWNCRSSGKTXOHPVKTEPAAFMEILQVBUHJDGCY
SOVMPWQBMWNURDEALASGVNHCYUTOGKTKY...

First Run Output

10000001011101010001100101100110101111010001011100
10100000101110000100011001110001010001100000011010
00010011000011000000111011000010010101010000110010
10100010100001100101111011100110110111000000110000
10001000110001011000101000011010010011100110100101
010010111010101001101111001101000011000000110...

Second Run Input

play
100
10000001011101010001100101100110101111010001011100
F.
V-
S.
K-
O.
M-
P.
W-
M.
M+
C.
G-
E.
N-
U.
U+
N.
N+
Y.
A-
K.
K+
I.
I+
Q.
Q+
X.
X+
S.
S+
P.
P+
B.
B+
A.
A+
D.
E-
R.
R+
W.
W+
H.
H+
J.
J+
C.
C+
Y.
Y+
F.
F+
D.
D+
O.
O+
L.
L+
G.
G+
T.
T+
V.
V+
E.
E!
101000001011100001000110011100010100011000...

Second Run Output

11
12
13
14
15
16
17
18
19
16
20
21
22
23
24
2
25
23
26
27
28
14
29
9
30
31
32
8
33
13
34
17
35
1
36
27
37
38
39
4
40
18
41
10
42
5
43
20
44
26
45
11
46
37
47
15
48
3
49
21
50
6
12
7
38
22
11
12
13
9
14
15
16
17
18
17
19
20
21
8
22
23
24
25
26
27
28
29
30
10
31
1
32
2
33
11
34
35
36
29
37
38
39
24
4...

result:

ok Correct! The number of the misses is 981 (100 test cases)

Test #10:

score: 100
Accepted
time: 2ms
memory: 3624kb

First Run Input

prepare
100
SQROXGJWGXFMMKUNTEIRNLEVAYLHDHQPPBCSJIWFUYVCTADBKO
PKYCKEOOYJVXPWFGVDJBEULHWQTCAHLMAMURBFQGTIXSRISNND
UOOAMTVCCXBSEKWXPGWSRBNYNLIHJYJITFADEHKPRFDMQQVUGL
YEFEDNPRNSWMCWBAKSQQRBGLXKOILXTDAGJUVYUMVHHCJIFOTP
AVXANGTWWEBDESYBMQHOVRXCLFKDIGJSTJPQFYRCHIKMNLOPUU
OJNYRXLJHGGWFMDDMOPKYTHTUAKLNICIE...

First Run Output

01001000011000101110111010110010010011010110011101
11110010100001101000010100010001110011100001110010
00101011100111000000001101100110101010000100011101
00011001001010000100110001011011110100011011001001
00000101011110100000101100110011001011010110100100
011101001010110000111000111101110101001011100...

Second Run Input

play
100
01001000011000101110111010110010010011010110011101
F.
M-
M.
M+
K.
U-
N.
T-
E.
I-
R.
R+
N.
N+
L.
E-
V.
A-
Y.
L-
H.
D-
H.
H+
Q.
Q+
P.
P+
B.
C-
S.
S+
J.
J+
I.
I+
W.
W+
F.
F+
U.
U+
Y.
Y+
V.
V+
C.
C+
T.
T+
A.
A+
D.
D+
B.
B+
K.
K+
O.
O+
G.
G+
X.
X+
E.
E+
L.
L!
111100101000011010000101000100011100...

Second Run Output

11
12
13
12
14
15
16
17
18
19
20
3
21
16
22
23
24
25
26
27
28
29
30
28
31
2
32
33
34
35
36
1
37
7
38
19
39
8
40
11
41
15
42
26
43
24
44
35
45
17
46
25
47
29
48
34
49
14
50
4
9
6
10
5
23
18
27
22
11
12
13
1
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
4
29
30
31
23
32
33
34
32
35
22
36
37
38
15
39
26...

result:

ok Correct! The number of the misses is 1011 (100 test cases)

Test #11:

score: 100
Accepted
time: 1ms
memory: 3628kb

First Run Input

prepare
100
RGFVPILWOVETBGSLKHKNCHJIOXAMPXNQSWJYUDRBMDAEYFQCTU
OLRHQVCXUYKWSEJPDYTFGKNVCASHMIDPNERUBOQJMBTGAXLIFW
KXYEEFLNYOGBNIUVVDTCRJDSHQISRAUWAQCTWLMPBHMJKXGFPO
BUXYMYPJMVFQKCIDQHEUOTITPKHLORXVGLASAGWDCJSBWNEFRN
TXKFEIVQISUBKTHXRDJCNOMPMGHNDCLPAWVBWUAEQSJRFYGOYL
PSRXNYTOKJMUFUTIRVMKBDXLJBCLFVGHA...

First Run Output

10001011001010010101111100001011010011010111010101
01110110101000111100000011010101000111010010100011
01010111010001100100001001010011010101100001101110
10000001011110100011001100001111110100100011010101
11001111010101010100001000001010101000010001001001
111100100110001111011011000011110010111001010...

Second Run Input

play
100
10001011001010010101111100001011010011010111010101
E.
T-
B.
G-
S.
L-
K.
H-
K.
K+
N.
C-
H.
H+
J.
I-
O.
O+
X.
A-
M.
P-
X.
X+
N.
N+
Q.
S-
W.
W+
J.
J+
Y.
U-
D.
R-
B.
B+
M.
M+
D.
D+
A.
A+
E.
E+
Y.
Y+
F.
F+
Q.
Q+
C.
C+
T.
T+
U.
U+
V.
V+
G.
G+
L.
L+
I.
I+
P.
P+
S.
S+
R.
R!
011101101010001111000000...

Second Run Output

11
12
13
14
15
16
17
18
19
17
20
21
22
18
23
24
25
9
26
27
28
29
30
26
31
20
32
33
34
8
35
23
36
37
38
39
40
13
41
28
42
38
43
27
44
11
45
36
46
3
47
32
48
21
49
12
50
37
10
4
14
2
16
7
24
6
29
5
33
15
39
1
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
7
26
27
28
4
29
30
31
17
32
16
33
23
34
14
35
3
...

result:

ok Correct! The number of the misses is 1008 (100 test cases)

Test #12:

score: 100
Accepted
time: 1ms
memory: 3856kb

First Run Input

prepare
100
VJXSDLHVPDTYCWKILGXUIJANAHYSMUWBRRQTCENEPFFOKBGMOQ
BVAFIMQXPHKTKJWSLITNXOEVCFYCOQADGSGDWUPLHNBJRUEMYR
RLPSNKYDCLUMVDTHJYIHWQSGRBNXUFOFAAGEQTKCPVJEWBMOIX
IBFYNHNRSYOHXPGGKBFCSUMOJLUPKVAQMTCLDWREWQDTAVXIEJ
KGRTAINBFADUHILYMBEOPECVXQPDOWWTJSKMGQSVRUHLCNFXYJ
ETFGMNTHGOKBXNMELFBWCARUHICYJRWSX...

First Run Output

10101100101110101001110001101011100101011111011000
10000101010000010100000100011000001111011111011100
10001110101111001001101100101000011110000100011010
00010100001010000011101101110010110100010100100011
01010011001000111001000000001010110100001010000000
001001100110100011000011010110110011110001100...

Second Run Input

play
100
10101100101110101001110001101011100101011111011000
T.
Y-
C.
W-
K.
I-
L.
L+
G.
X-
U.
I-
J.
J+
A.
N-
A.
A+
H.
H+
Y.
Y+
S.
S+
M.
U-
W.
W+
B.
R-
R.
R+
Q.
T-
C.
C+
E.
N-
E.
E+
P.
P+
F.
F+
O.
K-
B.
B+
G.
G+
M.
M+
O.
O+
Q.
Q+
V.
V+
D.
D+
X.
X+
I.
I+
U.
U+
T.
T+
N.
N+
K.
K!
100001010100000101000001...

Second Run Output

11
12
13
14
15
16
17
6
18
19
20
21
22
2
23
24
25
23
26
7
27
12
28
4
29
30
31
14
32
33
34
33
35
36
37
13
38
39
40
38
41
9
42
43
44
45
46
32
47
18
48
29
49
44
50
35
8
1
10
5
19
3
21
16
30
20
36
11
39
24
45
15
11
12
13
11
14
15
16
17
18
5
19
12
20
21
22
23
24
2
25
26
27
28
29
22
30
7
31
3
32
33
34
16
3...

result:

ok Correct! The number of the misses is 1026 (100 test cases)

Test #13:

score: 100
Accepted
time: 2ms
memory: 3668kb

First Run Input

prepare
100
MOHGEABJDDXQJMYVSPKBWONVTCPLWSQRFEKUNUHTLCXYIAFIGR
LOFDRVYTQJXQHRTKMBHCEVSAUUIFAEXLMOGIKPBYNWNWCJPGSD
EJBMJEYAAUDIPOTXILRCUQSDNKVPRYFCKMLSQGWFTVXOHNBHWG
MHKMCDGVOQRWJBFSKLSGTYUDWOIAIUPCYTQPNEHBNJRAFXXVEL
AVRXEJCFQXWBYTQRSWYHOBUPUNGSDMHILCNLFKJKMDGEOITAPV
IRLQBTAYITACMJROOJHYNHSPBQLNEVWGX...

First Run Output

00110011101110001100001000000010000100101100011000
11010011101010011000100011010100011110010000110010
00100100101000000110100100010000011000000000000101
00110111000101000110010001100001100101010111000001
00000101011000111101001001001001000101000000111101
000101000111010000011000011001000000001100010...

Second Run Input

play
100
00110011101110001100001000000010000100101100011000
X.
Q-
J.
J+
M.
M+
Y.
V-
S.
P-
K.
B-
W.
O-
N.
V-
T.
C-
P.
P+
L.
W-
S.
S+
Q.
Q+
R.
F-
E.
E+
K.
K+
U.
N-
U.
U+
H.
H+
T.
T+
L.
L+
C.
C+
X.
X+
Y.
Y+
I.
A-
F.
F+
I.
I+
G.
G+
R.
R+
D.
D+
B.
B+
O.
O+
V.
V+
W.
W+
N.
N+
A.
A!
110100111010100110001000...

Second Run Output

11
12
13
8
14
1
15
16
17
18
19
20
21
22
23
24
25
26
27
18
28
29
30
17
31
12
32
33
34
5
35
19
36
37
38
36
39
3
40
25
41
28
42
26
43
11
44
15
45
46
47
33
48
45
49
4
50
32
10
9
20
7
22
2
24
16
29
21
37
23
46
6
11
12
13
14
15
8
16
17
18
19
20
21
22
6
23
24
25
26
27
28
29
24
30
21
31
11
32
1
33
17
34
2
3...

result:

ok Correct! The number of the misses is 1024 (100 test cases)

Test #14:

score: 100
Accepted
time: 2ms
memory: 3788kb

First Run Input

prepare
100
KVKFHJETMUGYIINCNCXOSBTFLAAQERRDPVHJUXWDPQYWOMLSBG
RKGEAFBUDOEJVNHJBSTOAHIWMWKFCPCYYVITXGXQUDLQSNLRMP
VFSDMWJQNEGIOKCAQFCUJHRBPLWLMUPOASHKYETNTXGDXRVBIY
AUELFVXFMCRTRVDAOJQWJKMQLEUKWSHXGIYHNNBOPBTPGCYSDI
MGTWHRVJKOPGAYSEXKCJIQRYPDXNBTEFBOWACHSLINLUVUDQFM
CAVGCIHTJQXHKTPQOLADBJDMGUWYENMLV...

First Run Output

01010101010101010100111001001000100110010011000101
10001010100110000100000001010010000001011100001110
10101101000100111000001100110110010000011011000100
00000001010010011010101001010111101101000011001000
00110011001100101101111001000110101100100101001110
010000000010101011000100000010111001100110010...

Second Run Input

play
100
01010101010101010100111001001000100110010011000101
G.
Y-
I.
I+
N.
C-
N.
N+
C.
C+
X.
O-
S.
B-
T.
T+
F.
F+
L.
A-
A.
A+
Q.
E-
R.
R+
D.
P-
V.
V+
H.
H+
J.
J+
U.
U+
X.
X+
W.
D-
P.
P+
Q.
Q+
Y.
Y+
W.
W+
O.
O+
M.
M+
L.
L+
S.
S+
B.
B+
G.
G+
K.
K+
E.
E+
D.
D!
100010101001100001000000010100100000010111...

Second Run Output

11
12
13
14
15
16
17
15
18
16
19
20
21
22
23
8
24
4
25
26
27
26
28
29
30
31
32
33
34
2
35
5
36
6
37
10
38
19
39
40
41
33
42
28
43
12
44
39
45
20
46
9
47
25
48
21
49
22
50
11
3
1
29
7
40
32
11
4
12
13
14
15
16
12
17
7
18
19
20
10
21
5
22
15
23
24
25
26
27
2
28
6
29
30
31
29
32
33
34
13
35
23
36
19
37...

result:

ok Correct! The number of the misses is 1004 (100 test cases)

Test #15:

score: 100
Accepted
time: 2ms
memory: 3624kb

First Run Input

prepare
100
HXKQHJLCSAEPANTBUFWEUTDPXRRDMQGOKMSBFWVCVLONYYIGJI
FHATBVFQWOIECJDGBSLKREDMQYNOTACNMKSJVULXGYIPPURWXH
JVWOTSJAXCAPFURISNLKXYEHWMPIOHGFUQBCRQVMLYEGDBDNTK
TOWIKXQPDRLAHPNUGUNKIRBECJYSQYMEFSDACFLXHVMJGTWBVO
WTBUHJHOXMQNYCGNQBSKUVPFOFGILTXYLARSEDCRVIWAEJMPDK
VHYQVKEJMPWUDBTWSMKIAGTEFGSYDUCCJ...

First Run Output

11100111010101000001111001001011010010000100100000
10100111000000011001100001010110100000010110101110
10010101010110101110110010100110010000001110101000
11001011100110100010010101110100001111101100010001
01101110011000000101111001001011100011101110100110
101011110000011000011010101010001001001000110...

Second Run Input

play
100
11100111010101000001111001001011010010000100100000
E.
P-
A.
A+
N.
T-
B.
U-
F.
W-
E.
E+
U.
U+
T.
T+
D.
P-
X.
X+
R.
R+
D.
D+
M.
Q-
G.
O-
K.
K+
M.
M+
S.
S+
B.
B+
F.
F+
W.
W+
V.
C-
V.
V+
L.
L+
O.
O+
N.
N+
Y.
Y+
I.
G-
J.
J+
I.
I+
H.
H+
P.
P+
Q.
Q+
C.
C+
G.
G!
101001110000000110011000010101101000...

Second Run Output

11
12
13
10
14
15
16
17
18
19
20
11
21
17
22
15
23
24
25
2
26
27
28
23
29
30
31
32
33
3
34
29
35
9
36
16
37
18
38
19
39
40
41
39
42
7
43
32
44
14
45
46
47
48
49
6
50
47
5
1
24
12
30
4
40
8
48
31
11
12
13
14
15
16
17
5
18
19
20
21
22
12
23
15
24
25
26
27
28
10
29
4
30
3
31
13
32
27
33
24
34
20
35
18
...

result:

ok Correct! The number of the misses is 1030 (100 test cases)

Test #16:

score: 100
Accepted
time: 1ms
memory: 3516kb

First Run Input

prepare
100
SCMKNXOIGSNYXFERVPAEUQHDULFWTCLIRKMJPOHBBYGJTDVQWA
XGAPSFERTQDFUWOJHLRPYNXIOVSBQTJDGCVKKAMCIUBMLNYEHW
OTQJRXSJVDUSNDIPTGYBIRAMWBEFXFCLEKHGMKQAYHOLNPUCVW
GTPJIHXDRBSYWEECOUYLWNLCXPMJFUAAMOGTVDHQRNFVKQKIBS
URSEIOWGQPCNVFDRMNIUJASLAEBBKFYHJYGVMOXDKWTQXPTCHL
ONFBMGMEDKCRRWCKPABJPDIHIYUGWQXSU...

First Run Output

01001010000011001010101101110101110000100110001001
11101011000000011110010011010000100100011100100001
01110110010000110010100011110101001100101010111000
01100110011111010010000101110011101110001000110000
00101100010100100100000100111001101011000000111110
011101011010100100000011001100001100010011000...

Second Run Input

play
100
01001010000011001010101101110101110000100110001001
N.
N+
Y.
X-
F.
E-
R.
V-
P.
A-
E.
E+
U.
Q-
H.
D-
U.
U+
L.
F-
W.
T-
C.
C+
L.
L+
I.
I+
R.
R+
K.
K+
M.
M+
J.
P-
O.
O+
H.
H+
B.
B+
Y.
Y+
G.
G+
J.
J+
T.
T+
D.
D+
V.
V+
Q.
Q+
W.
W+
A.
A+
S.
S+
X.
X+
F.
F+
P.
P!
111010110000000111100100110100001001...

Second Run Output

11
5
12
13
14
15
16
17
18
19
20
15
21
22
23
24
25
21
26
27
28
29
30
2
31
26
32
8
33
16
34
4
35
3
36
37
38
7
39
23
40
41
42
12
43
9
44
36
45
29
46
24
47
17
48
22
49
28
50
19
10
1
13
6
27
14
37
18
11
12
13
14
15
16
17
18
19
8
20
4
21
22
23
1
24
25
26
27
28
29
30
9
31
16
32
11
33
2
34
35
36
37
38
3
39
...

result:

ok Correct! The number of the misses is 1008 (100 test cases)

Test #17:

score: 100
Accepted
time: 2ms
memory: 3620kb

First Run Input

prepare
100
NNODHVLKIUVAYTXEBRPAPWXGHYJBOMRSSGKFUIQMFWQLTCJEDC
HANGPOYBUGIFVTKOXXWBFRQAJLMYLMPUWCJEREKCVNDSIQSHDT
ORBBPYTLJSQVISIAGHLGUREEOKAXFKYUJQXDMHNCTNCMDWFWPV
GIAKBSRKPITXAVCLFEWDQFVNJJHXOGRMMYDEHUONTBWPUSCQLY
PXIMBIELUQGORGWAKHNJQJBYFTNTKAPDDVVCHOSYLURFMCESXW
GWUXITHXWIKOVQLSENPLYKDNCQPCJFBRM...

First Run Output

10110101100111011000111001010111010010100001000101
11100000001011001100111100111000011100000010101100
01110100011000010000111100001111001110101001001001
01100000100000001010100000100110001010101111000010
11110111010001000110100000001000100110100010100001
011000110100101111010001011001111001110101101...

Second Run Input

play
100
10110101100111011000111001010111010010100001000101
V.
V+
A.
Y-
T.
X-
E.
B-
R.
P-
A.
A+
P.
P+
W.
X-
G.
H-
Y.
Y+
J.
B-
O.
O+
M.
R-
S.
S+
G.
G+
K.
K+
F.
U-
I.
I+
Q.
M-
F.
F+
W.
W+
Q.
Q+
L.
L+
T.
T+
C.
J-
E.
E+
D.
D+
C.
C+
N.
N+
X.
X+
H.
H+
B.
B+
R.
R+
U.
U+
M.
M+
J.
J!
111000000010110011001111...

Second Run Output

11
6
12
13
14
15
16
17
18
19
20
12
21
19
22
23
24
25
26
13
27
28
29
3
30
31
32
33
34
24
35
8
36
37
38
9
39
40
41
36
42
22
43
39
44
7
45
14
46
47
48
16
49
4
50
46
2
1
23
15
25
5
28
17
31
18
37
10
40
30
47
27
11
12
13
14
15
16
17
18
19
20
21
12
22
23
24
2
25
26
27
28
29
26
30
27
31
5
32
9
33
19
34
35
...

result:

ok Correct! The number of the misses is 1010 (100 test cases)