/*
Disgrace. Humiliation. Unseemly and unwelcome at the feet of The Council.
Their eyes ablaze with bitter resentment, glaring through Gabriel’s wounds of body and soul,
bore outward for all to see.
"Has this one abandoned the way of our Creator?"
"It is unworthy of its Holy Light."
"The Father's Light is indomitable."
"This one only sees fit to squander it."
Their words resonated in Gabriel's limbs, coursing through as lightning upon wire,
a searing hiss that would strike lessers deaf and blind.
The Holy Light within him, an unstoppable storm of divine fury.
Insurmountable for mere objects.
This he knew.
"Holy Council, my devotion to our Creator is absolute.
I have never strayed from the will of the Father, but a machine-"
"You dare imply the might of the Father could be shaken by mere objects?"
"Impossible."
"Heresy."
"Unspeakable."
"Heresy."
"Heresy."
"Silence!"
"Your failure will not be tolerated. As punishment, the Father's Light shall be severed
from your body. You have 24 hours before the last of its embers die out."
"And you with them."
"Prove your loyalty."
"Unmake your mistakes."
As the Light was ripped from his being, Gabriel’s screams were silenced
in the hiss of gospel in praise of God.
A boiling anguish to which even the fires of hell could not compare.
Through the blaze of torment a single burning hatred was forged anew.
If the machines seek blood, he would give it freely; and with such fury, even metal will bleed.
*/
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define int long long
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, std::greater<int>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
typedef tree<long long, null_type, greater_equal<>, rb_tree_tag,
tree_order_statistics_node_update>
ordered_multiset;
#define fastio \
std::cin.tie(0), std::cout.tie(0), std::ios_base::sync_with_stdio(false)
#define rep(a, b, c, d) for (int a = b; a < c; a += d)
#define INF ((1ll << 50) - 1)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define pb push_back
#define x first
#define y second
#define ld long double
#define MAXN 201000
struct msk {
int mask = 0, ind = -1;
};
msk mdp[(1ll << 20)][2];
bool big(msk m1, msk m2, int cm) {
if (m1.ind == m2.ind) return false;
if (__builtin_popcount(m1.mask & cm) == __builtin_popcount(m2.mask & cm)) {
return __builtin_popcount(m1.mask) > __builtin_popcount(m2.mask);
}
return __builtin_popcount(m1.mask & cm) > __builtin_popcount(m2.mask & cm);
}
signed main() {
fastio;
int n, m;
cin >> n >> m;
vector<int> msks(n);
vector<int> cnt(m, -(n / 2));
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
int x;
cin >> x;
x ^= 1;
if (x) msks[i] += (1ll << j);
if (!x) cnt[j]++;
}
}
vector<int> cnt2(1ll << m);
for (int i = 0; i < n; ++i) {
if (big({msks[i], i}, mdp[msks[i]][0], msks[i])) {
mdp[msks[i]][1] = mdp[msks[i]][0];
mdp[msks[i]][0] = {msks[i], i};
} else if (big({msks[i], i}, mdp[msks[i]][1], msks[i])) {
mdp[msks[i]][1] = {msks[i], i};
}
}
for (int l = 0; l < 3; ++l) {
for (int cm = (1ll << m) - 1; cm > 0; --cm) {
for (int j = 0; j < m; ++j) {
if (!(cm & (1ll << j))) continue;
for (int k = 0; k < 2; ++k) {
int msk = cm - (1ll << j);
for (; msk > 0; msk = 0) {
if (big(mdp[cm][k], mdp[msk][0], msk)) {
mdp[msk][1] = mdp[msk][0];
mdp[msk][0] = mdp[cm][k];
} else if (big(mdp[cm][k], mdp[msk][1], msk) && mdp[cm][k].ind != mdp[msk][0].ind) {
mdp[msk][1] = mdp[cm][k];
}
}
}
}
}
for (int cm = 0; cm < (1ll << m); ++cm) {
for (int j = 0; j < m; ++j) {
if ((cm & (1ll << j))) continue;
for (int k = 0; k < 2; ++k) {
int msk = cm + (1ll << j);
for (; msk > 0; msk = 0) {
if (big(mdp[cm][k], mdp[msk][0], msk)) {
mdp[msk][1] = mdp[msk][0];
mdp[msk][0] = mdp[cm][k];
} else if (big(mdp[cm][k], mdp[msk][1], msk) && mdp[cm][k].ind != mdp[msk][0].ind) {
mdp[msk][1] = mdp[cm][k];
}
}
}
}
}
}
vector<bool> visited(1ll << m);
for (int i = 0; i < n; ++i) {
int res = 0;
int cm = 0;
for (int j = 0; j < m; ++j) {
if ((msks[i] & (1ll << j))) {
//
} else {
cnt[j]--;
}
if (cnt[j] != 0) {
if (cnt[j] > 0) res++;
} else {
cm += (1ll << j);
}
}
if (mdp[cm][0].ind != i) {
res += __builtin_popcount(mdp[cm][0].mask & cm);
} else {
if (mdp[cm][1].ind == i) exit(100);
res += __builtin_popcount(mdp[cm][1].mask & cm);
}
cout << res << '\n';
for (int j = 0; j < m; ++j) {
if ((msks[i] & (1ll << j))) {
//
} else {
cnt[j]++;
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
4 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
600 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1597 ms |
41620 KB |
Output is correct |
6 |
Correct |
527 ms |
8784 KB |
Output is correct |
7 |
Correct |
1324 ms |
41488 KB |
Output is correct |
8 |
Correct |
1800 ms |
41488 KB |
Output is correct |
9 |
Correct |
2101 ms |
41500 KB |
Output is correct |
10 |
Correct |
1429 ms |
41556 KB |
Output is correct |
11 |
Correct |
1917 ms |
41488 KB |
Output is correct |
12 |
Correct |
2035 ms |
41552 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
344 KB |
Output is correct |
22 |
Correct |
2 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
344 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
2 ms |
348 KB |
Output is correct |
31 |
Correct |
2 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
344 KB |
Output is correct |
34 |
Correct |
0 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
2 ms |
348 KB |
Output is correct |
40 |
Correct |
2 ms |
344 KB |
Output is correct |
41 |
Correct |
19 ms |
1112 KB |
Output is correct |
42 |
Correct |
18 ms |
1112 KB |
Output is correct |
43 |
Correct |
21 ms |
1116 KB |
Output is correct |
44 |
Correct |
18 ms |
860 KB |
Output is correct |
45 |
Correct |
20 ms |
1112 KB |
Output is correct |
46 |
Correct |
171 ms |
5460 KB |
Output is correct |
47 |
Correct |
145 ms |
5464 KB |
Output is correct |
48 |
Correct |
190 ms |
5584 KB |
Output is correct |
49 |
Correct |
149 ms |
5584 KB |
Output is correct |
50 |
Correct |
168 ms |
5464 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
4 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
600 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1597 ms |
41620 KB |
Output is correct |
6 |
Correct |
527 ms |
8784 KB |
Output is correct |
7 |
Correct |
1324 ms |
41488 KB |
Output is correct |
8 |
Correct |
1800 ms |
41488 KB |
Output is correct |
9 |
Correct |
2101 ms |
41500 KB |
Output is correct |
10 |
Correct |
1429 ms |
41556 KB |
Output is correct |
11 |
Correct |
1917 ms |
41488 KB |
Output is correct |
12 |
Correct |
2035 ms |
41552 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
344 KB |
Output is correct |
22 |
Correct |
2 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
344 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
2 ms |
348 KB |
Output is correct |
31 |
Correct |
2 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
344 KB |
Output is correct |
34 |
Correct |
0 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
2 ms |
348 KB |
Output is correct |
40 |
Correct |
2 ms |
344 KB |
Output is correct |
41 |
Correct |
19 ms |
1112 KB |
Output is correct |
42 |
Correct |
18 ms |
1112 KB |
Output is correct |
43 |
Correct |
21 ms |
1116 KB |
Output is correct |
44 |
Correct |
18 ms |
860 KB |
Output is correct |
45 |
Correct |
20 ms |
1112 KB |
Output is correct |
46 |
Correct |
171 ms |
5460 KB |
Output is correct |
47 |
Correct |
145 ms |
5464 KB |
Output is correct |
48 |
Correct |
190 ms |
5584 KB |
Output is correct |
49 |
Correct |
149 ms |
5584 KB |
Output is correct |
50 |
Correct |
168 ms |
5464 KB |
Output is correct |
51 |
Correct |
538 ms |
9108 KB |
Output is correct |
52 |
Correct |
1621 ms |
41628 KB |
Output is correct |
53 |
Correct |
1662 ms |
41632 KB |
Output is correct |
54 |
Correct |
1980 ms |
41808 KB |
Output is correct |
55 |
Correct |
1 ms |
344 KB |
Output is correct |
56 |
Correct |
231 ms |
5716 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
43 ms |
4444 KB |
Output is correct |
3 |
Correct |
45 ms |
4432 KB |
Output is correct |
4 |
Correct |
35 ms |
3920 KB |
Output is correct |
5 |
Correct |
51 ms |
4692 KB |
Output is correct |
6 |
Correct |
36 ms |
3884 KB |
Output is correct |
7 |
Correct |
50 ms |
4436 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
344 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
0 ms |
344 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
43 ms |
4444 KB |
Output is correct |
3 |
Correct |
45 ms |
4432 KB |
Output is correct |
4 |
Correct |
35 ms |
3920 KB |
Output is correct |
5 |
Correct |
51 ms |
4692 KB |
Output is correct |
6 |
Correct |
36 ms |
3884 KB |
Output is correct |
7 |
Correct |
50 ms |
4436 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
344 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
0 ms |
344 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
179 ms |
9236 KB |
Output is correct |
21 |
Correct |
153 ms |
8532 KB |
Output is correct |
22 |
Correct |
155 ms |
8668 KB |
Output is correct |
23 |
Correct |
134 ms |
9552 KB |
Output is correct |
24 |
Correct |
138 ms |
9296 KB |
Output is correct |
25 |
Correct |
179 ms |
9296 KB |
Output is correct |
26 |
Correct |
176 ms |
9296 KB |
Output is correct |
27 |
Correct |
1 ms |
344 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
344 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
344 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
344 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
2 ms |
600 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
1 ms |
344 KB |
Output is correct |
44 |
Correct |
2 ms |
348 KB |
Output is correct |
45 |
Correct |
2 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
43 ms |
4444 KB |
Output is correct |
3 |
Correct |
45 ms |
4432 KB |
Output is correct |
4 |
Correct |
35 ms |
3920 KB |
Output is correct |
5 |
Correct |
51 ms |
4692 KB |
Output is correct |
6 |
Correct |
36 ms |
3884 KB |
Output is correct |
7 |
Correct |
50 ms |
4436 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
344 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
0 ms |
344 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
179 ms |
9236 KB |
Output is correct |
21 |
Correct |
153 ms |
8532 KB |
Output is correct |
22 |
Correct |
155 ms |
8668 KB |
Output is correct |
23 |
Correct |
134 ms |
9552 KB |
Output is correct |
24 |
Correct |
138 ms |
9296 KB |
Output is correct |
25 |
Correct |
179 ms |
9296 KB |
Output is correct |
26 |
Correct |
176 ms |
9296 KB |
Output is correct |
27 |
Correct |
1 ms |
344 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
344 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
344 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
344 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
2 ms |
600 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
1 ms |
344 KB |
Output is correct |
44 |
Correct |
2 ms |
348 KB |
Output is correct |
45 |
Correct |
2 ms |
344 KB |
Output is correct |
46 |
Correct |
4 ms |
600 KB |
Output is correct |
47 |
Correct |
253 ms |
12112 KB |
Output is correct |
48 |
Correct |
227 ms |
11116 KB |
Output is correct |
49 |
Correct |
226 ms |
11228 KB |
Output is correct |
50 |
Correct |
191 ms |
11860 KB |
Output is correct |
51 |
Correct |
190 ms |
12152 KB |
Output is correct |
52 |
Correct |
258 ms |
12112 KB |
Output is correct |
53 |
Correct |
257 ms |
12368 KB |
Output is correct |
54 |
Correct |
19 ms |
1112 KB |
Output is correct |
55 |
Correct |
18 ms |
1116 KB |
Output is correct |
56 |
Correct |
21 ms |
1112 KB |
Output is correct |
57 |
Correct |
18 ms |
1112 KB |
Output is correct |
58 |
Correct |
20 ms |
1112 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
43 ms |
4444 KB |
Output is correct |
3 |
Correct |
45 ms |
4432 KB |
Output is correct |
4 |
Correct |
35 ms |
3920 KB |
Output is correct |
5 |
Correct |
51 ms |
4692 KB |
Output is correct |
6 |
Correct |
36 ms |
3884 KB |
Output is correct |
7 |
Correct |
50 ms |
4436 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
344 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
0 ms |
344 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
179 ms |
9236 KB |
Output is correct |
21 |
Correct |
153 ms |
8532 KB |
Output is correct |
22 |
Correct |
155 ms |
8668 KB |
Output is correct |
23 |
Correct |
134 ms |
9552 KB |
Output is correct |
24 |
Correct |
138 ms |
9296 KB |
Output is correct |
25 |
Correct |
179 ms |
9296 KB |
Output is correct |
26 |
Correct |
176 ms |
9296 KB |
Output is correct |
27 |
Correct |
1 ms |
344 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
344 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
344 KB |
Output is correct |
32 |
Correct |
1 ms |
344 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
344 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
2 ms |
600 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
1 ms |
348 KB |
Output is correct |
43 |
Correct |
1 ms |
344 KB |
Output is correct |
44 |
Correct |
2 ms |
348 KB |
Output is correct |
45 |
Correct |
2 ms |
344 KB |
Output is correct |
46 |
Correct |
4 ms |
600 KB |
Output is correct |
47 |
Correct |
253 ms |
12112 KB |
Output is correct |
48 |
Correct |
227 ms |
11116 KB |
Output is correct |
49 |
Correct |
226 ms |
11228 KB |
Output is correct |
50 |
Correct |
191 ms |
11860 KB |
Output is correct |
51 |
Correct |
190 ms |
12152 KB |
Output is correct |
52 |
Correct |
258 ms |
12112 KB |
Output is correct |
53 |
Correct |
257 ms |
12368 KB |
Output is correct |
54 |
Correct |
19 ms |
1112 KB |
Output is correct |
55 |
Correct |
18 ms |
1116 KB |
Output is correct |
56 |
Correct |
21 ms |
1112 KB |
Output is correct |
57 |
Correct |
18 ms |
1112 KB |
Output is correct |
58 |
Correct |
20 ms |
1112 KB |
Output is correct |
59 |
Correct |
371 ms |
15564 KB |
Output is correct |
60 |
Correct |
301 ms |
10576 KB |
Output is correct |
61 |
Correct |
304 ms |
10832 KB |
Output is correct |
62 |
Correct |
321 ms |
11156 KB |
Output is correct |
63 |
Correct |
356 ms |
15216 KB |
Output is correct |
64 |
Correct |
481 ms |
18680 KB |
Output is correct |
65 |
Correct |
486 ms |
18492 KB |
Output is correct |
66 |
Correct |
269 ms |
14576 KB |
Output is correct |
67 |
Correct |
390 ms |
18416 KB |
Output is correct |
68 |
Correct |
478 ms |
18564 KB |
Output is correct |
69 |
Correct |
466 ms |
18668 KB |
Output is correct |
70 |
Correct |
172 ms |
5560 KB |
Output is correct |
71 |
Correct |
146 ms |
5464 KB |
Output is correct |
72 |
Correct |
194 ms |
5712 KB |
Output is correct |
73 |
Correct |
151 ms |
5584 KB |
Output is correct |
74 |
Correct |
170 ms |
5456 KB |
Output is correct |
75 |
Correct |
233 ms |
5708 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
4 ms |
604 KB |
Output is correct |
3 |
Correct |
0 ms |
600 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1597 ms |
41620 KB |
Output is correct |
6 |
Correct |
527 ms |
8784 KB |
Output is correct |
7 |
Correct |
1324 ms |
41488 KB |
Output is correct |
8 |
Correct |
1800 ms |
41488 KB |
Output is correct |
9 |
Correct |
2101 ms |
41500 KB |
Output is correct |
10 |
Correct |
1429 ms |
41556 KB |
Output is correct |
11 |
Correct |
1917 ms |
41488 KB |
Output is correct |
12 |
Correct |
2035 ms |
41552 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
344 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
344 KB |
Output is correct |
22 |
Correct |
2 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
344 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
1 ms |
348 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
2 ms |
348 KB |
Output is correct |
31 |
Correct |
2 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
344 KB |
Output is correct |
34 |
Correct |
0 ms |
344 KB |
Output is correct |
35 |
Correct |
0 ms |
344 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
344 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
2 ms |
348 KB |
Output is correct |
40 |
Correct |
2 ms |
344 KB |
Output is correct |
41 |
Correct |
19 ms |
1112 KB |
Output is correct |
42 |
Correct |
18 ms |
1112 KB |
Output is correct |
43 |
Correct |
21 ms |
1116 KB |
Output is correct |
44 |
Correct |
18 ms |
860 KB |
Output is correct |
45 |
Correct |
20 ms |
1112 KB |
Output is correct |
46 |
Correct |
171 ms |
5460 KB |
Output is correct |
47 |
Correct |
145 ms |
5464 KB |
Output is correct |
48 |
Correct |
190 ms |
5584 KB |
Output is correct |
49 |
Correct |
149 ms |
5584 KB |
Output is correct |
50 |
Correct |
168 ms |
5464 KB |
Output is correct |
51 |
Correct |
538 ms |
9108 KB |
Output is correct |
52 |
Correct |
1621 ms |
41628 KB |
Output is correct |
53 |
Correct |
1662 ms |
41632 KB |
Output is correct |
54 |
Correct |
1980 ms |
41808 KB |
Output is correct |
55 |
Correct |
1 ms |
344 KB |
Output is correct |
56 |
Correct |
231 ms |
5716 KB |
Output is correct |
57 |
Correct |
0 ms |
344 KB |
Output is correct |
58 |
Correct |
43 ms |
4444 KB |
Output is correct |
59 |
Correct |
45 ms |
4432 KB |
Output is correct |
60 |
Correct |
35 ms |
3920 KB |
Output is correct |
61 |
Correct |
51 ms |
4692 KB |
Output is correct |
62 |
Correct |
36 ms |
3884 KB |
Output is correct |
63 |
Correct |
50 ms |
4436 KB |
Output is correct |
64 |
Correct |
0 ms |
344 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
0 ms |
344 KB |
Output is correct |
68 |
Correct |
0 ms |
344 KB |
Output is correct |
69 |
Correct |
1 ms |
348 KB |
Output is correct |
70 |
Correct |
0 ms |
348 KB |
Output is correct |
71 |
Correct |
0 ms |
344 KB |
Output is correct |
72 |
Correct |
0 ms |
344 KB |
Output is correct |
73 |
Correct |
1 ms |
348 KB |
Output is correct |
74 |
Correct |
0 ms |
344 KB |
Output is correct |
75 |
Correct |
0 ms |
344 KB |
Output is correct |
76 |
Correct |
179 ms |
9236 KB |
Output is correct |
77 |
Correct |
153 ms |
8532 KB |
Output is correct |
78 |
Correct |
155 ms |
8668 KB |
Output is correct |
79 |
Correct |
134 ms |
9552 KB |
Output is correct |
80 |
Correct |
138 ms |
9296 KB |
Output is correct |
81 |
Correct |
179 ms |
9296 KB |
Output is correct |
82 |
Correct |
176 ms |
9296 KB |
Output is correct |
83 |
Correct |
1 ms |
344 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
0 ms |
344 KB |
Output is correct |
86 |
Correct |
0 ms |
348 KB |
Output is correct |
87 |
Correct |
0 ms |
344 KB |
Output is correct |
88 |
Correct |
1 ms |
344 KB |
Output is correct |
89 |
Correct |
1 ms |
348 KB |
Output is correct |
90 |
Correct |
1 ms |
344 KB |
Output is correct |
91 |
Correct |
1 ms |
348 KB |
Output is correct |
92 |
Correct |
2 ms |
600 KB |
Output is correct |
93 |
Correct |
0 ms |
348 KB |
Output is correct |
94 |
Correct |
0 ms |
344 KB |
Output is correct |
95 |
Correct |
0 ms |
344 KB |
Output is correct |
96 |
Correct |
1 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
348 KB |
Output is correct |
98 |
Correct |
1 ms |
348 KB |
Output is correct |
99 |
Correct |
1 ms |
344 KB |
Output is correct |
100 |
Correct |
2 ms |
348 KB |
Output is correct |
101 |
Correct |
2 ms |
344 KB |
Output is correct |
102 |
Correct |
4 ms |
600 KB |
Output is correct |
103 |
Correct |
253 ms |
12112 KB |
Output is correct |
104 |
Correct |
227 ms |
11116 KB |
Output is correct |
105 |
Correct |
226 ms |
11228 KB |
Output is correct |
106 |
Correct |
191 ms |
11860 KB |
Output is correct |
107 |
Correct |
190 ms |
12152 KB |
Output is correct |
108 |
Correct |
258 ms |
12112 KB |
Output is correct |
109 |
Correct |
257 ms |
12368 KB |
Output is correct |
110 |
Correct |
19 ms |
1112 KB |
Output is correct |
111 |
Correct |
18 ms |
1116 KB |
Output is correct |
112 |
Correct |
21 ms |
1112 KB |
Output is correct |
113 |
Correct |
18 ms |
1112 KB |
Output is correct |
114 |
Correct |
20 ms |
1112 KB |
Output is correct |
115 |
Correct |
371 ms |
15564 KB |
Output is correct |
116 |
Correct |
301 ms |
10576 KB |
Output is correct |
117 |
Correct |
304 ms |
10832 KB |
Output is correct |
118 |
Correct |
321 ms |
11156 KB |
Output is correct |
119 |
Correct |
356 ms |
15216 KB |
Output is correct |
120 |
Correct |
481 ms |
18680 KB |
Output is correct |
121 |
Correct |
486 ms |
18492 KB |
Output is correct |
122 |
Correct |
269 ms |
14576 KB |
Output is correct |
123 |
Correct |
390 ms |
18416 KB |
Output is correct |
124 |
Correct |
478 ms |
18564 KB |
Output is correct |
125 |
Correct |
466 ms |
18668 KB |
Output is correct |
126 |
Correct |
172 ms |
5560 KB |
Output is correct |
127 |
Correct |
146 ms |
5464 KB |
Output is correct |
128 |
Correct |
194 ms |
5712 KB |
Output is correct |
129 |
Correct |
151 ms |
5584 KB |
Output is correct |
130 |
Correct |
170 ms |
5456 KB |
Output is correct |
131 |
Correct |
233 ms |
5708 KB |
Output is correct |
132 |
Correct |
1953 ms |
56676 KB |
Output is correct |
133 |
Correct |
2001 ms |
56416 KB |
Output is correct |
134 |
Correct |
1954 ms |
56588 KB |
Output is correct |
135 |
Correct |
2499 ms |
56468 KB |
Output is correct |
136 |
Correct |
1979 ms |
56568 KB |
Output is correct |
137 |
Correct |
1185 ms |
35408 KB |
Output is correct |
138 |
Correct |
1175 ms |
35384 KB |
Output is correct |
139 |
Correct |
775 ms |
23820 KB |
Output is correct |
140 |
Correct |
1887 ms |
56068 KB |
Output is correct |
141 |
Correct |
2072 ms |
56068 KB |
Output is correct |
142 |
Correct |
2118 ms |
56556 KB |
Output is correct |