QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#216732 | #6552. Good and Lucky Matrices | ckiseki | AC ✓ | 214ms | 5632kb | C++20 | 9.1kb | 2023-10-15 21:49:53 | 2023-10-15 21:49:53 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const bool printXY = false;
const bool printMatch = false;
const int maxn = 2025;
bitset<maxn> A[maxn], B[maxn], X[maxn], Y[maxn], tmpA;
bool hasB[maxn];
void solve() {
string type;
cin >> type;
int n;
cin >> n;
// TODO init B, X, Y
for (int i = 0; i < n; i++) {
string S;
cin >> S;
for (int j = 0; j < n; j++)
A[i][j] = (S[j] == '1');
}
for (int i = 0; i < n; i++)
B[i].reset();
for (int i = 0; i < n; i++)
hasB[i] = false;
if (type == "good") {
for (int i = 0; i < n; i++)
X[i].reset();
for (int i = 0; i < n; i++)
Y[i].reset();
for (int i = 0; i < n; i++) {
int basis_cnt = 0;
for (int k = 0; k < n; k++) {
if (hasB[k]) {
if (A[i][k]) {
A[i] ^= B[k];
X[i][basis_cnt] = true;
}
++basis_cnt;
}
}
assert (basis_cnt == i);
int free_var = 0;
for (int k = 0; k < n; k++) {
if (not hasB[k]) {
if (A[i][k]) {
Y[n - i - 1][free_var] = true;
}
++free_var;
}
}
assert (free_var == n - i);
int lowbit = -1;
for (int k = 0; k < n; k++) {
if (A[i][k]) {
lowbit = k;
break;
}
}
// cerr << "i = " << i << endl;
// for (int k = 0; k < n; k++)
// cerr << A[i][k];
// cerr << endl;
assert (lowbit != -1);
B[lowbit] = A[i];
hasB[lowbit] = true;
for (int k = 0; k < n; k++) {
if (k == lowbit) continue;
if (hasB[k] && B[k][lowbit])
B[k] ^= B[lowbit];
}
}
if (printXY) {
cerr << "good to X, Y" << endl;
for (int i = 0; i < n; i++) {
cerr << "X " << i << " = ";
for (int j = 0; j < n; j++) {
cerr << X[i][j];
}
cerr << endl;
}
for (int i = 0; i < n; i++) {
cerr << "Y " << i << " = ";
for (int j = 0; j < n; j++) {
cerr << Y[i][j];
}
cerr << endl;
}
}
for (int i = 0; i < n; i++)
A[i].reset();
for (int i = 0; i < n; i++)
B[i].reset();
for (int i = 0; i < n; i++)
hasB[i] = false;
// to lucky
// TODO
vector<int> P;
for (int i = 0; i < n; i++) {
int invcnt = -1;
for (int j = i; j >= 0; j--) {
if (Y[i][j]) {
invcnt = j;
break;
}
}
if (printMatch) {
cerr << "#" << __LINE__ << endl;
cerr << "match, invcnt = " << i << ", " << invcnt << endl;
// cerr << "i, match, invcnt = " << i << ' ' << match << ' ' << invcnt << endl;
}
assert (invcnt != -1);
P.push_back(-1);
for (int j = i; j >= invcnt + 1; j--) {
P[j] = P[j - 1];
}
P[invcnt] = i;
// cerr << "P = ";
// for (int j = 0; j <= i; j++)
// cerr << P[j] << ", ";
// cerr << endl;
}
// cerr << "P = ";
// for (int j = 0; j < n; j++)
// cerr << P[j] << ", ";
// cerr << endl;
vector<int> used_col(n);
for (int i = 0; i < n; i++) {
A[i][P[i]] = true;
int match = P[i];
used_col[match] = true;
int it = 0;
// cerr << "@@ i = " << i << endl;
for (int j = 0; j < match; j++) {
if (used_col[j]) {
if (Y[match][it]) {
// cerr << "@@ j = " << j << endl;
A[i][j] = true;
}
++it;
}
}
for (int j = match + 1; j < n; j++) {
if (X[n - match - 1][j - (match + 1)]) {
A[i][j] = true;
}
}
}
}
if (type == "lucky") {
for (int i = 0; i < n; i++)
X[i].reset();
for (int i = 0; i < n; i++)
Y[i].reset();
vector<int> used_col(n);
for (int i = 0; i < n; i++) {
int match = -1;
for (int j = 0; j < n; j++) {
if (A[i][j] && not used_col[j]) {
match = j;
break;
}
}
assert (match != -1);
used_col[match] = true;
int invcnt = 0;
for (int j = 0; j < match; j++) {
if (used_col[j]) {
invcnt += 1;
} else
assert (not A[i][j]);
}
if (printMatch) {
cerr << "#" << __LINE__ << endl;
cerr << "i, match, invcnt = " << i << ' ' << match << ' ' << invcnt << endl;
}
int it = 0;
Y[match][invcnt] = true;
// cerr << "## i = " << i << endl;
for (int j = 0; j < match; j++) {
if (used_col[j]) {
if (A[i][j]) {
// cerr << "## j = " << j << endl;
Y[match][it] = true;
}
// TODO check this
++it;
}
}
for (int j = match + 1; j < n; j++) {
if (A[i][j]) {
// TODO check this
X[n - match - 1][j - (match + 1)] = true;
}
}
}
if (printXY) {
cerr << "lucky to X, Y" << endl;
for (int i = 0; i < n; i++) {
cerr << "X " << i << " = ";
for (int j = 0; j < n; j++) {
cerr << X[i][j];
}
cerr << endl;
}
for (int i = 0; i < n; i++) {
cerr << "Y " << i << " = ";
for (int j = 0; j < n; j++) {
cerr << Y[i][j];
}
cerr << endl;
}
}
for (int i = 0; i < n; i++)
A[i].reset();
for (int i = 0; i < n; i++)
B[i].reset();
for (int i = 0; i < n; i++)
hasB[i] = false;
for (int i = 0; i < n; i++) {
int free_var = 0;
for (int k = 0; k < n; k++) {
if (not hasB[k]) {
if (Y[n - i - 1][free_var]) {
A[i][k] = true;
}
++free_var;
}
}
tmpA = A[i];
int basis_cnt = 0;
for (int k = 0; k < n; k++) {
if (hasB[k]) {
if (X[i][basis_cnt]) {
tmpA ^= B[k];
}
++basis_cnt;
}
}
int lowbit = -1;
for (int k = 0; k < n; k++)
if (A[i][k]) {
assert (not hasB[k]);
lowbit = k;
break;
}
assert (lowbit != -1);
B[lowbit] = A[i];
hasB[lowbit] = true;
for (int k = 0; k < n; k++) {
if (k == lowbit) continue;
if (hasB[k] && B[k][lowbit])
B[k] ^= B[lowbit];
}
A[i] = tmpA;
// cerr << "here A " << i << " = ";
// for (int j = 0; j < n; j++)
// cerr << A[i][j];
// cerr << endl;
// cerr << "here X " << i << " = ";
// for (int j = 0; j < n; j++)
// cerr << X[i][j];
// cerr << endl;
}
}
#ifdef CKISEKI
if (type == "lucky") cout << "good\n";
if (type == "good") cout << "lucky\n";
#endif
cout << n << '\n';
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
cout << A[i][j];
cout << '\n';
}
}
int main() {
int T;
#ifdef CKISEKI
// freopen("g2.in", "r", stdin);
// cin >> T;
// while (T--)
// solve();
// freopen("g.in", "r", stdin);
// cin >> T;
// while (T--)
// solve();
// return 0;
#endif
cin.tie(nullptr)->sync_with_stdio(false);
cin >> T;
#ifdef CKISEKI
cout << T << '\n';
#endif
while (T--) {
solve();
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3492kb
First Run Input
3 lucky 2 11 11 good 2 11 01 lucky 2 01 10
First Run Output
2 11 10 2 10 11 2 10 01
Second Run Input
3 good 2 11 10 lucky 2 10 11 good 2 10 01
Second Run Output
2 11 11 2 11 01 2 01 10
result:
ok 9 lines
Test #2:
score: 100
Accepted
time: 0ms
memory: 3556kb
First Run Input
3 good 2 11 10 lucky 2 11 01 good 2 01 10
First Run Output
2 11 11 2 01 11 2 10 01
Second Run Input
3 lucky 2 11 11 good 2 01 11 lucky 2 10 01
Second Run Output
2 11 10 2 11 01 2 01 10
result:
ok 9 lines
Test #3:
score: 100
Accepted
time: 123ms
memory: 5600kb
First Run Input
1 good 2000 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
First Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 lucky 2000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #4:
score: 100
Accepted
time: 119ms
memory: 5612kb
First Run Input
1 lucky 2000 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
First Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 good 2000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #5:
score: 100
Accepted
time: 135ms
memory: 5608kb
First Run Input
1 good 2000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
First Run Output
2000 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 lucky 2000 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #6:
score: 100
Accepted
time: 121ms
memory: 5568kb
First Run Input
1 lucky 2000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
First Run Output
2000 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 good 2000 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #7:
score: 100
Accepted
time: 135ms
memory: 5556kb
First Run Input
1 lucky 2000 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
First Run Output
2000 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
Second Run Input
1 good 2000 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
Second Run Output
2000 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok 2001 lines
Test #8:
score: 100
Accepted
time: 136ms
memory: 5536kb
First Run Input
1 good 2000 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
First Run Output
2000 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 lucky 2000 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok 2001 lines
Test #9:
score: 100
Accepted
time: 130ms
memory: 5608kb
First Run Input
1 good 2000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
First Run Output
2000 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
Second Run Input
1 lucky 2000 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
Second Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #10:
score: 100
Accepted
time: 125ms
memory: 5520kb
First Run Input
1 good 2000 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
First Run Output
2000 1100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 lucky 2000 11000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok 2001 lines
Test #11:
score: 100
Accepted
time: 130ms
memory: 5580kb
First Run Input
1 good 2000 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
First Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 lucky 2000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #12:
score: 100
Accepted
time: 128ms
memory: 5632kb
First Run Input
1 lucky 2000 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
First Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 good 2000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok 2001 lines
Test #13:
score: 100
Accepted
time: 132ms
memory: 5580kb
First Run Input
1 lucky 2000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
First Run Output
2000 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 good 2000 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #14:
score: 100
Accepted
time: 125ms
memory: 5516kb
First Run Input
1 lucky 2000 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
First Run Output
2000 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
Second Run Input
1 good 2000 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
Second Run Output
2000 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #15:
score: 100
Accepted
time: 145ms
memory: 5564kb
First Run Input
1 good 2000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
First Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 lucky 2000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #16:
score: 100
Accepted
time: 136ms
memory: 5620kb
First Run Input
1 good 2000 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
First Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 lucky 2000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok 2001 lines
Test #17:
score: 100
Accepted
time: 141ms
memory: 5560kb
First Run Input
1 good 2000 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
First Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 lucky 2000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok 2001 lines
Test #18:
score: 100
Accepted
time: 146ms
memory: 5576kb
First Run Input
1 good 2000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
First Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 lucky 2000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #19:
score: 100
Accepted
time: 170ms
memory: 5580kb
First Run Input
1 good 2000 010011111010101111010111100111111101111000011010111101101100111111000011011101111110110111000001110111110011000010110111110101011101001101110010000011010111011010000011011111110001001111111111001110010010110101111101111011110100110000011110000001101101011011010101111001111011111110111000...
First Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 lucky 2000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 0100111110101011110101111001111111011110000110101111011011001111110000110111011111101101110000011101111100110000101101111101010111010011011100100000110101110110100000110111111100010011111111110011100100101101011111011110111101001100000111100000011011010110110101011110011110111111101110001111110...
result:
ok 2001 lines
Test #20:
score: 100
Accepted
time: 127ms
memory: 5560kb
First Run Input
1 good 2000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000...
First Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 lucky 2000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #21:
score: 100
Accepted
time: 127ms
memory: 5620kb
First Run Input
1 lucky 2000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
First Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Input
1 good 2000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
Second Run Output
2000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 2001 lines
Test #22:
score: 100
Accepted
time: 1ms
memory: 3472kb
First Run Input
591 good 1 1 lucky 1 1 good 2 01 10 lucky 2 01 10 good 2 11 10 good 2 10 01 lucky 2 10 01 good 2 11 01 lucky 2 11 01 good 2 10 11 lucky 2 10 11 good 2 01 11 lucky 2 01 11 lucky 2 11 11 good 3 001 010 100 lucky 3 001 010 100 good 3 101 010 100 good 3 011 010 100 good 3 111 010 100 good 3 001 110 100 ...
First Run Output
1 1 1 1 2 10 01 2 10 01 2 11 11 2 01 10 2 01 10 2 10 11 2 01 11 2 01 11 2 11 01 2 11 01 2 10 11 2 11 10 3 100 010 001 3 100 010 001 3 010 110 101 3 100 011 011 3 010 110 111 3 110 110 001 3 110 111 101 3 110 111 011 3 110 011 111 3 100 001 010 3 010 100 001 3 110 101 010 3 100 010 011 3 010 110 001 ...
Second Run Input
591 lucky 1 1 good 1 1 lucky 2 10 01 good 2 10 01 lucky 2 11 11 lucky 2 01 10 good 2 01 10 lucky 2 10 11 good 2 01 11 lucky 2 01 11 good 2 11 01 lucky 2 11 01 good 2 10 11 good 2 11 10 lucky 3 100 010 001 good 3 100 010 001 lucky 3 010 110 101 lucky 3 100 011 011 lucky 3 010 110 111 lucky 3 110 110 ...
Second Run Output
1 1 1 1 2 01 10 2 01 10 2 11 10 2 10 01 2 10 01 2 11 01 2 11 01 2 10 11 2 10 11 2 01 11 2 01 11 2 11 11 3 001 010 100 3 001 010 100 3 101 010 100 3 011 010 100 3 111 010 100 3 001 110 100 3 101 110 100 3 011 110 100 3 111 110 100 3 010 001 100 3 010 001 100 3 110 001 100 3 011 001 100 3 011 001 100 ...
result:
ok 2589 lines
Test #23:
score: 100
Accepted
time: 1ms
memory: 3468kb
First Run Input
500 good 4 0001 0010 0100 1000 lucky 4 0001 0010 0100 1000 good 4 1001 0010 0100 1000 good 4 0101 0010 0100 1000 good 4 1101 0010 0100 1000 good 4 0011 0010 0100 1000 good 4 1011 0010 0100 1000 good 4 0111 0010 0100 1000 good 4 1111 0010 0100 1000 good 4 0001 1010 0100 1000 good 4 1001 1010 0100 100...
First Run Output
4 1000 0100 0010 0001 4 1000 0100 0010 0001 4 0100 0010 1100 1001 4 1000 0010 0110 0101 4 0100 0010 1100 1101 4 1000 0100 0011 0011 4 0100 0010 1100 1011 4 1000 0010 0110 0111 4 0100 0010 1100 1111 4 0100 1100 1010 0001 4 0100 1100 0111 1001 4 1100 1010 0101 0101 4 1100 1101 1111 1101 4 0100 1100 10...
Second Run Input
500 lucky 4 1000 0100 0010 0001 good 4 1000 0100 0010 0001 lucky 4 0100 0010 1100 1001 lucky 4 1000 0010 0110 0101 lucky 4 0100 0010 1100 1101 lucky 4 1000 0100 0011 0011 lucky 4 0100 0010 1100 1011 lucky 4 1000 0010 0110 0111 lucky 4 0100 0010 1100 1111 lucky 4 0100 1100 1010 0001 lucky 4 0100 1100...
Second Run Output
4 0001 0010 0100 1000 4 0001 0010 0100 1000 4 1001 0010 0100 1000 4 0101 0010 0100 1000 4 1101 0010 0100 1000 4 0011 0010 0100 1000 4 1011 0010 0100 1000 4 0111 0010 0100 1000 4 1111 0010 0100 1000 4 0001 1010 0100 1000 4 1001 1010 0100 1000 4 0101 1010 0100 1000 4 1101 1010 0100 1000 4 0011 1010 01...
result:
ok 2500 lines
Test #24:
score: 100
Accepted
time: 2ms
memory: 3516kb
First Run Input
400 good 5 00001 00010 00100 01000 10000 lucky 5 00001 00010 00100 01000 10000 good 5 10001 00010 00100 01000 10000 good 5 01001 00010 00100 01000 10000 good 5 11001 00010 00100 01000 10000 good 5 00101 00010 00100 01000 10000 good 5 10101 00010 00100 01000 10000 good 5 01101 00010 00100 01000 10000...
First Run Output
5 10000 01000 00100 00010 00001 5 10000 01000 00100 00010 00001 5 01000 00100 00010 11000 10001 5 10000 00100 00010 01100 01001 5 01000 00100 00010 11000 11001 5 10000 01000 00010 00110 00101 5 01000 00100 00010 11000 10101 5 10000 00100 00010 01100 01101 5 01000 00100 00010 11000 11101 5 10000 0100...
Second Run Input
400 lucky 5 10000 01000 00100 00010 00001 good 5 10000 01000 00100 00010 00001 lucky 5 01000 00100 00010 11000 10001 lucky 5 10000 00100 00010 01100 01001 lucky 5 01000 00100 00010 11000 11001 lucky 5 10000 01000 00010 00110 00101 lucky 5 01000 00100 00010 11000 10101 lucky 5 10000 00100 00010 01100...
Second Run Output
5 00001 00010 00100 01000 10000 5 00001 00010 00100 01000 10000 5 10001 00010 00100 01000 10000 5 01001 00010 00100 01000 10000 5 11001 00010 00100 01000 10000 5 00101 00010 00100 01000 10000 5 10101 00010 00100 01000 10000 5 01101 00010 00100 01000 10000 5 11101 00010 00100 01000 10000 5 00011 0001...
result:
ok 2400 lines
Test #25:
score: 100
Accepted
time: 1ms
memory: 3524kb
First Run Input
500 good 4 0101 1101 1010 1001 good 4 1110 1010 0101 1101 good 4 0101 1010 1011 0110 good 4 1011 1110 0011 0111 good 4 0101 1000 1110 0010 good 4 1110 1111 1011 0011 good 4 0011 1101 0010 0101 good 4 1101 0111 1111 0001 good 4 0110 1001 0111 1100 good 4 1011 0010 0110 0011 good 4 1100 0100 0111 1001...
First Run Output
4 0011 0110 1100 0101 4 0011 1111 1011 0101 4 1010 1010 0110 0101 4 1011 1100 1011 1011 4 0010 1001 1111 0101 4 0111 1001 1101 0011 4 1001 0101 1110 0011 4 0111 1000 1110 1101 4 1110 0101 0101 1010 4 0101 0010 1001 1011 4 0010 0011 1100 1101 4 0101 1111 0110 1101 4 0110 0001 0010 1011 4 0010 1100 11...
Second Run Input
500 lucky 4 0011 0110 1100 0101 lucky 4 0011 1111 1011 0101 lucky 4 1010 1010 0110 0101 lucky 4 1011 1100 1011 1011 lucky 4 0010 1001 1111 0101 lucky 4 0111 1001 1101 0011 lucky 4 1001 0101 1110 0011 lucky 4 0111 1000 1110 1101 lucky 4 1110 0101 0101 1010 lucky 4 0101 0010 1001 1011 lucky 4 0010 001...
Second Run Output
4 0101 1101 1010 1001 4 1110 1010 0101 1101 4 0101 1010 1011 0110 4 1011 1110 0011 0111 4 0101 1000 1110 0010 4 1110 1111 1011 0011 4 0011 1101 0010 0101 4 1101 0111 1111 0001 4 0110 1001 0111 1100 4 1011 0010 0110 0011 4 1100 0100 0111 1001 4 1101 0011 0111 1111 4 0100 0010 1100 0111 4 1111 0100 00...
result:
ok 2500 lines
Test #26:
score: 100
Accepted
time: 2ms
memory: 3476kb
First Run Input
500 lucky 4 1001 1100 1011 0101 lucky 4 0110 1110 1110 0111 lucky 4 1001 0101 0110 0001 lucky 4 0110 1111 1111 1101 lucky 4 1000 0111 0010 1111 lucky 4 0011 0111 1010 1001 lucky 4 1010 0010 1100 1101 lucky 4 1111 0011 0100 1101 lucky 4 1110 0111 0111 0011 lucky 4 1000 1010 0101 1111 lucky 4 0100 110...
First Run Output
4 0101 1100 0011 0010 4 0111 1011 1001 1101 4 0001 0110 0011 1001 4 1101 1010 1000 1110 4 1111 0001 1101 0100 4 1001 1101 1111 0101 4 1101 0010 0101 0100 4 1101 1111 0001 1011 4 0011 0110 0111 1110 4 1111 0110 0111 0010 4 0110 1011 0010 1010 4 1111 0110 1000 1100 4 1111 0011 0001 1010 4 1011 1111 10...
Second Run Input
500 good 4 0101 1100 0011 0010 good 4 0111 1011 1001 1101 good 4 0001 0110 0011 1001 good 4 1101 1010 1000 1110 good 4 1111 0001 1101 0100 good 4 1001 1101 1111 0101 good 4 1101 0010 0101 0100 good 4 1101 1111 0001 1011 good 4 0011 0110 0111 1110 good 4 1111 0110 0111 0010 good 4 0110 1011 0010 1010...
Second Run Output
4 1001 1100 1011 0101 4 0110 1110 1110 0111 4 1001 0101 0110 0001 4 0110 1111 1111 1101 4 1000 0111 0010 1111 4 0011 0111 1010 1001 4 1010 0010 1100 1101 4 1111 0011 0100 1101 4 1110 0111 0111 0011 4 1000 1010 0101 1111 4 0100 1101 0101 1110 4 1110 1010 0110 1111 4 1110 0100 0110 1111 4 0011 0110 10...
result:
ok 2500 lines
Test #27:
score: 100
Accepted
time: 1ms
memory: 3548kb
First Run Input
400 good 5 00011 10010 11110 10101 11011 good 5 11011 11000 10011 10100 00101 good 5 10110 01001 01111 11110 01010 good 5 01111 00111 10110 11111 00010 good 5 10101 11111 10011 11011 11100 good 5 11011 01000 11010 10110 01111 good 5 10001 10100 10000 11000 10110 good 5 10110 00100 01001 10101 10000 ...
First Run Output
5 01100 01111 11101 10011 00011 5 00111 01100 10010 00111 11011 5 10100 10101 01111 10101 10010 5 10000 01111 10101 01110 01111 5 01110 01110 01011 11110 10101 5 00010 01100 10111 00111 11011 5 01100 11010 00110 01011 10001 5 11000 00010 11101 10011 10100 5 10101 11110 11110 10001 00111 5 00010 1011...
Second Run Input
400 lucky 5 01100 01111 11101 10011 00011 lucky 5 00111 01100 10010 00111 11011 lucky 5 10100 10101 01111 10101 10010 lucky 5 10000 01111 10101 01110 01111 lucky 5 01110 01110 01011 11110 10101 lucky 5 00010 01100 10111 00111 11011 lucky 5 01100 11010 00110 01011 10001 lucky 5 11000 00010 11101 1001...
Second Run Output
5 00011 10010 11110 10101 11011 5 11011 11000 10011 10100 00101 5 10110 01001 01111 11110 01010 5 01111 00111 10110 11111 00010 5 10101 11111 10011 11011 11100 5 11011 01000 11010 10110 01111 5 10001 10100 10000 11000 10110 5 10110 00100 01001 10101 10000 5 10010 10001 11100 11001 01010 5 10011 0100...
result:
ok 2400 lines
Test #28:
score: 100
Accepted
time: 2ms
memory: 3520kb
First Run Input
400 lucky 5 11001 01111 00101 11111 10111 lucky 5 01010 11001 10011 10100 01001 lucky 5 00111 11000 01101 00001 00110 lucky 5 00101 10000 11001 01010 00111 lucky 5 01101 00001 10111 00011 11100 lucky 5 01010 00111 11001 11001 10011 lucky 5 10100 10111 10110 01001 11001 lucky 5 01001 11101 10110 0111...
First Run Output
5 10111 11000 01110 11011 10001 5 01001 11011 00101 01011 10011 5 00010 00101 10111 10011 11000 5 00111 01001 10111 00100 00001 5 01000 01010 10101 10011 01111 5 11010 10011 11000 01101 10010 5 11001 01110 11111 00111 01010 5 01101 01010 11011 00101 11010 5 10010 00110 10000 11001 11010 5 11011 1110...
Second Run Input
400 good 5 10111 11000 01110 11011 10001 good 5 01001 11011 00101 01011 10011 good 5 00010 00101 10111 10011 11000 good 5 00111 01001 10111 00100 00001 good 5 01000 01010 10101 10011 01111 good 5 11010 10011 11000 01101 10010 good 5 11001 01110 11111 00111 01010 good 5 01101 01010 11011 00101 11010 ...
Second Run Output
5 11001 01111 00101 11111 10111 5 01010 11001 10011 10100 01001 5 00111 11000 01101 00001 00110 5 00101 10000 11001 01010 00111 5 01101 00001 10111 00011 11100 5 01010 00111 11001 11001 10011 5 10100 10111 10110 01001 11001 5 01001 11101 10110 01111 01101 5 11101 00110 00110 10001 11100 5 11100 0111...
result:
ok 2400 lines
Test #29:
score: 100
Accepted
time: 2ms
memory: 3516kb
First Run Input
333 good 6 110110 101001 100011 001100 101100 110010 good 6 100000 011111 011011 010001 011110 111100 good 6 111011 011111 101100 010011 101110 110100 good 6 100001 110100 011001 000101 001101 111111 good 6 010010 000101 101010 101000 100001 100101 good 6 111110 111001 101010 111100 011101 001010 go...
First Run Output
6 111001 101001 100110 111011 110101 111111 6 000001 111110 000101 101010 010111 111110 6 000110 001010 011011 111010 111110 111011 6 111111 100101 010011 101000 101011 100001 6 110010 001100 101100 111000 010001 001010 6 100101 001111 110110 101110 111101 001111 6 001100 111110 000101 111010 110011...
Second Run Input
333 lucky 6 111001 101001 100110 111011 110101 111111 lucky 6 000001 111110 000101 101010 010111 111110 lucky 6 000110 001010 011011 111010 111110 111011 lucky 6 111111 100101 010011 101000 101011 100001 lucky 6 110010 001100 101100 111000 010001 001010 lucky 6 100101 001111 110110 101110 111101 001...
Second Run Output
6 110110 101001 100011 001100 101100 110010 6 100000 011111 011011 010001 011110 111100 6 111011 011111 101100 010011 101110 110100 6 100001 110100 011001 000101 001101 111111 6 010010 000101 101010 101000 100001 100101 6 111110 111001 101010 111100 011101 001010 6 110101 101100 011011 100100 101001...
result:
ok 2331 lines
Test #30:
score: 100
Accepted
time: 2ms
memory: 3468kb
First Run Input
333 lucky 6 111011 010000 000010 101111 110001 111100 lucky 6 000010 101001 011100 101111 100011 001101 lucky 6 111100 000010 101111 101101 111100 010011 lucky 6 010110 000101 111011 111110 010010 101101 lucky 6 110000 001010 101010 100111 000011 010011 lucky 6 000110 000010 010110 110110 111001 001...
First Run Output
6 110010 000100 011011 111111 000001 110101 6 100110 010000 010011 111111 110100 010101 6 010011 001000 101110 111011 110000 111001 6 101101 001001 001101 111010 011000 110110 6 000110 111000 101100 010000 000111 100000 6 001101 010000 110000 001010 011000 101100 6 111110 001100 000010 010001 100000...
Second Run Input
333 good 6 110010 000100 011011 111111 000001 110101 good 6 100110 010000 010011 111111 110100 010101 good 6 010011 001000 101110 111011 110000 111001 good 6 101101 001001 001101 111010 011000 110110 good 6 000110 111000 101100 010000 000111 100000 good 6 001101 010000 110000 001010 011000 101100 go...
Second Run Output
6 111011 010000 000010 101111 110001 111100 6 000010 101001 011100 101111 100011 001101 6 111100 000010 101111 101101 111100 010011 6 010110 000101 111011 111110 010010 101101 6 110000 001010 101010 100111 000011 010011 6 000110 000010 010110 110110 111001 001101 6 110101 011000 010010 000100 110111...
result:
ok 2331 lines
Test #31:
score: 100
Accepted
time: 2ms
memory: 3540kb
First Run Input
285 good 7 0011101 1110111 0000011 1011011 1011100 1001010 0000101 good 7 1111100 1101000 0001100 1000100 0101111 0110000 1110010 good 7 1010010 0110010 0001100 1010100 0010111 1011111 1010110 good 7 0110000 0110111 1100101 0111010 1000111 1011011 1001100 good 7 0100010 1010111 0111000 0000010 10000...
First Run Output
7 0110001 0011010 0111111 1000010 1110011 0001100 0011101 7 0001100 0101100 0001100 0001011 0101111 1111001 0110101 7 1101010 0110111 0100100 0101100 1100010 1001001 1010001 7 1100110 1011001 0010001 0011010 1010111 1110110 0001111 7 1100111 1011001 0001000 1010101 1101101 0100001 1101110 7 1000000 ...
Second Run Input
285 lucky 7 0110001 0011010 0111111 1000010 1110011 0001100 0011101 lucky 7 0001100 0101100 0001100 0001011 0101111 1111001 0110101 lucky 7 1101010 0110111 0100100 0101100 1100010 1001001 1010001 lucky 7 1100110 1011001 0010001 0011010 1010111 1110110 0001111 lucky 7 1100111 1011001 0001000 1010101 ...
Second Run Output
7 0011101 1110111 0000011 1011011 1011100 1001010 0000101 7 1111100 1101000 0001100 1000100 0101111 0110000 1110010 7 1010010 0110010 0001100 1010100 0010111 1011111 1010110 7 0110000 0110111 1100101 0111010 1000111 1011011 1001100 7 0100010 1010111 0111000 0000010 1000011 0110011 1001110 7 1110101 ...
result:
ok 2280 lines
Test #32:
score: 100
Accepted
time: 2ms
memory: 3480kb
First Run Input
285 lucky 7 0010000 1000111 1001011 0101100 0010011 1010111 1110011 lucky 7 0010101 1010011 1011001 1011111 0010101 1101000 1010011 lucky 7 0100100 1011010 0111010 1000001 1011100 0001101 0010110 lucky 7 1010001 0100101 0100111 1001000 1010010 1110011 1010001 lucky 7 1001111 0001010 1111101 1110011 ...
First Run Output
7 1110011 1111001 1011100 0111101 0000100 0110010 0001101 7 0101100 1100101 1111011 0010000 0101000 0100001 0100111 7 1001000 0001011 0001000 1100101 1001101 0011000 0110100 7 1010001 1101000 1100100 0010010 0010111 0010110 0100001 7 1111010 1101000 1011001 0100111 0011101 1110110 0011111 7 0001001 ...
Second Run Input
285 good 7 1110011 1111001 1011100 0111101 0000100 0110010 0001101 good 7 0101100 1100101 1111011 0010000 0101000 0100001 0100111 good 7 1001000 0001011 0001000 1100101 1001101 0011000 0110100 good 7 1010001 1101000 1100100 0010010 0010111 0010110 0100001 good 7 1111010 1101000 1011001 0100111 00111...
Second Run Output
7 0010000 1000111 1001011 0101100 0010011 1010111 1110011 7 0010101 1010011 1011001 1011111 0010101 1101000 1010011 7 0100100 1011010 0111010 1000001 1011100 0001101 0010110 7 1010001 0100101 0100111 1001000 1010010 1110011 1010001 7 1001111 0001010 1111101 1110011 0100011 1111001 1001111 7 1001101 ...
result:
ok 2280 lines
Test #33:
score: 100
Accepted
time: 2ms
memory: 3524kb
First Run Input
250 good 8 11000001 10100001 11000011 10001101 11100100 11011100 11101010 00000011 good 8 01001001 01111111 01110010 10101010 11110100 10010100 00110111 11010111 good 8 01100110 00100000 01111110 01110101 10111110 00110100 11101110 01000000 good 8 10101011 10010111 11100010 10101110 11010111 1011111...
First Run Output
8 10000001 10000011 10111010 11111011 10101100 00000111 01011110 11000001 8 11101011 01001101 10110010 11111110 11001011 01101011 00110111 01001001 8 01111011 00000010 10100000 01000111 11010111 11100110 01100011 01011111 8 11100011 01010101 10110111 01011101 01110011 00101101 10100111 10101011 8 00...
Second Run Input
250 lucky 8 10000001 10000011 10111010 11111011 10101100 00000111 01011110 11000001 lucky 8 11101011 01001101 10110010 11111110 11001011 01101011 00110111 01001001 lucky 8 01111011 00000010 10100000 01000111 11010111 11100110 01100011 01011111 lucky 8 11100011 01010101 10110111 01011101 01110011 001...
Second Run Output
8 11000001 10100001 11000011 10001101 11100100 11011100 11101010 00000011 8 01001001 01111111 01110010 10101010 11110100 10010100 00110111 11010111 8 01100110 00100000 01111110 01110101 10111110 00110100 11101110 01000000 8 10101011 10010111 11100010 10101110 11010111 10111111 01010101 11000101 8 11...
result:
ok 2250 lines
Test #34:
score: 100
Accepted
time: 2ms
memory: 3580kb
First Run Input
250 lucky 8 11100100 00101001 10001001 01001000 11100011 00111010 01100100 10101111 lucky 8 01110110 10111011 10100110 00111110 10010110 00101011 11110101 01011011 lucky 8 01000001 01100111 11110010 01010110 00001011 11100110 00000010 10000111 lucky 8 01001101 10101101 10111010 01111011 10001110 011...
First Run Output
8 10101111 11011011 00011001 00111101 10101100 01001110 00100001 11001100 8 11110110 11011011 10011101 01101110 11110000 00111100 11010101 01110110 8 10000111 00000001 11110100 01110001 01100110 00111111 00001001 11100110 8 01100100 10000001 00101111 11011011 10111000 11010010 00110101 01011011 8 11...
Second Run Input
250 good 8 10101111 11011011 00011001 00111101 10101100 01001110 00100001 11001100 good 8 11110110 11011011 10011101 01101110 11110000 00111100 11010101 01110110 good 8 10000111 00000001 11110100 01110001 01100110 00111111 00001001 11100110 good 8 01100100 10000001 00101111 11011011 10111000 1101001...
Second Run Output
8 11100100 00101001 10001001 01001000 11100011 00111010 01100100 10101111 8 01110110 10111011 10100110 00111110 10010110 00101011 11110101 01011011 8 01000001 01100111 11110010 01010110 00001011 11100110 00000010 10000111 8 01001101 10101101 10111010 01111011 10001110 01100001 10111100 10000010 8 11...
result:
ok 2250 lines
Test #35:
score: 100
Accepted
time: 2ms
memory: 3580kb
First Run Input
222 good 9 111101010 011101000 011101011 011101100 010011101 011100111 100101011 111100000 010101011 good 9 111000110 111011101 110000111 100010110 101011010 000110000 010001001 100110101 001110110 good 9 111010101 101011010 000011100 000111110 000111100 111000000 001110100 111110010 111000001 good ...
First Run Output
9 101011011 011111000 000101111 101100101 111000010 000001010 111010110 111101001 000001101 9 100111011 111001100 110100010 011010001 101001101 011011011 010000110 111000101 000110111 9 111100000 111111101 101001100 000010011 001010100 010001001 010111000 100011111 111010101 9 111001101 010000111 00...
Second Run Input
222 lucky 9 101011011 011111000 000101111 101100101 111000010 000001010 111010110 111101001 000001101 lucky 9 100111011 111001100 110100010 011010001 101001101 011011011 010000110 111000101 000110111 lucky 9 111100000 111111101 101001100 000010011 001010100 010001001 010111000 100011111 111010101 lu...
Second Run Output
9 111101010 011101000 011101011 011101100 010011101 011100111 100101011 111100000 010101011 9 111000110 111011101 110000111 100010110 101011010 000110000 010001001 100110101 001110110 9 111010101 101011010 000011100 000111110 000111100 111000000 001110100 111110010 111000001 9 101100111 110101001 10...
result:
ok 2220 lines
Test #36:
score: 100
Accepted
time: 2ms
memory: 3584kb
First Run Input
222 lucky 9 101101101 111010101 001100000 101011101 011010111 110110011 010101011 110110110 100111001 lucky 9 111101111 000010101 010011100 111101111 001000100 100101100 000001010 111000110 010101111 lucky 9 110000000 110100111 110100100 101101011 001110000 000000100 101100001 001010011 000011111 lu...
First Run Output
9 100111001 011011011 111011110 011110010 110011000 100110100 100000100 101010001 011011001 9 010101111 101100011 000010100 010101110 010001111 011101100 101111001 001110100 111011111 9 101100100 101001110 000000010 101100011 000011001 011010001 100100111 010011110 100000000 9 110010011 000110101 00...
Second Run Input
222 good 9 100111001 011011011 111011110 011110010 110011000 100110100 100000100 101010001 011011001 good 9 010101111 101100011 000010100 010101110 010001111 011101100 101111001 001110100 111011111 good 9 101100100 101001110 000000010 101100011 000011001 011010001 100100111 010011110 100000000 good ...
Second Run Output
9 101101101 111010101 001100000 101011101 011010111 110110011 010101011 110110110 100111001 9 111101111 000010101 010011100 111101111 001000100 100101100 000001010 111000110 010101111 9 110000000 110100111 110100100 101101011 001110000 000000100 101100001 001010011 000011111 9 110010010 000101011 11...
result:
ok 2220 lines
Test #37:
score: 100
Accepted
time: 2ms
memory: 3552kb
First Run Input
200 good 10 0010110100 1011111011 1010001110 0011101010 0000011011 0110101010 0101101111 0000101101 1000000011 1000010100 good 10 1110001011 0001000001 0011000100 0001101001 0011111011 0000001101 1000010011 1010100010 1010110110 0001110010 good 10 0101001011 0100101011 1101110001 0000011111 01011101...
First Run Output
10 1100001010 0001010110 0010000101 1110000001 1010101010 0110110000 0101011011 0010110001 0111010111 1010011111 10 1000111001 1011010100 1110101101 0100001001 1111100010 0110100000 0101110111 0100010101 0010000010 1110001011 10 1110001001 0000010111 0001010100 0000010011 0010101100 1101101110 10111...
Second Run Input
200 lucky 10 1100001010 0001010110 0010000101 1110000001 1010101010 0110110000 0101011011 0010110001 0111010111 1010011111 lucky 10 1000111001 1011010100 1110101101 0100001001 1111100010 0110100000 0101110111 0100010101 0010000010 1110001011 lucky 10 1110001001 0000010111 0001010100 0000010011 00101...
Second Run Output
10 0010110100 1011111011 1010001110 0011101010 0000011011 0110101010 0101101111 0000101101 1000000011 1000010100 10 1110001011 0001000001 0011000100 0001101001 0011111011 0000001101 1000010011 1010100010 1010110110 0001110010 10 0101001011 0100101011 1101110001 0000011111 0101110100 0110001100 01010...
result:
ok 2200 lines
Test #38:
score: 100
Accepted
time: 2ms
memory: 3584kb
First Run Input
200 lucky 10 0111011110 1110010101 0010100111 0101011000 0110000100 1101101011 0001110100 1110001101 0100011011 0011010011 lucky 10 1101011111 0100010001 1110111100 0111000101 0100110010 0111111111 0010011011 0111001011 0111110110 0001000101 lucky 10 1111100011 0010101011 1101000101 0110011111 10001...
First Run Output
10 0011010011 0111011110 0001101000 1101010100 0100001010 0101010110 0110001011 0100111111 1101111110 1100101001 10 0001000101 0111100011 0100011011 0011101011 0111011111 0100101110 0000101000 1011110010 0001000100 1010111101 10 1110101010 1111011000 1101101011 1000111010 1111000100 1101001001 11011...
Second Run Input
200 good 10 0011010011 0111011110 0001101000 1101010100 0100001010 0101010110 0110001011 0100111111 1101111110 1100101001 good 10 0001000101 0111100011 0100011011 0011101011 0111011111 0100101110 0000101000 1011110010 0001000100 1010111101 good 10 1110101010 1111011000 1101101011 1000111010 11110001...
Second Run Output
10 0111011110 1110010101 0010100111 0101011000 0110000100 1101101011 0001110100 1110001101 0100011011 0011010011 10 1101011111 0100010001 1110111100 0111000101 0100110010 0111111111 0010011011 0111001011 0111110110 0001000101 10 1111100011 0010101011 1101000101 0110011111 1000111010 1111110111 11000...
result:
ok 2200 lines
Test #39:
score: 100
Accepted
time: 214ms
memory: 5592kb
First Run Input
1 good 2000 100001001000010100100100001000010011000001111101001110100100001010101010100101100010111101010111011011010111111000101101000001001000011001101110000111110001000111001011000001011110010110111111100011101010010011111010001010111101100011010011011000011010111001111011100010100011010011111101...
First Run Output
2000 0000010101010110010110011001101011111101001011110000111001001100101100110010010010111000101010100001101001111011110100000100010101000100000011110101010011100111110101110000100000100011100111100111011101010101100101100100001010011110010111001111000000000111110000110100111110011000000011001100000...
Second Run Input
1 lucky 2000 00000101010101100101100110011010111111010010111100001110010011001011001100100100101110001010101000011010011110111101000001000101010001000000111101010100111001111101011100001000001000111001111001110111010101011001011001000010100111100101110011110000000001111100001101001111100110000000110...
Second Run Output
2000 1000010010000101001001000010000100110000011111010011101001000010101010101001011000101111010101110110110101111110001011010000010010000110011011100001111100010001110010110000010111100101101111111000111010100100111110100010101111011000110100110110000110101110011110111000101000110100111111011100100...
result:
ok 2001 lines
Test #40:
score: 100
Accepted
time: 195ms
memory: 5620kb
First Run Input
1 lucky 2000 00110110010101000101000101011010110011100110001100001110011101001011001111100100100110111100001000101010101110100000011101111001001010010100110110101100101100010111000001001010101001000111010100010011111100110101101111100101000101111100000101011111000101010011011000111100100001111011101...
First Run Output
2000 0111101000111000101000010110001111110100110110101010111001110111011111100111001111100000111001001100010010000100010110110101010111001001011110001101000110110000000011111101110001111000000000100101110000100101100001010111111001101100001101111000011011110101110010000011110110001110111101100100011...
Second Run Input
1 good 2000 011110100011100010100001011000111111010011011010101011100111011101111110011100111110000011100100110001001000010001011011010101011100100101111000110100011011000000001111110111000111100000000010010111000010010110000101011111100110110000110111100001101111010111001000001111011000111011110110...
Second Run Output
2000 0011011001010100010100010101101011001110011000110000111001110100101100111110010010011011110000100010101010111010000001110111100100101001010011011010110010110001011100000100101010100100011101010001001111110011010110111110010100010111110000010101111100010101001101100011110010000111101110100111011...
result:
ok 2001 lines
Test #41:
score: 100
Accepted
time: 193ms
memory: 5580kb
First Run Input
1 good 2000 100110101100100011010110110000001100111111110110110100111011001100101101011010110011101011011001010110101100000011101110111000000110100010100111001010101110000001111010001010000101101001011010101001001101000011010000010010001101101101100100001100110001111101010111011011101110110001001001...
First Run Output
2000 0110001111110011000010011011110101110100111011100111100011011000101000010011001010110101110100001011000011010101111001111010111110101011101000111111000111011101000110001100010000001101110010000001011110001100101010000111111000111011111000111011100110010010000111100110111011101000100000111011111...
Second Run Input
1 lucky 2000 01100011111100110000100110111101011101001110111001111000110110001010000100110010101101011101000010110000110101011110011110101111101010111010001111110001110111010001100011000100000011011100100000010111100011001010100001111110001110111110001110111001100100100001111001101110111010001000001...
Second Run Output
2000 1001101011001000110101101100000011001111111101101101001110110011001011010110101100111010110110010101101011000000111011101110000001101000101001110010101011100000011110100010100001011010010110101010010011010000110100000100100011011011011001000011001100011111010101110110111011101100010010011100000...
result:
ok 2001 lines
Test #42:
score: 100
Accepted
time: 191ms
memory: 5624kb
First Run Input
1 lucky 2000 01100000110000110011111000110100010111010001100011111011001010000001111001011111000100111110001000100010100011111101010101011110001100011000011111100110100001000111000011111001101111010111010101101010101111111100110101000110100100011010110011010001000111000101010010010110000100000011000...
First Run Output
2000 1000000111010001001111010000111001110010001001101111010011001101011010111011110100100100110011101010000001100101011010101000110000110101100111001000101110011011111001100110011010011010111001101000110101101100010001010111100100101011111111001001001100110010000000101100001010101000001110010000111...
Second Run Input
1 good 2000 100000011101000100111101000011100111001000100110111101001100110101101011101111010010010011001110101000000110010101101010100011000011010110011100100010111001101111100110011001101001101011100110100011010110110001000101011110010010101111111100100100110011001000000010110000101010100000111001...
Second Run Output
2000 0110000011000011001111100011010001011101000110001111101100101000000111100101111100010011111000100010001010001111110101010101111000110001100001111110011010000100011100001111100110111101011101010110101010111111110011010100011010010001101011001101000100011100010101001001011000010000001100011100001...
result:
ok 2001 lines
Test #43:
score: 100
Accepted
time: 195ms
memory: 5584kb
First Run Input
1 good 2000 000011011000000111011101000011101110010001010001101001100000010110100001010110000011010101000100101111011101111100011011011011011110011000111001000100110010011110100000000010111010010010101001000000101000111101011000100101101011011111001100110111101011010101010011001010001010011000111100...
First Run Output
2000 1001000110110110100011001111110111001011001011101000000001111001011001001010000111110101001111110110011101010111111000011010111100011010010001101001011101011101000011011111101110000000001011000000010000010010110001011000000100010000000100101011110010110000100000001001110001110010110101000100101...
Second Run Input
1 lucky 2000 10010001101101101000110011111101110010110010111010000000011110010110010010100001111101010011111101100111010101111110000110101111000110100100011010010111010111010000110111111011100000000010110000000100000100101100010110000001000100000001001010111100101100001000000010011100011100101101010...
Second Run Output
2000 0000110110000001110111010000111011100100010100011010011000000101101000010101100000110101010001001011110111011111000110110110110111100110001110010001001100100111101000000000101110100100101010010000001010001111010110001001011010110111110011001101111010110101010100110010100010100110001111001100110...
result:
ok 2001 lines
Test #44:
score: 100
Accepted
time: 206ms
memory: 5528kb
First Run Input
1 lucky 2000 00110110010111110100100000101000101011100010101010111001100011100001111000001001100001101011011111101011100100100000000100001000000110000011111011001001110110010110100101110110111001100100000101111011010110111001111101011010101100001001000101000011010101000111000110110010100100100100000...
First Run Output
2000 0111110010011111110011111000101000010101100101111101011101111110010110101110011001111011001110001000110011011011100111010000110001010110010011100011011001111110100110100111110110010001000010101110110111101110001000001001011010010101101001010111100011000000011000101000101000100001000010111110110...
Second Run Input
1 good 2000 011111001001111111001111100010100001010110010111110101110111111001011010111001100111101100111000100011001101101110011101000011000101011001001110001101100111111010011010011111011001000100001010111011011110111000100000100101101001010110100101011110001100000001100010100010100010000100001011...
Second Run Output
2000 0011011001011111010010000010100010101110001010101011100110001110000111100000100110000110101101111110101110010010000000010000100000011000001111101100100111011001011010010111011011100110010000010111101101011011100111110101101010110000100100010100001101010100011100011011001010010010010000001100010...
result:
ok 2001 lines
Test #45:
score: 100
Accepted
time: 200ms
memory: 5512kb
First Run Input
1 good 2000 000101111001110001101101101010110111011111100111110010001000110101101011010111000010010011111110010100110011100010100101111110011100010110010111011010111100000010011110000011001001000001111110100001110000000111100101100000000011110010001010110001001101000001011111100111101000001001000100...
First Run Output
2000 1010000001100110010110101101100010101011100111110001000001000010001111100101101000111111101000001110001010011101011111000000100111000000010000001101101010001011001011010001101010000010100001110101111101100000010011011010001100100001001101010111111000000010010001000000011010100111111011010100110...
Second Run Input
1 lucky 2000 10100000011001100101101011011000101010111001111100010000010000100011111001011010001111111010000011100010100111010111110000001001110000000100000011011010100010110010110100011010100000101000011101011111011000000100110110100011001000010011010101111110000000100100010000000110101001111110110...
Second Run Output
2000 0001011110011100011011011010101101110111111001111100100010001101011010110101110000100100111111100101001100111000101001011111100111000101100101110110101111000000100111100000110010010000011111101000011100000001111001011000000000111100100010101100010011010000010111111001111010000010010001000100100...
result:
ok 2001 lines
Test #46:
score: 100
Accepted
time: 200ms
memory: 5492kb
First Run Input
1 lucky 2000 11101001011011111101111110111011001011100011110000100110010010000101010100001001000010010111011011101001001000100101001101010111010100001101100100101010001100110010101100111111111111111010001111000000110100010110111101110010011001001011001011001110110100101101010100010100000000000110100...
First Run Output
2000 0011101010010011100001010000000110101100101110001010001000100001010101110011100010100110000000111010010110111101100111011001100110000110010011111001100111101000111101100001101000111110011110101000111100011011010010101011100010110101111100001101000010101010001010011001111000000101111011011010011...
Second Run Input
1 good 2000 001110101001001110000101000000011010110010111000101000100010000101010111001110001010011000000011101001011011110110011101100110011000011001001111100110011110100011110110000110100011111001111010100011110001101101001010101110001011010111110000110100001010101000101001100111100000010111101101...
Second Run Output
2000 1110100101101111110111111011101100101110001111000010011001001000010101010000100100001001011101101110100100100010010100110101011101010000110110010010101000110011001010110011111111111111101000111100000011010001011011110111001001100100101100101100111011010010110101010001010000000000011010001010011...
result:
ok 2001 lines
Test #47:
score: 100
Accepted
time: 197ms
memory: 5540kb
First Run Input
1 good 2000 000011101110001110101101110000100110011010010000001000101111101110010100111100101001010010000001010000101100010101010100010101110011111001110110000100011000101000001001000100000001011011001010111001000111100000100001000100000111101001001010001011111101101111011100011110110111111110011101...
First Run Output
2000 0010100101000110010101100101001001111011001101001110001110000000100000010001000100000010000100000110111011110101010100000001001000010000110111010011101110101011110110111011000111001110001100000001000110010001010111000011011000010100101101110111010100110101000111011000111100011101010011000010011...
Second Run Input
1 lucky 2000 00101001010001100101011001010010011110110011010011100011100000001000000100010001000000100001000001101110111101010101000000010010000100001101110100111011101010111101101110110001110011100011000000010001100100010101110000110110000101001011011101110101001101010001110110001111000111010100110...
Second Run Output
2000 0000111011100011101011011100001001100110100100000010001011111011100101001111001010010100100000010100001011000101010101000101011100111110011101100001000110001010000010010001000000010110110010101110010001111000001000010001000001111010010010100010111111011011110111000111101101111111100111011010110...
result:
ok 2001 lines
Test #48:
score: 100
Accepted
time: 200ms
memory: 5512kb
First Run Input
1 lucky 2000 00110000101011000110101101110010001111101110000011100001010101000011101101001001111000101110001101110000011010111110011110100111100110011010011110011101111111100001011001101111100010001000100011101100101001111101110010101001100110101010010110011000101000011111011000011001100110111001001...
First Run Output
2000 0011001001011000000110100101101001110110101111010001101011011100010101011110111001100101011000101000000101110001011111000010011111101001000001000101010110101111111110001100000101110100101111101100010001110111110010101000100101111110100100101001100100111011010101011001001101100011101010111010000...
Second Run Input
1 good 2000 001100100101100000011010010110100111011010111101000110101101110001010101111011100110010101100010100000010111000101111100001001111110100100000100010101011010111111111000110000010111010010111110110001000111011111001010100010010111111010010010100110010011101101010101100100110110001110101011...
Second Run Output
2000 0011000010101100011010110111001000111110111000001110000101010100001110110100100111100010111000110111000001101011111001111010011110011001101001111001110111111110000101100110111110001000100010001110110010100111110111001010100110011010101001011001100010100001111101100001100110011011100100100101110...
result:
ok 2001 lines
Test #49:
score: 100
Accepted
time: 195ms
memory: 5500kb
First Run Input
1 good 2000 000101000011000110101111011111110101111100101000100100001111011000100011110111011111110100110011110110000000111001100110110100110111111110111001101100011100010100100001001100101010100001010110000011110010100101001101011011011100101110001010001110111011000100001110101100110100110101000101...
First Run Output
2000 0110111001101010010000100100011001101010011111001010011110010011010110110011011111110100000100101001011001010110000101111000000110100010110100100101010001001111100001101110110100001010111010110101000101101000000101010100000100101100000111011011010000111011011000111101110101111000110100100110001...
Second Run Input
1 lucky 2000 01101110011010100100001001000110011010100111110010100111100100110101101100110111111101000001001010010110010101100001011110000001101000101101001001010100010011111000011011101101000010101110101101010001011010000001010101000001001011000001110110110100001110110110001111011101011110001101001...
Second Run Output
2000 0001010000110001101011110111111101011111001010001001000011110110001000111101110111111101001100111101100000001110011001101101001101111111101110011011000111000101001000010011001010101000010101100000111100101001010011010110110111001011100010100011101110110001000011101011001101001101010001010010100...
result:
ok 2001 lines
Test #50:
score: 100
Accepted
time: 196ms
memory: 5596kb
First Run Input
1 lucky 2000 10001111011011101100010001110001111111100101110001001110111100000110101010110110111110101010111010100010100110110101100010001000101110111000100111101101001101000001101000110101000100011011000101000011010000110011111100010111011001010011011110101010110011110101101111000010111011110110110...
First Run Output
2000 1010001001111101100010011100100110101001001000100011011101011001110101001011001010101011001111111011000011101101101100000001100110001101111000111100001010110000100010111101110110000110101110110001111000111100011111110001100101001110111100110101001100010011100111010101010000110011001001100010010...
Second Run Input
1 good 2000 101000100111110110001001110010011010100100100010001101110101100111010100101100101010101100111111101100001110110110110000000110011000110111100011110000101011000010001011110111011000011010111011000111100011110001111111000110010100111011110011010100110001001110011101010101000011001100100110...
Second Run Output
2000 1000111101101110110001000111000111111110010111000100111011110000011010101011011011111010101011101010001010011011010110001000100010111011100010011110110100110100000110100011010100010001101100010100001101000011001111110001011101100101001101111010101011001111010110111100001011101111011011011011101...
result:
ok 2001 lines