QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#376357 | #6109. Similarity Graph | JCY_ | AC ✓ | 4ms | 3860kb | C++14 | 2.5kb | 2024-04-04 08:29:42 | 2024-04-04 08:29:43 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using i128 = __int128;
using u128 = unsigned __int128;
template <typename T>
void chkmax(T &x, const T &y) {
if (x < y) x = y;
}
template <typename T>
void chkmin(T &x, const T &y) {
if (y < x) x = y;
}
constexpr int MAXN = 105;
int n, a[MAXN][MAXN], qu[MAXN], hd, tl, rx[MAXN], ry[MAXN], in[MAXN];
vector<int> g[MAXN];
int get_id(int x, int y) { return (x - 1) * n + y; }
namespace dsu {
int fa[MAXN * MAXN];
void init(int n) { iota(fa + 1, fa + n + 1, 1); }
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
void merge(int x, int y) { fa[find(x)] = find(y); }
} // namespace dsu
void topo_sort() {
fill(in + 1, in + n + 1, 0);
for (int i = 1; i <= n; ++i)
for (auto j : g[i]) ++in[j];
hd = 1;
tl = 0;
for (int i = 1; i <= n; ++i)
if (!in[i]) qu[++tl] = i;
while (hd <= tl) {
int u = qu[hd++];
for (auto v : g[u])
if (!(--in[v])) qu[++tl] = v;
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n;
for (int i = 1; i <= n; ++i)
for (int j = 1; j <= n; ++j) cin >> a[i][j];
dsu::init(n * n);
for (int i = 1; i <= n; ++i) {
for (int x = 1; x <= n; ++x) {
if (x == i) continue;
for (int y = x + 1; y <= n; ++y) {
if (y == i) continue;
if (a[i][x] == a[i][y] && a[x][y] != a[i][x]) {
dsu::merge(get_id(i, x), get_id(i, y));
dsu::merge(get_id(x, i), get_id(y, i));
}
}
}
}
for (int i = 1; i <= n; ++i) {
for (int j = i + 1; j <= n; ++j) {
if (dsu::find(get_id(i, j)) == dsu::find(get_id(j, i))) {
cout << "NO\n";
return 0;
}
if (dsu::find(get_id(i, j)) < dsu::find(get_id(j, i))) {
g[i].emplace_back(j);
} else {
g[j].emplace_back(i);
}
}
}
topo_sort();
for (int i = 1; i <= n; ++i) rx[qu[i]] = i;
for (int i = 1; i <= n; ++i) g[i].clear();
for (int i = 1; i <= n; ++i) {
for (int j = i + 1; j <= n; ++j) {
if ((rx[i] > rx[j]) ^ a[i][j]) {
g[i].emplace_back(j);
} else {
g[j].emplace_back(i);
}
}
}
topo_sort();
for (int i = 1; i <= n; ++i) ry[qu[i]] = i;
cout << "YES\n";
for (int i = 1; i <= n; ++i) cout << rx[i] << " \n"[i == n];
for (int i = 1; i <= n; ++i) cout << ry[i] << " \n"[i == n];
return 0;
}
/*
g++ H.cpp -o H -std=c++14 -O2 -Wall -Wextra -Wshadow -g -fsanitize=address,undefined
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3728kb
input:
4 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0
output:
YES 1 2 3 4 2 4 1 3
result:
ok ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
6 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0
output:
NO
result:
ok ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
1 0
output:
YES 1 1
result:
ok ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
2 0 0 0 0
output:
YES 1 2 2 1
result:
ok ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3728kb
input:
2 0 1 1 0
output:
YES 1 2 1 2
result:
ok ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
3 0 0 0 0 0 0 0 0 0
output:
YES 1 2 3 3 2 1
result:
ok ok
Test #7:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
3 0 0 0 0 0 1 0 1 0
output:
YES 1 2 3 3 1 2
result:
ok ok
Test #8:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
3 0 0 1 0 0 0 1 0 0
output:
YES 2 1 3 1 3 2
result:
ok ok
Test #9:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
3 0 0 1 0 0 1 1 1 0
output:
YES 1 2 3 2 1 3
result:
ok ok
Test #10:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
3 0 1 0 1 0 0 0 0 0
output:
YES 1 2 3 2 3 1
result:
ok ok
Test #11:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
3 0 1 0 1 0 1 0 1 0
output:
YES 2 1 3 3 1 2
result:
ok ok
Test #12:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
3 0 1 1 1 0 0 1 0 0
output:
YES 1 2 3 1 3 2
result:
ok ok
Test #13:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
3 0 1 1 1 0 1 1 1 0
output:
YES 1 2 3 1 2 3
result:
ok ok
Test #14:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
4 0 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0
output:
YES 1 2 3 4 3 2 4 1
result:
ok ok
Test #15:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
4 0 1 1 1 1 0 0 0 1 0 0 0 1 0 0 0
output:
YES 1 2 3 4 1 4 3 2
result:
ok ok
Test #16:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
4 0 1 0 1 1 0 1 0 0 1 0 0 1 0 0 0
output:
YES 4 1 2 3 3 2 4 1
result:
ok ok
Test #17:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
4 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0
output:
YES 1 2 3 4 3 4 1 2
result:
ok ok
Test #18:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
4 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0
output:
YES 1 2 3 4 4 3 1 2
result:
ok ok
Test #19:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
5 0 0 1 0 1 0 0 1 1 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0
output:
YES 4 2 1 3 5 2 3 1 5 4
result:
ok ok
Test #20:
score: 0
Accepted
time: 0ms
memory: 3728kb
input:
5 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 1 0
output:
YES 1 2 3 4 5 3 2 5 1 4
result:
ok ok
Test #21:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
5 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 0 0 1 1 0 0
output:
YES 1 5 2 3 4 3 4 1 5 2
result:
ok ok
Test #22:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
5 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0
output:
YES 3 1 4 2 5 5 1 4 2 3
result:
ok ok
Test #23:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
5 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0
output:
YES 5 1 2 3 4 3 2 5 4 1
result:
ok ok
Test #24:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
6 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 0
output:
YES 1 5 4 2 3 6 4 3 6 1 2 5
result:
ok ok
Test #25:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
6 0 0 1 0 1 0 0 0 0 1 1 1 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 0
output:
YES 4 1 5 2 6 3 1 3 2 6 5 4
result:
ok ok
Test #26:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
6 0 0 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 0 1 0 0
output:
YES 3 2 4 1 5 6 1 5 6 2 4 3
result:
ok ok
Test #27:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
6 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 0 0 0 1 1 0 0
output:
YES 3 1 5 2 4 6 6 5 1 2 4 3
result:
ok ok
Test #28:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
6 0 0 0 0 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 0 0 1 1 0 1 1 1 0 0 1 1 1 1 0 0
output:
YES 5 1 2 3 4 6 1 3 4 2 6 5
result:
ok ok
Test #29:
score: 0
Accepted
time: 0ms
memory: 3728kb
input:
7 0 1 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 0 0 1 1 0
output:
YES 1 7 6 2 3 4 5 3 6 1 7 4 2 5
result:
ok ok
Test #30:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
7 0 0 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 0 1 0 0 1 0 0 1 0
output:
YES 6 5 4 2 3 1 7 4 6 2 7 5 1 3
result:
ok ok
Test #31:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
7 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 1 0 0 1 0 1 1 1 0 0
output:
NO
result:
ok ok
Test #32:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
7 0 1 1 0 1 0 1 1 0 0 1 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 0
output:
NO
result:
ok ok
Test #33:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
7 0 1 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 0 1 0 0 0 1 0 1 1 0 0 1 0 0 0 1 0 1 0
output:
YES 5 1 6 2 3 4 7 7 6 4 1 5 2 3
result:
ok ok
Test #34:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
8 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 1 0 1 1 0 1 1 1 0 0 1 0 1 0 1 0 1 0 0 1 1 1 0 1 0 0 1 1 1 0 1 0 1 0 0 1 0 1 0 1 0
output:
YES 1 6 3 5 2 7 4 8 8 7 1 5 3 6 2 4
result:
ok ok
Test #35:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
12 0 1 0 1 0 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 0 0 1 1 1 1 0 1 0 0 0 1 0 0 1 1 1 1 0 1 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 0 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0
output:
YES 6 12 4 9 1 5 2 3 8 7 10 11 6 8 10 9 7 11 5 3 1 12 4 2
result:
ok ok
Test #36:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
13 0 0 1 0 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 1 1 0 1 1 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1 1 0 0 1 1 0 0 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 1 1 1 1 0 1 1...
output:
YES 12 9 4 3 5 11 6 10 7 1 2 8 13 8 11 3 10 2 6 13 9 12 1 5 4 7
result:
ok ok
Test #37:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
17 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 1 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0...
output:
YES 1 3 8 12 11 4 2 14 7 16 13 10 9 15 6 5 17 1 5 7 11 4 15 17 8 14 12 2 13 3 9 6 16 10
result:
ok ok
Test #38:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
24 0 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 1 0 1 0 0 1 0 0 1 1...
output:
YES 4 13 10 2 7 21 8 22 19 3 20 23 17 11 1 24 16 5 15 14 6 12 9 18 3 12 14 20 18 10 21 11 22 19 2 9 13 15 5 24 4 6 1 7 16 8 23 17
result:
ok ok
Test #39:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
27 0 1 1 1 0 1 1 0 0 0 1 0 1 1 0 1 0 0 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 1 0 1 0 0 1 1 1...
output:
YES 19 6 14 7 27 21 5 11 3 23 24 20 16 9 1 15 2 18 4 17 13 10 26 12 8 25 22 18 3 4 1 16 22 11 23 19 17 21 10 8 9 25 13 27 20 7 12 6 15 26 2 14 24 5
result:
ok ok
Test #40:
score: 0
Accepted
time: 1ms
memory: 3668kb
input:
31 0 1 1 1 0 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 1 1 1 1 0 1 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 0 1 0 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1...
output:
YES 2 13 3 31 6 5 26 24 14 21 25 11 4 28 8 12 17 9 7 19 16 15 10 22 29 1 18 23 20 27 30 15 28 16 24 3 23 11 17 18 30 22 12 29 31 14 20 1 8 25 9 7 13 27 4 19 10 26 2 6 5 21
result:
ok ok
Test #41:
score: 0
Accepted
time: 1ms
memory: 3672kb
input:
39 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 0...
output:
YES 37 31 1 35 36 24 7 12 27 8 22 4 23 14 5 38 25 6 13 9 34 28 26 39 17 16 21 15 30 10 29 20 33 2 32 11 18 3 19 18 7 28 19 37 6 29 15 23 32 14 31 10 17 22 11 39 1 21 8 27 24 30 36 12 3 33 34 16 35 38 25 5 26 20 4 9 2 13
result:
ok ok
Test #42:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
48 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 1 1 0 1 1 0 0 0 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 1 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0...
output:
YES 41 29 7 25 11 39 4 20 21 8 30 3 33 32 38 42 37 10 16 12 6 34 18 1 28 5 43 9 40 27 19 23 17 48 2 31 36 46 44 24 15 35 26 22 45 13 14 47 15 8 38 21 39 20 41 46 23 18 47 17 34 22 31 28 45 6 2 44 7 13 5 1 11 19 42 10 37 35 29 4 40 27 12 36 33 43 26 24 9 14 32 25 30 3 48 16
result:
ok ok
Test #43:
score: 0
Accepted
time: 1ms
memory: 3648kb
input:
53 0 1 1 0 1 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 1 1 1 0 1 1 0 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1...
output:
YES 9 46 38 1 39 37 14 29 18 51 11 20 28 30 24 45 43 44 10 22 52 8 4 3 47 2 34 25 21 41 5 7 40 42 27 32 50 17 35 31 6 16 48 23 26 49 13 19 33 12 36 53 15 9 23 15 45 32 49 7 2 1 24 27 8 26 31 52 35 38 46 37 36 30 33 29 11 25 6 39 51 16 13 20 48 5 18 40 47 4 14 22 43 21 28 17 12 53 34 42 41 10 44 19 5...
result:
ok ok
Test #44:
score: 0
Accepted
time: 1ms
memory: 3716kb
input:
59 0 1 1 1 0 0 1 1 1 0 0 0 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1 0 0 0 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 1 0 1 0 1 1 1 0 1 1 1 1 0 1 0 0 0 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1...
output:
YES 39 33 51 34 1 24 11 10 54 38 41 28 43 26 19 57 53 25 6 40 30 14 56 49 36 22 50 2 27 8 47 55 35 13 17 23 3 9 29 52 45 44 7 21 42 4 31 46 37 16 5 12 18 59 15 20 58 32 48 23 21 43 17 28 44 22 2 41 26 3 49 59 4 52 24 57 14 54 50 51 56 5 11 27 19 29 33 7 15 20 39 55 25 35 10 34 9 48 53 58 32 47 1 42 ...
result:
ok ok
Test #45:
score: 0
Accepted
time: 2ms
memory: 3716kb
input:
65 0 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 1 0 0 0 1 1 1 1 0 0 0 0...
output:
YES 9 62 29 63 22 8 41 28 31 36 38 16 27 40 11 44 50 47 23 24 15 56 49 52 55 6 59 60 57 25 46 30 7 1 58 48 17 26 65 10 45 54 21 13 18 3 12 34 14 43 39 37 32 64 33 53 61 4 19 2 42 5 35 20 51 46 33 56 27 63 15 26 41 5 11 37 20 50 65 32 54 1 19 59 28 64 35 8 51 4 29 13 12 48 49 42 23 38 53 31 40 60 6 2...
result:
ok ok
Test #46:
score: 0
Accepted
time: 2ms
memory: 3724kb
input:
72 0 1 0 1 0 0 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 1 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 0 0 0 0...
output:
YES 48 50 54 12 35 29 46 26 60 4 5 38 13 41 66 33 47 16 57 71 63 39 37 68 55 14 6 8 19 44 24 20 30 27 17 25 22 45 7 21 28 9 3 58 64 42 52 56 67 2 59 51 23 18 34 62 31 1 15 70 10 69 11 72 43 61 65 49 36 32 40 53 38 64 14 19 62 70 48 8 30 67 61 59 36 1 49 3 6 47 46 15 34 37 24 27 9 51 12 40 29 23 35 6...
result:
ok ok
Test #47:
score: 0
Accepted
time: 2ms
memory: 3804kb
input:
77 0 0 0 0 1 0 0 1 1 1 1 0 1 1 0 0 1 1 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 1...
output:
YES 26 27 9 45 16 30 61 10 73 5 21 7 44 39 33 49 4 54 72 24 29 55 47 34 22 23 43 52 2 8 3 75 13 18 48 50 17 46 35 64 65 15 31 42 19 77 59 53 74 67 70 40 38 36 6 63 28 76 57 1 51 41 11 71 37 25 20 56 60 32 58 66 12 14 68 62 69 58 8 77 52 14 22 26 51 73 47 7 60 65 75 2 9 35 74 10 42 48 40 53 3 38 21 4...
result:
ok ok
Test #48:
score: 0
Accepted
time: 3ms
memory: 3672kb
input:
82 0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 1 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 1...
output:
YES 28 66 44 50 67 45 43 76 25 27 55 48 57 33 79 47 18 9 73 81 38 26 6 14 37 17 78 2 51 11 22 41 15 58 68 60 39 49 30 54 65 12 1 69 21 75 64 82 72 4 42 20 7 53 56 5 59 16 31 74 46 3 13 10 62 71 70 36 77 29 19 34 24 52 23 8 61 63 80 32 35 40 68 26 82 19 2 66 73 30 47 39 61 78 71 6 59 53 74 14 35 24 6...
result:
ok ok
Test #49:
score: 0
Accepted
time: 3ms
memory: 3760kb
input:
86 0 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 0...
output:
YES 42 28 12 46 82 9 37 21 33 60 10 48 61 22 80 70 26 43 41 81 86 59 62 44 5 78 58 85 67 50 4 19 49 29 13 64 27 77 69 2 40 7 16 1 38 52 73 11 18 32 66 31 34 57 20 15 6 74 23 55 65 45 53 51 63 47 3 25 8 76 68 17 79 14 71 30 39 75 83 36 84 56 72 24 54 35 75 54 26 37 85 79 52 70 84 64 74 2 65 69 71 27 ...
result:
ok ok
Test #50:
score: 0
Accepted
time: 3ms
memory: 3724kb
input:
90 0 0 0 1 0 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 1...
output:
YES 68 4 30 79 1 18 29 90 16 24 8 40 75 81 19 38 88 61 15 10 84 6 5 65 21 25 49 46 35 43 59 17 64 85 37 56 14 45 86 27 23 62 50 53 70 60 76 20 11 32 26 52 72 73 39 12 7 82 83 78 42 69 89 36 77 87 66 71 47 2 13 57 31 67 3 33 34 28 48 58 80 22 44 51 63 55 74 9 41 54 19 60 87 34 35 2 9 7 51 84 12 80 50...
result:
ok ok
Test #51:
score: 0
Accepted
time: 3ms
memory: 3756kb
input:
91 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1 0...
output:
YES 90 68 40 22 59 58 88 61 67 77 63 64 49 4 79 78 14 10 29 47 31 86 23 87 50 80 27 48 84 33 12 74 38 75 41 26 53 19 82 15 13 89 17 81 91 54 32 39 85 44 2 46 43 7 37 3 8 51 56 21 45 52 72 18 30 9 24 76 35 5 62 34 73 28 1 57 16 83 20 36 55 11 69 71 25 60 42 6 66 65 70 88 74 49 67 50 16 55 41 40 57 8 ...
result:
ok ok
Test #52:
score: 0
Accepted
time: 3ms
memory: 3796kb
input:
92 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 1 1...
output:
YES 9 42 49 40 88 17 56 21 23 31 83 6 79 51 33 36 41 50 37 12 76 45 54 4 3 92 78 5 16 27 69 18 86 38 60 90 10 26 91 72 84 64 47 81 82 30 46 55 73 77 35 67 57 75 19 58 66 59 28 70 7 15 62 52 11 43 80 8 53 14 24 39 29 22 13 20 63 89 87 1 61 68 34 74 48 85 25 2 65 32 71 44 5 42 84 40 79 64 69 90 92 59 ...
result:
ok ok
Test #53:
score: 0
Accepted
time: 4ms
memory: 3704kb
input:
93 0 0 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0...
output:
YES 13 9 61 72 2 23 88 68 53 81 16 48 52 34 29 51 27 87 3 32 89 54 64 75 76 14 22 30 55 43 85 74 56 77 31 38 62 63 83 40 18 79 60 25 59 73 57 86 36 92 93 90 5 71 46 67 37 20 84 39 4 15 24 47 50 33 45 7 78 80 12 11 66 58 82 21 44 35 6 70 91 41 28 69 49 1 10 42 8 65 17 19 26 15 84 29 67 33 40 35 34 1 ...
result:
ok ok
Test #54:
score: 0
Accepted
time: 4ms
memory: 3696kb
input:
94 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 1 1 0 1...
output:
YES 11 80 77 3 68 65 32 45 73 93 50 36 54 14 40 9 18 15 23 51 79 70 89 29 69 5 60 22 33 6 67 1 53 61 44 88 57 21 59 52 30 94 39 58 78 74 90 84 81 82 72 34 46 38 71 56 12 49 43 35 4 2 20 37 41 55 16 28 87 91 24 64 63 7 8 76 62 25 83 19 10 17 13 26 27 48 42 92 85 31 86 47 66 75 1 41 17 8 69 88 25 61 2...
result:
ok ok
Test #55:
score: 0
Accepted
time: 4ms
memory: 3704kb
input:
95 0 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 0...
output:
YES 75 35 18 70 79 31 65 37 33 21 3 38 64 11 83 77 45 60 58 42 43 32 40 95 39 26 10 14 56 80 72 29 49 22 89 34 51 67 55 17 27 53 20 52 57 7 23 78 90 25 50 48 4 8 54 46 69 6 15 59 82 44 47 62 2 71 66 91 84 41 76 87 36 24 88 68 93 5 86 73 13 9 1 19 16 12 28 74 63 92 61 81 94 30 85 45 25 92 24 31 51 18...
result:
ok ok
Test #56:
score: 0
Accepted
time: 4ms
memory: 3728kb
input:
96 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0 1 1 0 1 0 0...
output:
YES 81 41 37 79 15 45 73 31 22 48 84 88 94 2 50 62 5 91 28 51 76 61 60 47 63 11 38 8 52 57 67 26 93 46 95 7 14 56 78 35 87 12 64 49 29 53 85 24 36 20 65 34 71 9 77 17 43 18 72 83 59 3 40 4 75 13 30 1 66 96 86 6 10 82 68 80 16 39 44 42 23 90 74 27 70 33 54 19 58 25 32 21 55 89 69 92 13 46 82 52 85 60...
result:
ok ok
Test #57:
score: 0
Accepted
time: 4ms
memory: 3788kb
input:
97 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 0 0...
output:
YES 15 35 53 61 47 30 92 88 60 5 36 45 14 42 31 96 49 74 63 43 22 86 66 46 68 97 69 94 77 52 51 78 93 89 17 20 10 33 12 39 11 4 56 67 79 27 41 18 38 55 32 19 50 81 7 90 87 25 70 73 76 95 65 3 16 34 57 91 29 2 85 82 6 48 21 26 28 13 23 40 64 83 54 62 72 58 71 9 37 59 84 1 75 24 44 8 80 88 35 20 91 8 ...
result:
ok ok
Test #58:
score: 0
Accepted
time: 2ms
memory: 3768kb
input:
98 0 0 1 1 0 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 1 1 0...
output:
YES 52 14 59 55 45 70 32 21 23 8 57 80 41 86 81 42 71 25 76 3 11 82 53 48 36 97 90 67 91 94 84 74 4 33 77 9 27 46 34 69 88 30 89 6 44 65 2 68 39 93 31 7 58 51 20 96 1 24 19 38 87 13 47 5 54 26 64 37 18 85 17 98 56 49 72 50 78 29 28 79 92 61 60 66 10 12 43 73 22 63 75 15 40 16 83 62 95 35 56 74 70 94...
result:
ok ok
Test #59:
score: 0
Accepted
time: 2ms
memory: 3856kb
input:
99 0 1 1 0 0 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 0 1 0 0 0 0 1 1 0 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 1 1...
output:
YES 71 14 76 72 37 67 11 70 63 7 36 88 65 93 59 82 22 21 58 91 10 73 40 31 35 42 3 51 18 15 64 86 24 25 34 23 69 97 12 78 4 77 62 38 19 32 92 9 55 89 99 45 87 5 96 6 74 61 52 75 39 44 26 85 94 27 57 43 33 8 98 49 81 53 30 60 29 90 13 48 66 16 83 79 1 2 46 20 47 56 50 54 17 95 84 68 28 41 80 39 20 46...
result:
ok ok
Test #60:
score: 0
Accepted
time: 4ms
memory: 3680kb
input:
100 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 1 1 1 0 1 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 ...
output:
NO
result:
ok ok
Test #61:
score: 0
Accepted
time: 4ms
memory: 3804kb
input:
100 0 0 1 1 0 1 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 1 1 1 1 1 1 0 1 1 0 1 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 ...
output:
NO
result:
ok ok
Test #62:
score: 0
Accepted
time: 2ms
memory: 3724kb
input:
100 0 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 1 0 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 0 1 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 1 0 0 1 1 0 1 1 ...
output:
NO
result:
ok ok
Test #63:
score: 0
Accepted
time: 4ms
memory: 3712kb
input:
100 0 1 0 1 1 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 0 1 1 0 1 1 0 1 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 1 1 1 0 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 ...
output:
NO
result:
ok ok
Test #64:
score: 0
Accepted
time: 4ms
memory: 3860kb
input:
100 0 0 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 0 1 0 1 1 1 1 1 1 0 1 1 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 ...
output:
YES 57 72 12 3 35 95 51 18 65 61 9 24 34 84 55 98 41 100 68 62 67 28 39 26 21 80 64 30 94 56 16 5 77 78 85 81 69 45 22 15 2 19 53 82 1 70 13 73 20 74 23 46 17 54 40 33 8 89 6 42 43 14 97 52 27 66 63 99 32 44 50 10 31 38 25 86 4 11 76 59 83 93 7 87 90 71 58 60 49 37 91 79 47 48 96 88 92 36 29 75 100 ...
result:
ok ok
Test #65:
score: 0
Accepted
time: 2ms
memory: 3660kb
input:
100 0 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 0 0 0 1 1 0 1 1 1 0 1 0 0 1 0 1 0 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 0 ...
output:
YES 69 96 100 38 86 36 68 99 18 97 33 60 46 81 56 6 66 62 19 83 37 16 30 29 2 12 25 77 47 84 34 43 79 24 57 41 52 67 64 20 53 76 90 65 42 93 63 70 72 54 49 4 27 48 87 39 95 8 22 28 35 92 45 78 13 1 26 89 9 21 40 17 98 75 14 58 80 74 55 59 7 51 15 50 88 23 91 85 11 31 82 73 3 10 5 32 71 61 44 94 80 2...
result:
ok ok
Test #66:
score: 0
Accepted
time: 4ms
memory: 3800kb
input:
100 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 1 0 1 1 0 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 1 1 0 1 1 0 0 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 ...
output:
YES 57 52 60 38 62 85 18 36 2 7 74 26 44 16 20 76 47 42 30 87 50 77 79 78 59 67 4 66 68 54 51 80 34 73 9 1 88 83 3 27 89 63 82 71 23 58 94 65 12 35 93 17 99 90 25 84 24 13 100 8 81 5 29 41 70 64 97 6 98 49 31 95 91 69 72 37 92 56 19 33 46 22 61 40 96 53 14 43 10 32 86 21 55 45 75 11 39 15 28 48 8 78...
result:
ok ok
Test #67:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
100 0 1 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 1 0 0 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 1 0 ...
output:
YES 72 61 98 32 43 51 81 17 91 78 35 73 38 8 3 68 30 71 59 95 63 94 16 80 6 12 90 46 14 20 64 25 82 33 24 10 39 52 2 89 99 21 88 42 60 26 100 54 44 1 77 74 87 36 4 47 55 66 37 93 9 34 15 48 97 41 79 70 13 53 75 22 45 7 57 92 69 85 49 29 27 31 50 23 84 5 18 40 65 11 62 56 96 19 67 28 58 76 83 86 92 2...
result:
ok ok
Test #68:
score: 0
Accepted
time: 4ms
memory: 3756kb
input:
100 0 1 0 0 1 1 0 0 0 0 0 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 1 0 1 0 1 1 1 0 0 0 1 0 0 0 1 1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 ...
output:
YES 44 29 48 63 50 92 89 45 2 83 13 72 25 80 91 70 26 23 32 59 17 20 1 49 69 41 100 43 39 98 28 82 87 76 47 38 3 78 56 12 24 9 97 36 86 90 37 14 54 84 8 11 67 34 21 51 94 57 16 64 27 93 81 79 52 62 74 6 5 73 61 7 19 95 75 99 42 31 4 68 85 15 65 71 58 22 55 33 10 53 35 88 96 46 40 30 18 66 60 77 56 1...
result:
ok ok
Test #69:
score: 0
Accepted
time: 4ms
memory: 3852kb
input:
100 0 1 0 1 1 0 0 1 1 0 1 0 1 1 0 1 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 1 ...
output:
YES 82 63 2 25 39 37 11 51 88 28 93 99 52 95 38 91 55 61 78 13 56 7 59 72 58 75 5 64 98 50 90 44 24 19 76 70 8 69 18 96 36 16 57 33 79 92 21 46 85 22 89 3 30 4 80 34 40 23 15 41 94 6 12 43 29 9 74 31 54 10 73 87 83 42 62 32 48 27 14 35 45 49 81 47 66 67 77 1 84 65 26 97 53 60 20 100 17 71 68 86 39 1...
result:
ok ok
Test #70:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
100 0 1 0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 1 0 0 1 0 1 1 1 1 1 0 1 1 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 1 1 0 1 1 0 1 1 0 0 1 1 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0 1 1 0 1 ...
output:
YES 64 17 37 63 84 51 58 66 54 94 7 60 83 76 35 33 2 100 3 44 59 53 9 13 79 52 56 96 92 90 91 61 72 4 57 22 11 55 31 71 88 74 5 99 19 49 62 18 20 47 8 86 89 25 6 67 73 41 97 24 68 32 85 93 98 87 42 82 43 70 36 80 69 77 28 14 16 27 95 40 15 48 65 21 75 1 10 26 45 81 78 34 12 38 39 50 30 23 29 46 44 4...
result:
ok ok
Test #71:
score: 0
Accepted
time: 2ms
memory: 3712kb
input:
100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 1 0 1 1 1 0 0 ...
output:
YES 1 51 90 69 14 32 75 86 22 53 98 39 61 23 65 72 24 10 77 4 81 73 36 2 47 35 42 99 74 17 60 54 95 97 28 71 80 43 100 91 3 76 82 15 79 5 8 25 11 38 34 19 59 55 85 20 13 27 88 37 26 9 70 93 29 31 78 40 84 33 64 68 16 21 67 89 12 45 87 6 52 41 49 62 18 92 48 44 58 63 96 46 66 56 7 50 94 83 30 57 95 4...
result:
ok ok
Test #72:
score: 0
Accepted
time: 4ms
memory: 3796kb
input:
100 0 1 0 1 0 1 1 0 0 1 1 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 0 0 1 1 0 1 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 0 1 1 0 0 1 0 0 1 ...
output:
YES 15 57 66 75 97 55 52 85 11 69 88 73 9 6 61 21 29 5 24 40 95 19 64 59 94 26 22 10 77 67 91 58 20 17 60 7 98 38 23 18 56 28 32 42 8 37 99 83 43 63 89 4 62 81 44 84 65 33 48 50 14 76 72 3 2 86 51 68 12 79 93 45 16 92 34 35 30 39 78 87 96 1 54 82 80 13 70 53 71 74 41 90 49 31 25 46 100 27 36 47 34 6...
result:
ok ok
Test #73:
score: 0
Accepted
time: 4ms
memory: 3804kb
input:
100 0 1 0 1 1 0 1 1 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 1 1 0 0 1 1 0 0 1 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 1 0 0 0 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 0 0 0 0 1 0 1 1 0 1 0 1 1 1 0 0 ...
output:
YES 53 78 90 84 86 99 62 77 85 8 3 40 31 2 64 89 80 74 61 11 76 33 29 88 66 59 37 46 81 56 72 32 49 91 6 35 4 79 36 30 28 75 69 27 16 52 21 60 82 67 41 98 10 83 38 94 71 65 39 93 47 87 15 9 58 57 26 100 45 44 12 5 95 42 34 70 54 13 17 1 7 73 25 48 63 96 19 14 24 55 97 20 92 68 50 43 18 23 22 51 40 6...
result:
ok ok
Test #74:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
9 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0
output:
YES 1 2 3 6 4 5 7 8 9 2 1 3 7 4 5 6 8 9
result:
ok ok
Test #75:
score: 0
Accepted
time: 1ms
memory: 3640kb
input:
54 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
YES 53 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 51 41 42 43 44 45 46 47 48 49 50 52 54 54 1 2 3 4 5 6 7 8 9 10 11 12 14 13 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 52 41 42 43 44 45 46 47 48 49...
result:
ok ok
Test #76:
score: 0
Accepted
time: 1ms
memory: 3756kb
input:
100 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
YES 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1 2 ...
result:
ok ok
Test #77:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
100 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
YES 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 32 22 23 24 25 26 27 28 29 30 31 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 67 54 55 56 57 58 59 60 61 62 63 64 65 66 86 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1 2 ...
result:
ok ok
Test #78:
score: 0
Accepted
time: 1ms
memory: 3680kb
input:
100 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
YES 1 2 3 4 5 85 6 7 8 9 10 11 12 13 37 14 15 25 16 17 18 19 20 21 22 23 60 24 26 27 28 29 30 31 32 33 34 35 36 38 39 40 41 42 43 44 45 46 47 48 49 50 58 51 52 53 54 65 55 95 56 57 59 61 62 63 64 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 96 83 84 86 87 88 89 90 91 92 93 97 94 98 99 100 1 2 ...
result:
ok ok
Test #79:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
4 0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0
output:
YES 2 3 1 4 1 3 4 2
result:
ok ok
Test #80:
score: 0
Accepted
time: 1ms
memory: 3720kb
input:
89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0...
output:
NO
result:
ok ok
Test #81:
score: 0
Accepted
time: 1ms
memory: 3852kb
input:
100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
YES 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 100 ...
result:
ok ok
Test #82:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
YES 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 50 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 100 ...
result:
ok ok
Test #83:
score: 0
Accepted
time: 1ms
memory: 3784kb
input:
100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
YES 1 2 3 4 5 6 7 54 8 9 10 77 11 12 83 86 13 14 15 16 17 35 18 37 93 19 20 21 56 22 23 24 25 36 26 27 28 29 30 31 32 63 33 34 38 39 40 41 42 52 43 44 45 46 47 48 49 50 51 53 55 85 57 58 59 60 61 62 64 65 82 66 67 79 68 69 70 71 72 73 74 78 75 76 80 81 84 87 88 89 90 91 92 94 95 96 97 98 99 100 100 ...
result:
ok ok