QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#150840 | #6336. Council | JCY_ | 100 ✓ | 408ms | 34016kb | C++17 | 2.8kb | 2023-08-26 13:52:11 | 2023-08-26 13:52:13 |
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;
}
struct set1 {
int x, y;
void insert(int v) {
if (!x) {
x = v;
} else if (x != v) {
y = v;
}
}
set1 &operator+=(const set1 &o) {
if (o.x) {
insert(o.x);
if (o.y) insert(o.y);
}
return *this;
}
};
struct set2 {
pair<int, int> x, y;
void insert(const pair<int, int> &v) {
if (!x.second) {
x = v;
} else if (x.second == v.second) {
chkmax(x.first, v.first);
} else if (!y.second) {
y = v;
if (x.first < y.first) swap(x, y);
} else if (y.second == v.second) {
chkmax(y.first, v.first);
if (x.first < y.first) swap(x, y);
} else if (v.first > x.first) {
y = x;
x = v;
} else if (v.first > y.first) {
y = v;
}
}
set2 &operator+=(const set2 &o) {
if (o.x.second) {
insert(o.x);
if (o.y.second) insert(o.y);
}
return *this;
}
};
template <typename T>
void fmt_or(T f[], int len) {
for (int i = 1; i < len; i <<= 1) {
for (int j = 0; j < len; j += i << 1)
for (int k = j; k < j + i; ++k) f[k + i] += f[k];
}
}
template <typename T>
void fmt_and(T f[], int len) {
for (int i = 1; i < len; i <<= 1) {
for (int j = 0; j < len; j += i << 1)
for (int k = j; k < j + i; ++k) f[k] += f[k + i];
}
}
constexpr int MAXN = 3e5 + 10, MAXM = 20;
int n, m, sum[MAXM], lim;
bool a[MAXN][MAXM];
set1 f[1 << MAXM];
set2 g[1 << MAXM];
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n >> m;
for (int i = 1; i <= n; ++i) {
int msk = 0;
for (int j = 0; j < m; ++j) {
cin >> a[i][j];
sum[j] += a[i][j];
if (!a[i][j]) msk |= 1 << j;
}
f[msk].insert(i);
}
lim = n / 2;
fmt_and(f, 1 << m);
for (int i = 0; i < 1 << m; ++i) {
int tmp = __builtin_popcount(i);
if (f[i].x) {
g[i].insert({tmp, f[i].x});
if (f[i].y) g[i].insert({tmp, f[i].y});
}
}
fmt_or(g, 1 << m);
for (int i = 1; i <= n; ++i) {
int ans = 0, msk = 0;
for (int j = 0; j < m; ++j) {
int tmp = sum[j] - a[i][j];
if (tmp > lim) {
++ans;
} else if (tmp == lim) {
msk |= 1 << j;
}
}
assert(g[msk].y.second);
if (g[msk].x.second == i) {
ans += g[msk].y.first;
} else {
ans += g[msk].x.first;
}
cout << ans << "\n";
}
return 0;
}
// g++ council.cpp -o council -Wall -Wextra -Wshadow -O2 -std=c++14 -fsanitize=address,undefined
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 8
Accepted
Test #1:
score: 8
Accepted
time: 31ms
memory: 25980kb
input:
38 20 0 0 0 0 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 1 0 0 0 0 0 0 0 0 0 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 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 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 ...
output:
18 18 1 1 18 18 18 1 1 18 18 18 18 18 18 18 1 18 18 1 18 1 1 18 1 1 18 18 1 1 1 18 1 1 1 18 1 1
result:
ok 38 numbers
Test #2:
score: 0
Accepted
time: 16ms
memory: 21956kb
input:
300 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...
result:
ok 300 numbers
Test #3:
score: 0
Accepted
time: 18ms
memory: 24472kb
input:
5 20 0 0 0 1 1 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 1 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 1 0 1 1
output:
7 9 9 8 9
result:
ok 5 number(s): "7 9 9 8 9"
Test #4:
score: 0
Accepted
time: 30ms
memory: 23672kb
input:
20 20 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 0 1 0 0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 0 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 0 1 1 1 0 0 0 0 0 1 0 1 1 0 1 1 0 0 1 1 1 1 1 0 1 1 1 1 0 1 0 0 0 0 0 1 1 0 1 1 0 1 0 0 0 0 1 0 0 0 ...
output:
12 13 12 13 12 13 12 13 11 13 12 12 11 11 12 13 12 13 13 11
result:
ok 20 numbers
Test #5:
score: 0
Accepted
time: 75ms
memory: 28572kb
input:
300 20 1 1 0 0 1 1 1 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 0 0 0 0 0 0 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 1 1 1 0 0 1 0 1...
output:
10 11 11 10 11 11 11 10 11 11 11 10 10 10 10 10 11 11 11 11 10 10 10 10 10 11 11 11 10 11 10 10 10 10 10 10 11 11 10 11 10 11 11 10 10 11 11 11 11 10 10 11 10 11 11 10 10 11 11 10 10 10 10 11 10 10 10 11 11 10 11 10 11 11 11 10 10 11 11 10 10 10 10 10 11 11 10 11 10 11 10 10 11 10 10 11 10 10 11 10 ...
result:
ok 300 numbers
Test #6:
score: 0
Accepted
time: 25ms
memory: 23460kb
input:
5 20 1 1 1 1 1 0 0 1 1 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 1 0 0 0 1 1 1 1
output:
10 9 11 11 11
result:
ok 5 number(s): "10 9 11 11 11"
Test #7:
score: 0
Accepted
time: 42ms
memory: 25156kb
input:
20 20 0 0 1 1 0 1 0 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 1 0 1 0 1 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 0 0 1 1 1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 0 1 0 0 1 1 1 1 1 0 1 1 1 0 0 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 ...
output:
11 11 11 11 10 12 12 11 12 9 11 12 11 13 10 10 13 12 11 11
result:
ok 20 numbers
Test #8:
score: 0
Accepted
time: 80ms
memory: 28128kb
input:
300 20 1 1 0 0 1 1 1 1 0 0 0 1 1 0 1 1 0 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 1 0 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 0 1 0 0 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1 0 1 1 0 1 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 1...
output:
15 14 15 15 16 16 16 17 15 14 15 17 16 15 14 16 13 16 16 14 16 14 16 15 16 15 15 13 17 14 15 15 14 18 14 17 14 16 16 16 13 17 18 16 16 16 16 13 16 15 18 15 17 17 15 14 15 14 17 13 15 16 14 17 16 14 16 15 12 16 17 16 16 14 15 13 15 14 17 12 15 13 15 12 12 17 14 19 16 17 13 16 12 16 13 16 17 14 15 18 ...
result:
ok 300 numbers
Test #9:
score: 0
Accepted
time: 1ms
memory: 5500kb
input:
3 1 0 1 0
output:
1 0 1
result:
ok 3 number(s): "1 0 1"
Test #10:
score: 0
Accepted
time: 2ms
memory: 5456kb
input:
26 1 1 0 1 1 0 1 0 0 0 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1
output:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
result:
ok 26 numbers
Test #11:
score: 0
Accepted
time: 2ms
memory: 5504kb
input:
4 2 1 1 1 1 0 1 0 1
output:
1 1 2 2
result:
ok 4 number(s): "1 1 2 2"
Test #12:
score: 0
Accepted
time: 1ms
memory: 5460kb
input:
5 2 0 1 1 1 0 0 0 0 0 0
output:
0 0 1 1 1
result:
ok 5 number(s): "0 0 1 1 1"
Test #13:
score: 0
Accepted
time: 0ms
memory: 5632kb
input:
300 2 1 0 0 1 0 1 0 0 0 0 0 1 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 0 1 0 0 0 0 0 1 1 0 1 1 1 0 1 0 1 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 0 0 0 1 ...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 300 numbers
Test #14:
score: 0
Accepted
time: 0ms
memory: 5456kb
input:
26 1 0 1 0 1 0 0 0 0 1 1 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1
output:
1 0 1 0 1 1 1 1 0 0 0 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0
result:
ok 26 numbers
Test #15:
score: 0
Accepted
time: 2ms
memory: 5564kb
input:
4 2 0 1 1 0 1 1 1 1
output:
2 2 1 1
result:
ok 4 number(s): "2 2 1 1"
Test #16:
score: 0
Accepted
time: 0ms
memory: 5456kb
input:
5 2 0 0 1 0 1 1 0 1 1 1
output:
2 2 2 2 2
result:
ok 5 number(s): "2 2 2 2 2"
Test #17:
score: 0
Accepted
time: 1ms
memory: 5460kb
input:
300 2 0 1 1 0 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0 1 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 1 1 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 1 0 0 0 1 0 1 0 0 0 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 0 0 1 0 0 1 0 1 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 1 1 1 0 0 1 0 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 0 1 0 0 0 1 1 0 0 0 ...
output:
1 1 1 2 1 0 2 1 0 1 2 1 1 2 0 2 1 1 0 1 0 1 2 1 1 1 1 1 2 1 1 2 0 0 1 1 1 0 0 1 1 2 1 1 0 1 1 0 1 0 0 0 1 1 0 2 1 0 2 1 0 0 1 0 2 1 0 1 1 1 2 0 2 2 1 1 1 1 1 0 1 1 2 0 2 1 2 1 1 0 0 0 0 1 2 1 0 1 2 1 1 1 1 1 0 1 2 1 2 1 1 2 1 2 2 1 1 1 0 2 1 1 2 1 1 2 0 1 2 0 0 0 2 1 2 1 2 0 0 1 1 1 1 0 1 0 2 1 0 1 ...
result:
ok 300 numbers
Test #18:
score: 0
Accepted
time: 0ms
memory: 5588kb
input:
18 10 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 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 ...
output:
8 8 8 8 1 8 1 1 8 1 1 8 1 1 1 8 8 8
result:
ok 18 numbers
Test #19:
score: 0
Accepted
time: 1ms
memory: 5436kb
input:
5 3 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0
output:
3 2 2 2 3
result:
ok 5 number(s): "3 2 2 2 3"
Test #20:
score: 0
Accepted
time: 1ms
memory: 5460kb
input:
31 4 1 1 0 0 0 1 0 0 0 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 1 1 0 0 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 0 1 1 0 0 1 0 0 0 1 0
output:
2 3 3 3 3 3 2 2 3 2 2 2 2 3 2 3 2 2 3 2 3 3 2 3 3 2 3 2 2 3 3
result:
ok 31 numbers
Test #21:
score: 0
Accepted
time: 1ms
memory: 5456kb
input:
30 5 0 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 1 1 1 0 1 0 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 1 0 1 1 1 0 0 1 1 1 0 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 0 1 0 0 0 0 1 1 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 0 0 0 1 1 0 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 1 1 1 1 1 0
output:
2 3 2 2 1 1 3 1 2 1 3 3 2 1 3 3 3 2 2 2 1
result:
ok 21 numbers
Test #24:
score: 0
Accepted
time: 2ms
memory: 5572kb
input:
53 8 1 0 0 1 1 0 1 0 0 1 0 1 1 1 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 0 0 1 0 1 1 0 1 0 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 1 0 1 0 0 0 1 1 1 1 0 1 0 0 0 1...
output:
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
result:
ok 53 numbers
Test #25:
score: 0
Accepted
time: 0ms
memory: 5604kb
input:
12 9 1 1 0 0 0 1 0 0 0 1 1 0 1 0 1 1 1 0 1 0 0 0 0 1 1 0 0 0 0 1 1 0 1 0 0 0 1 1 1 0 1 0 1 1 1 0 0 0 1 1 1 0 1 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 1
output:
3 3 4 3 3 3 3 4 3 3 3 3
result:
ok 12 numbers
Test #26:
score: 0
Accepted
time: 1ms
memory: 5488kb
input:
37 10 0 0 1 0 1 1 1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 1 1 1 0 1 0 0 1 1 1 0 1 1 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 1 0 1 0 0 0 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 0 1 0 0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 1 1 1 0 0 1 1 1 0 0 1 0 1 1 1 1 1 0 1 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 0 0 1 0 0 1 ...
output:
3 2 3 2 3 3 3 2 3 2 2 3 2 2 2 2 3 2 3 2 3 3 3 2 3 2 3 2 2 3 2 2 3 3 3 2 3
result:
ok 37 numbers
Test #27:
score: 0
Accepted
time: 0ms
memory: 5536kb
input:
300 10 0 1 1 1 0 0 1 0 1 1 0 0 0 1 1 1 1 0 1 1 0 1 0 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 1 0 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 0 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0...
output:
4 4 5 5 5 4 4 5 5 5 5 4 5 4 4 5 5 4 5 4 5 4 5 4 4 5 5 5 4 5 4 4 5 4 4 5 5 4 5 5 5 4 4 5 4 4 5 5 5 4 5 5 4 5 4 5 5 5 4 5 4 5 4 4 4 4 5 5 5 5 5 4 5 5 5 4 5 5 5 5 4 4 5 4 4 4 4 4 5 4 5 5 5 4 5 5 5 5 5 4 5 4 5 4 5 4 4 4 5 4 5 5 5 4 4 5 4 5 4 5 4 4 5 4 4 5 4 4 4 5 5 4 5 5 5 5 4 4 4 4 5 5 5 4 4 4 4 5 4 4 ...
result:
ok 300 numbers
Test #28:
score: 0
Accepted
time: 0ms
memory: 5620kb
input:
5 3 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0
output:
3 3 3 3 3
result:
ok 5 number(s): "3 3 3 3 3"
Test #29:
score: 0
Accepted
time: 1ms
memory: 5560kb
input:
31 4 0 1 1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 0 1 0 0 1 0 1 1 1 0 0 0 1 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 1 1 0 1 1 0 1 0 0 1 1 0 0 1 1 1 0 1 0 1 1 1 1 1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1 1 0 1 0 0 1 1 0 0 0
output:
2 2 3 3 3 3 4 4 3 3 3 2 3 3 4 2 2 3 3 3 3 3 3 3 4 3 3 4 3 3 4
result:
ok 31 numbers
Test #30:
score: 0
Accepted
time: 1ms
memory: 5572kb
input:
30 5 0 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0 1 0 1 1 1 0 1 0 1 1 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 0 1 0 0 0 1 1 1 0 0 1 0 1 1 1 1 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 1 1 0 0 1 1 0 1 0 0 1 1 0 1 1 1 0 1 1 0 0 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0...
output:
4 4 4 4 4 3 4 3 4 3 4 4 4 3 4 5 4 4 4 4 4 4 3 4 3 5 3 5 5 4
result:
ok 30 numbers
Test #31:
score: 0
Accepted
time: 2ms
memory: 5444kb
input:
188 6 1 1 1 0 1 0 1 0 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 1 0 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1 0 1 1 0 0 0 0 0 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 1 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 0 0 1 1 1 0 1 1 1 0 0 0 1...
output:
6 7 7 6 7 5 5 7 6 5 7 7 7 6 5 7 7 6 7 8 7 5 7 5 5 5 7 6 7 7 8 7 7 5 6 5 6 7 6 7 7 6 7 7 7 6 7 6 7 6 7 6 6
result:
ok 53 numbers
Test #34:
score: 0
Accepted
time: 2ms
memory: 5640kb
input:
12 9 0 1 1 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 0 1 1 1 1 1
output:
5 6 7 5 6 6 4 4 5 6 7 5
result:
ok 12 numbers
Test #35:
score: 0
Accepted
time: 0ms
memory: 5604kb
input:
37 10 0 1 0 0 1 0 1 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 1 0 1 1 0 1 1 0 1 1 1 0 1 1 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 1 1 1 0 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 0 1 1 0 0 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 1 0 0 1 ...
output:
6 7 6 7 5 5 6 5 6 4 6 7 7 7 7 7 6 7 7 7 6 7 7 7 5 6 6 7 6 7 7 6 7 6 7 7 7
result:
ok 37 numbers
Test #36:
score: 0
Accepted
time: 1ms
memory: 5428kb
input:
300 10 1 0 1 1 0 1 1 1 0 0 1 1 1 0 1 0 0 1 0 1 0 0 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 1 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1 1 1 1 1 0 0 1 1 0 1...
output:
8 8 8 8 8 10 8 7 7 6 9 8 10 6 6 7 8 7 8 8 6 10 9 8 10 9 7 8 9 6 8 7 9 8 7 7 7 8 9 7 8 8 7 7 8 8 8 8 8 7 9 9 6 8 8 8 8 7 10 8 8 9 9 7 7 8 9 8 9 8 9 9 9 6 7 8 8 9 9 8 7 10 9 9 8 8 8 8 8 6 9 8 9 8 8 9 7 9 8 8 8 7 8 7 8 9 8 8 8 7 9 9 7 8 7 8 8 6 8 6 7 7 8 8 6 7 9 9 9 8 8 7 7 7 9 9 7 7 7 8 7 9 9 8 8 7 8 ...
result:
ok 300 numbers
Test #37:
score: 0
Accepted
time: 1ms
memory: 5820kb
input:
26 14 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 0 0 ...
output:
12 1 12 12 1 12 1 12 12 1 12 1 12 12 12 1 12 1 1 12 12 1 1 1 1 12
result:
ok 26 numbers
Test #38:
score: 0
Accepted
time: 0ms
memory: 5904kb
input:
5 14 0 1 1 0 1 1 0 0 1 1 0 0 1 0 0 1 1 0 1 1 0 0 1 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 1 1 1 0 1
output:
9 9 8 8 9
result:
ok 5 number(s): "9 9 8 8 9"
Test #39:
score: 0
Accepted
time: 2ms
memory: 5844kb
input:
20 14 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 1 0 1 1 0 0 0 1 1 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 0 1 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 0 0 0 1 1 1 1 0 0 1 0 0 0 ...
output:
7 6 7 5 6 5 7 5 6 6 6 5 6 7 6 6 5 7 6 6
result:
ok 20 numbers
Test #40:
score: 0
Accepted
time: 2ms
memory: 5804kb
input:
5 14 0 0 0 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 1 0
output:
8 8 9 6 9
result:
ok 5 number(s): "8 8 9 6 9"
Test #41:
score: 0
Accepted
time: 2ms
memory: 5992kb
input:
20 14 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 1 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 0 1 1 0 0 1 1 1 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 0 0 1 0 1 1 0 0 0 1 ...
output:
11 11 11 9 10 10 12 11 10 11 13 9 9 11 13 11 10 11 9 11
result:
ok 20 numbers
Test #42:
score: 0
Accepted
time: 3ms
memory: 8024kb
input:
32 17 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 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 0 1 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 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 ...
output:
15 15 15 15 15 15 15 15 15 15 1 15 1 1 15 1 1 15 15 1 15 1 1 1 1 1 1 1 15 15 1 1
result:
ok 32 numbers
Test #43:
score: 0
Accepted
time: 2ms
memory: 7940kb
input:
5 17 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 1 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 1 0 0 0
output:
10 12 11 9 12
result:
ok 5 number(s): "10 12 11 9 12"
Test #44:
score: 0
Accepted
time: 7ms
memory: 8208kb
input:
20 17 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 0 0 1 0 0 1 0 0 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 1 1 0 1 0 1 1 1 1 ...
output:
14 14 14 12 13 14 12 12 13 13 13 12 12 13 13 13 13 13 14 13
result:
ok 20 numbers
Test #45:
score: 0
Accepted
time: 3ms
memory: 7820kb
input:
5 17 0 0 1 1 1 1 1 0 0 1 1 1 0 0 1 0 0 1 1 1 1 0 0 0 1 1 0 1 1 0 1 0 1 0 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 1 1 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 0 1 1
output:
11 11 10 11 10
result:
ok 5 number(s): "11 11 10 11 10"
Test #46:
score: 0
Accepted
time: 8ms
memory: 8528kb
input:
20 17 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 1 1 0 1 1 0 0 1 0 0 1 ...
output:
12 9 12 12 12 10 12 9 10 11 11 14 12 11 13 11 14 9 9 12
result:
ok 20 numbers
Subtask #2:
score: 8
Accepted
Dependency #1:
100%
Accepted
Test #47:
score: 8
Accepted
time: 17ms
memory: 24000kb
input:
3000 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...
result:
ok 3000 numbers
Test #48:
score: 0
Accepted
time: 51ms
memory: 29520kb
input:
3000 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 3000 numbers
Test #49:
score: 0
Accepted
time: 96ms
memory: 29760kb
input:
3000 20 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1 0 0 1 1 0 0 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 1 1 0 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 1 0 1 1 1 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 ...
output:
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 ...
result:
ok 3000 numbers
Test #50:
score: 0
Accepted
time: 103ms
memory: 29292kb
input:
3000 20 1 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 1 0 1 1 1 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 1 0 0 0 1 0 0 0 1 1 1 0 1 1 0 0 0 0 0 1 1 0 0 ...
output:
17 15 14 14 15 17 15 16 13 17 13 16 15 13 13 15 15 17 13 14 15 13 16 18 15 15 14 17 15 15 13 16 15 15 15 13 15 14 17 13 13 15 14 14 15 14 15 15 16 13 13 17 15 18 13 12 18 16 15 16 17 15 14 16 14 15 14 17 12 15 14 15 13 17 12 15 12 16 18 16 14 15 15 14 16 16 14 11 13 13 15 13 15 16 15 14 12 14 15 17 ...
result:
ok 3000 numbers
Test #51:
score: 0
Accepted
time: 0ms
memory: 5504kb
input:
3000 2 1 0 1 0 0 0 1 1 0 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 1 0 0 1 1 1 1 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 0 0 0 1 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 1...
output:
1 1 2 1 2 1 2 2 1 1 1 2 2 1 2 1 1 2 2 1 2 2 2 1 1 2 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 2 1 2 1 1 1 2 1 1 1 1 2 2 1 1 1 2 1 2 2 1 2 2 1 2 2 2 2 1 2 1 1 1 1 1 1 1 2 2 2 2 1 1 2 1 2 2 2 1 1 1 1 1 2 1 1 2 2 1 2 2 2 2 2 1 1 2 1 2 2 2 1 1 2 1 1 2 2 1 2 1 1 1 1 1 2 2 2 2 1 1 2 1 2 2 2 2 2 2 2 1 2 2 2 1 1 2 1 2 ...
result:
ok 3000 numbers
Test #52:
score: 0
Accepted
time: 13ms
memory: 8704kb
input:
3000 17 1 1 1 1 0 0 1 0 1 0 0 1 1 1 0 0 1 1 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 1 0 0 1 1 1 1 1 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 0 1 1 1 0 0 0 0 0 1 0 0 1 1 0 1 0 1 1 1 0 1 1 0 1 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 0 1 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 1 1 1 ...
output:
13 14 12 13 14 11 13 14 13 12 15 14 15 13 12 16 13 13 14 13 14 14 12 13 13 13 14 13 13 13 16 13 14 12 12 14 14 13 14 12 12 13 13 13 12 15 11 13 14 14 14 14 11 12 15 13 14 13 14 13 11 11 15 13 13 15 12 12 12 14 16 14 15 14 14 14 13 14 14 12 15 12 12 12 16 14 14 14 16 14 13 13 13 15 12 14 14 13 14 12 ...
result:
ok 3000 numbers
Subtask #3:
score: 6
Accepted
Test #53:
score: 6
Accepted
time: 31ms
memory: 11168kb
input:
300000 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok 300000 numbers
Test #54:
score: 0
Accepted
time: 36ms
memory: 11376kb
input:
300000 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 1 1 2 2 2 2 1 2 1 2 1 1 2 2 2 1 2 1 1 1 1 2 1 2 1 2 1 1 1 1 1 1 2 2 2 2 2 2 1 1 1 2 ...
result:
ok 300000 numbers
Subtask #4:
score: 19
Accepted
Dependency #3:
100%
Accepted
Test #59:
score: 19
Accepted
time: 138ms
memory: 11072kb
input:
299999 10 0 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 0 0 1 1 0 0 1 0 1 1 1 0 0 1 1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 0 0 1 0 1 0 1 1 0 0 0 1 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 1 0 0 0 1 0 0 1 1 1 1 1 1 1 0 0 ...
output:
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ...
result:
ok 299999 numbers
Test #60:
score: 0
Accepted
time: 134ms
memory: 10076kb
input:
299997 9 0 1 0 1 1 1 0 0 1 1 1 0 1 0 0 0 1 0 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 0 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 0 0 1 1 1 0 1 1 0 0 0 1 1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 5 5 5 5 5 5 5 5 5 5 5 5 5 ...
result:
ok 299997 numbers
Test #62:
score: 0
Accepted
time: 105ms
memory: 11128kb
input:
300000 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 ...
result:
ok 300000 numbers
Test #63:
score: 0
Accepted
time: 113ms
memory: 9916kb
input:
300000 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 0 0 1 0 1 0 1 1 0 0 0 1 1 0 0 1 0 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 1 1 0 1 1 ...
output:
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ...
result:
ok 299997 numbers
Test #69:
score: 0
Accepted
time: 151ms
memory: 10060kb
input:
300000 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 ...
result:
ok 300000 numbers
Test #70:
score: 0
Accepted
time: 146ms
memory: 11240kb
input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 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ...
result:
ok 300000 numbers
Test #72:
score: 0
Accepted
time: 195ms
memory: 11020kb
input:
300000 14 1 1 1 1 0 0 1 0 0 1 0 0 0 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 1 0 0 1 0 1 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 1 1 1 1 1 1 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1 0 1 1 1 0 0 1 0 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 ...
output:
12 10 10 14 10 9 9 12 12 9 12 12 11 10 10 12 11 11 12 11 12 12 13 9 12 11 13 11 11 8 12 14 12 10 9 13 11 12 12 11 11 12 10 11 12 10 12 10 10 11 11 10 12 10 11 12 9 10 12 10 11 11 10 10 10 10 9 11 12 11 11 13 11 13 10 11 9 10 11 9 11 12 11 11 11 10 12 9 12 10 11 11 11 11 13 9 13 11 11 12 12 11 11 11 ...
result:
ok 300000 numbers
Subtask #6:
score: 22
Accepted
Dependency #5:
100%
Accepted
Test #73:
score: 22
Accepted
time: 193ms
memory: 12800kb
input:
300000 16 0 1 0 1 0 1 1 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 0 0 0 0 1 1 1 1 1 1 0 1 1 0 1 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 1 0 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 0 ...
output:
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 ...
result:
ok 300000 numbers
Test #74:
score: 0
Accepted
time: 108ms
memory: 10696kb
input:
114692 17 0 0 1 1 0 1 0 1 0 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 1 1 1 1 0 1 0 1 1 1 1 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1 1 1 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 0 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 0 1 0 1 1 1 0 1 0 0 1 1 ...
output:
17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 ...
result:
ok 114692 numbers
Test #75:
score: 0
Accepted
time: 112ms
memory: 12608kb
input:
122884 17 1 0 0 0 1 0 1 0 0 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 1 1 0 1 0 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 1 0 1 1 0 1 0 0 1 1 1 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 1 0 1 0 1 1 0 0 1 1 0 0 1 0 ...
output:
17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 ...
result:
ok 122884 numbers
Test #76:
score: 0
Accepted
time: 113ms
memory: 10700kb
input:
126980 17 1 0 0 1 0 0 0 0 1 1 1 0 0 1 1 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 ...
output:
17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 ...
result:
ok 126980 numbers
Test #77:
score: 0
Accepted
time: 236ms
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 ...
result:
ok 300000 numbers
Test #81:
score: 0
Accepted
time: 185ms
memory: 12492kb
input:
300000 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 1 1 0 0 0 0 1 0 0 1 0 ...
output:
12 12 15 14 13 14 14 12 15 14 14 13 14 11 12 13 15 13 15 15 14 14 15 14 13 12 13 14 14 12 12 14 14 15 13 13 14 13 15 13 15 15 15 14 14 13 13 14 14 13 13 16 14 14 14 15 15 16 15 13 15 12 14 14 14 15 15 13 16 14 13 13 15 14 15 14 13 15 13 16 14 13 15 14 14 12 14 15 12 13 14 15 13 13 15 17 12 13 15 12 ...
result:
ok 300000 numbers
Subtask #7:
score: 22
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
100%
Accepted
Test #84:
score: 22
Accepted
time: 357ms
memory: 34012kb
input:
299999 20 1 1 1 1 0 0 1 0 0 1 1 1 1 0 1 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 0 1 1 0 0 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 ...
output:
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...
result:
ok 299999 numbers
Test #85:
score: 0
Accepted
time: 357ms
memory: 33848kb
input:
300000 20 0 0 0 1 1 0 1 1 0 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 1 0 1 1 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 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 0 1 0 1 1 1 1 0 1 1 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 1 1 1 1 1 ...
output:
7 0 6 14 0 7 13 7 7 13 6 6 6 20 13 7 7 7 13 20 0 13 7 7 0 13 7 7 0 14 7 20 7 7 0 7 14 20 6 13 7 13 0 20 20 7 7 13 0 14 13 13 0 14 6 6 14 14 14 13 7 7 14 13 0 7 6 13 7 6 7 14 13 14 13 14 14 7 7 7 14 0 13 7 0 14 7 20 13 7 7 0 6 7 13 13 7 7 14 13 6 14 7 14 14 13 13 7 6 20 13 0 20 13 6 7 20 6 13 13 6 7 ...
result:
ok 300000 numbers
Test #86:
score: 0
Accepted
time: 374ms
memory: 33784kb
input:
299999 20 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 ...
output:
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...
result:
ok 299999 numbers
Test #87:
score: 0
Accepted
time: 376ms
memory: 34016kb
input:
300000 20 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 1 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 ...
output:
10 9 10 9 10 10 9 10 10 10 10 10 10 9 10 10 10 10 9 10 10 10 10 10 9 9 10 10 9 10 9 10 9 9 10 9 10 10 10 10 10 10 10 10 10 9 9 9 9 10 10 10 10 10 10 10 9 9 10 10 10 10 9 9 10 10 10 10 10 10 9 10 10 10 10 10 10 10 10 9 10 10 10 9 9 10 10 10 10 9 10 10 10 10 10 10 10 10 9 10 10 9 10 10 10 10 10 10 10 ...
result:
ok 300000 numbers
Test #88:
score: 0
Accepted
time: 389ms
memory: 33892kb
input:
299999 20 1 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 1 0 0 0 0 1 0 0 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 1 0 0 0 0 0 0 1 1 1 1 0 1 1 0 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 ...
output:
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 ...
result:
ok 299999 numbers
Test #89:
score: 0
Accepted
time: 321ms
memory: 21828kb
input:
299997 19 1 0 0 1 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 0 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 0 0 1 0 0 0 0 1 1 1 1 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 0 0 0 1 0 1 0 0 1 1 1 0 1 0 1 0 0 1 1 1 1 1 1 0 1 1 ...
output:
9 9 10 10 10 9 10 10 9 10 10 10 10 9 10 9 10 10 9 10 10 10 9 10 10 10 9 9 10 10 9 9 10 9 9 10 10 9 10 10 9 9 10 10 9 9 10 10 9 10 10 9 9 10 10 9 10 9 10 10 9 10 10 9 9 9 10 10 9 10 9 9 10 10 9 9 9 9 10 10 10 10 10 9 10 9 10 10 10 9 10 10 9 9 10 9 10 10 9 9 9 9 9 9 10 9 10 9 10 9 9 10 9 10 10 9 10 9 ...
result:
ok 299997 numbers
Test #90:
score: 0
Accepted
time: 309ms
memory: 22516kb
input:
299997 19 0 0 1 1 1 1 1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 0 1 1 1 0 0 0 1 0 1 1 0 1 1 0 0 0 0 0 0 0 1 0 1 1 0 0 1 1 1 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 0 1 1 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 0 1 0 1 0 0 1 0 0 1 1 1 1 0 0 1 1 ...
output:
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10...
result:
ok 299997 numbers
Test #91:
score: 0
Accepted
time: 237ms
memory: 26916kb
input:
300000 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...
result:
ok 300000 numbers
Test #92:
score: 0
Accepted
time: 234ms
memory: 33880kb
input:
300000 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 8 8 8 8 8 8 8 8 ...
result:
ok 300000 numbers
Test #94:
score: 0
Accepted
time: 408ms
memory: 33972kb
input:
300000 20 1 1 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 1 1 0 0 1 0 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 0 1 1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 ...
output:
15 16 12 16 15 12 14 17 16 17 10 11 12 14 16 13 11 15 14 14 12 10 12 14 13 13 11 11 12 14 13 12 13 13 13 14 9 16 13 14 12 16 12 12 13 13 13 11 14 17 14 15 13 12 18 14 12 17 15 15 14 11 12 16 13 15 14 13 16 13 15 12 15 13 15 13 12 15 15 12 14 11 12 14 16 16 14 15 13 16 12 16 12 17 17 13 14 13 13 11 1...
result:
ok 300000 numbers
Extra Test:
score: 0
Extra Test Passed