//Sylwia Sapkowska
#include <bits/stdc++.h>
#pragma GCC optimize("O3", "unroll-loops")
using namespace std;
void __print(int x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ", "; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? ", " : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifdef LOCAL
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif
#define int long long
typedef pair<int, int> T;
const int oo = 1e18;
void solve(){
int n, m; cin >> n >> m;
vector<int>a(n+1), vote(m+1);
for (int i = 1; i<=n; i++){
for (int j = m-1; j>=0; j--){
int k; cin >> k;
if (k == 1){
a[i] += (1<<j);
vote[j]++;
}
}
}
vector<T>D1((1<<m), {oo, oo}), D2((1<<m), {oo, oo+1});
auto f = [&](int a, int b, int w){
T x = D1[b];
T y = D2[b];
x.first += w;
y.first += w;
if (D2[a] > x){
swap(D2[a], x);
if (D1[a].second == D2[a].second) swap(D2[a], x);
if (D1[a] > D2[a]) swap(D1[a], D2[a]);
}
if (D2[a] > y && D1[a].second != y.second) swap(D2[a], y);
};
debug(a);
for (int i = 1; i<=n; i++){
int x = (~a[i])&((1<<m)-1);
// debug(x);
if (D1[x].first == 0) D2[x] = {0, i};
else D1[x] = {0, i};
}
for (int i = 0; i<m; i++){
for (int mask = 0; mask<(1<<m); mask++){
if (mask&(1<<i)){
//zabranie bitu jest kosztem 0
f(mask^(1<<i), mask, 0);
}
}
}
for (int i = 0; i<m; i++){
for (int mask = 0; mask<(1<<m); mask++){
if (mask&(1<<i)){
//dodanie bitu kosztem 1
f(mask, mask^(1<<i), 1);
}
}
}
debug(D1);
debug(D2);
for (int i = 1; i<=n; i++){
int mask = 0, ans = 0;
for (int j = 0; j<m; j++){
int b = vote[j] - (a[i]&(1<<j) ? 1 : 0);
if (b >= n/2) ans++;
if (b < n/2) {}
if (b == n/2) mask += (1<<j);
}
debug(i, mask, ans);
if (D1[mask].second == i) ans -= D2[mask].first;
else ans -= D1[mask].first;
cout << ans << "\n";
}
}
int32_t main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
solve();
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
137 ms |
33284 KB |
Output is correct |
6 |
Correct |
115 ms |
33364 KB |
Output is correct |
7 |
Correct |
115 ms |
33116 KB |
Output is correct |
8 |
Correct |
134 ms |
33112 KB |
Output is correct |
9 |
Correct |
181 ms |
33304 KB |
Output is correct |
10 |
Correct |
122 ms |
33364 KB |
Output is correct |
11 |
Correct |
128 ms |
33284 KB |
Output is correct |
12 |
Correct |
167 ms |
33116 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 |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 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 |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
344 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
1 ms |
964 KB |
Output is correct |
42 |
Correct |
1 ms |
860 KB |
Output is correct |
43 |
Correct |
2 ms |
860 KB |
Output is correct |
44 |
Correct |
1 ms |
860 KB |
Output is correct |
45 |
Correct |
2 ms |
860 KB |
Output is correct |
46 |
Correct |
10 ms |
4580 KB |
Output is correct |
47 |
Correct |
11 ms |
4444 KB |
Output is correct |
48 |
Correct |
12 ms |
4576 KB |
Output is correct |
49 |
Correct |
14 ms |
4440 KB |
Output is correct |
50 |
Correct |
16 ms |
4444 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
137 ms |
33284 KB |
Output is correct |
6 |
Correct |
115 ms |
33364 KB |
Output is correct |
7 |
Correct |
115 ms |
33116 KB |
Output is correct |
8 |
Correct |
134 ms |
33112 KB |
Output is correct |
9 |
Correct |
181 ms |
33304 KB |
Output is correct |
10 |
Correct |
122 ms |
33364 KB |
Output is correct |
11 |
Correct |
128 ms |
33284 KB |
Output is correct |
12 |
Correct |
167 ms |
33116 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 |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 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 |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
344 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
1 ms |
964 KB |
Output is correct |
42 |
Correct |
1 ms |
860 KB |
Output is correct |
43 |
Correct |
2 ms |
860 KB |
Output is correct |
44 |
Correct |
1 ms |
860 KB |
Output is correct |
45 |
Correct |
2 ms |
860 KB |
Output is correct |
46 |
Correct |
10 ms |
4580 KB |
Output is correct |
47 |
Correct |
11 ms |
4444 KB |
Output is correct |
48 |
Correct |
12 ms |
4576 KB |
Output is correct |
49 |
Correct |
14 ms |
4440 KB |
Output is correct |
50 |
Correct |
16 ms |
4444 KB |
Output is correct |
51 |
Correct |
113 ms |
33372 KB |
Output is correct |
52 |
Correct |
117 ms |
33372 KB |
Output is correct |
53 |
Correct |
154 ms |
33372 KB |
Output is correct |
54 |
Correct |
174 ms |
33620 KB |
Output is correct |
55 |
Correct |
1 ms |
344 KB |
Output is correct |
56 |
Correct |
23 ms |
4684 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
40 ms |
4364 KB |
Output is correct |
3 |
Correct |
35 ms |
4556 KB |
Output is correct |
4 |
Correct |
27 ms |
3928 KB |
Output is correct |
5 |
Correct |
40 ms |
4436 KB |
Output is correct |
6 |
Correct |
29 ms |
3764 KB |
Output is correct |
7 |
Correct |
45 ms |
4456 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 |
1 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
600 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
40 ms |
4364 KB |
Output is correct |
3 |
Correct |
35 ms |
4556 KB |
Output is correct |
4 |
Correct |
27 ms |
3928 KB |
Output is correct |
5 |
Correct |
40 ms |
4436 KB |
Output is correct |
6 |
Correct |
29 ms |
3764 KB |
Output is correct |
7 |
Correct |
45 ms |
4456 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 |
1 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
600 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
168 ms |
9188 KB |
Output is correct |
21 |
Correct |
141 ms |
8784 KB |
Output is correct |
22 |
Correct |
135 ms |
8528 KB |
Output is correct |
23 |
Correct |
128 ms |
9556 KB |
Output is correct |
24 |
Correct |
121 ms |
9184 KB |
Output is correct |
25 |
Correct |
150 ms |
9180 KB |
Output is correct |
26 |
Correct |
164 ms |
9176 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
40 ms |
4364 KB |
Output is correct |
3 |
Correct |
35 ms |
4556 KB |
Output is correct |
4 |
Correct |
27 ms |
3928 KB |
Output is correct |
5 |
Correct |
40 ms |
4436 KB |
Output is correct |
6 |
Correct |
29 ms |
3764 KB |
Output is correct |
7 |
Correct |
45 ms |
4456 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 |
1 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
600 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
168 ms |
9188 KB |
Output is correct |
21 |
Correct |
141 ms |
8784 KB |
Output is correct |
22 |
Correct |
135 ms |
8528 KB |
Output is correct |
23 |
Correct |
128 ms |
9556 KB |
Output is correct |
24 |
Correct |
121 ms |
9184 KB |
Output is correct |
25 |
Correct |
150 ms |
9180 KB |
Output is correct |
26 |
Correct |
164 ms |
9176 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
46 |
Correct |
1 ms |
344 KB |
Output is correct |
47 |
Correct |
207 ms |
12032 KB |
Output is correct |
48 |
Correct |
203 ms |
11204 KB |
Output is correct |
49 |
Correct |
227 ms |
11236 KB |
Output is correct |
50 |
Correct |
176 ms |
12392 KB |
Output is correct |
51 |
Correct |
163 ms |
11932 KB |
Output is correct |
52 |
Correct |
197 ms |
12004 KB |
Output is correct |
53 |
Correct |
224 ms |
12372 KB |
Output is correct |
54 |
Correct |
2 ms |
856 KB |
Output is correct |
55 |
Correct |
2 ms |
812 KB |
Output is correct |
56 |
Correct |
2 ms |
860 KB |
Output is correct |
57 |
Correct |
2 ms |
860 KB |
Output is correct |
58 |
Correct |
2 ms |
860 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
40 ms |
4364 KB |
Output is correct |
3 |
Correct |
35 ms |
4556 KB |
Output is correct |
4 |
Correct |
27 ms |
3928 KB |
Output is correct |
5 |
Correct |
40 ms |
4436 KB |
Output is correct |
6 |
Correct |
29 ms |
3764 KB |
Output is correct |
7 |
Correct |
45 ms |
4456 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 |
1 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
600 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
168 ms |
9188 KB |
Output is correct |
21 |
Correct |
141 ms |
8784 KB |
Output is correct |
22 |
Correct |
135 ms |
8528 KB |
Output is correct |
23 |
Correct |
128 ms |
9556 KB |
Output is correct |
24 |
Correct |
121 ms |
9184 KB |
Output is correct |
25 |
Correct |
150 ms |
9180 KB |
Output is correct |
26 |
Correct |
164 ms |
9176 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
344 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
344 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
344 KB |
Output is correct |
46 |
Correct |
1 ms |
344 KB |
Output is correct |
47 |
Correct |
207 ms |
12032 KB |
Output is correct |
48 |
Correct |
203 ms |
11204 KB |
Output is correct |
49 |
Correct |
227 ms |
11236 KB |
Output is correct |
50 |
Correct |
176 ms |
12392 KB |
Output is correct |
51 |
Correct |
163 ms |
11932 KB |
Output is correct |
52 |
Correct |
197 ms |
12004 KB |
Output is correct |
53 |
Correct |
224 ms |
12372 KB |
Output is correct |
54 |
Correct |
2 ms |
856 KB |
Output is correct |
55 |
Correct |
2 ms |
812 KB |
Output is correct |
56 |
Correct |
2 ms |
860 KB |
Output is correct |
57 |
Correct |
2 ms |
860 KB |
Output is correct |
58 |
Correct |
2 ms |
860 KB |
Output is correct |
59 |
Correct |
257 ms |
14932 KB |
Output is correct |
60 |
Correct |
105 ms |
9560 KB |
Output is correct |
61 |
Correct |
114 ms |
9972 KB |
Output is correct |
62 |
Correct |
113 ms |
10064 KB |
Output is correct |
63 |
Correct |
242 ms |
14748 KB |
Output is correct |
64 |
Correct |
272 ms |
17344 KB |
Output is correct |
65 |
Correct |
258 ms |
17264 KB |
Output is correct |
66 |
Correct |
220 ms |
17752 KB |
Output is correct |
67 |
Correct |
204 ms |
17492 KB |
Output is correct |
68 |
Correct |
252 ms |
17264 KB |
Output is correct |
69 |
Correct |
256 ms |
18016 KB |
Output is correct |
70 |
Correct |
11 ms |
4444 KB |
Output is correct |
71 |
Correct |
12 ms |
4444 KB |
Output is correct |
72 |
Correct |
13 ms |
4552 KB |
Output is correct |
73 |
Correct |
11 ms |
4580 KB |
Output is correct |
74 |
Correct |
12 ms |
4444 KB |
Output is correct |
75 |
Correct |
21 ms |
4700 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
137 ms |
33284 KB |
Output is correct |
6 |
Correct |
115 ms |
33364 KB |
Output is correct |
7 |
Correct |
115 ms |
33116 KB |
Output is correct |
8 |
Correct |
134 ms |
33112 KB |
Output is correct |
9 |
Correct |
181 ms |
33304 KB |
Output is correct |
10 |
Correct |
122 ms |
33364 KB |
Output is correct |
11 |
Correct |
128 ms |
33284 KB |
Output is correct |
12 |
Correct |
167 ms |
33116 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 |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 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 |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
1 ms |
344 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
344 KB |
Output is correct |
39 |
Correct |
1 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
1 ms |
964 KB |
Output is correct |
42 |
Correct |
1 ms |
860 KB |
Output is correct |
43 |
Correct |
2 ms |
860 KB |
Output is correct |
44 |
Correct |
1 ms |
860 KB |
Output is correct |
45 |
Correct |
2 ms |
860 KB |
Output is correct |
46 |
Correct |
10 ms |
4580 KB |
Output is correct |
47 |
Correct |
11 ms |
4444 KB |
Output is correct |
48 |
Correct |
12 ms |
4576 KB |
Output is correct |
49 |
Correct |
14 ms |
4440 KB |
Output is correct |
50 |
Correct |
16 ms |
4444 KB |
Output is correct |
51 |
Correct |
113 ms |
33372 KB |
Output is correct |
52 |
Correct |
117 ms |
33372 KB |
Output is correct |
53 |
Correct |
154 ms |
33372 KB |
Output is correct |
54 |
Correct |
174 ms |
33620 KB |
Output is correct |
55 |
Correct |
1 ms |
344 KB |
Output is correct |
56 |
Correct |
23 ms |
4684 KB |
Output is correct |
57 |
Correct |
0 ms |
344 KB |
Output is correct |
58 |
Correct |
40 ms |
4364 KB |
Output is correct |
59 |
Correct |
35 ms |
4556 KB |
Output is correct |
60 |
Correct |
27 ms |
3928 KB |
Output is correct |
61 |
Correct |
40 ms |
4436 KB |
Output is correct |
62 |
Correct |
29 ms |
3764 KB |
Output is correct |
63 |
Correct |
45 ms |
4456 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 |
1 ms |
344 KB |
Output is correct |
68 |
Correct |
0 ms |
348 KB |
Output is correct |
69 |
Correct |
0 ms |
348 KB |
Output is correct |
70 |
Correct |
0 ms |
348 KB |
Output is correct |
71 |
Correct |
0 ms |
456 KB |
Output is correct |
72 |
Correct |
0 ms |
600 KB |
Output is correct |
73 |
Correct |
1 ms |
348 KB |
Output is correct |
74 |
Correct |
0 ms |
348 KB |
Output is correct |
75 |
Correct |
0 ms |
348 KB |
Output is correct |
76 |
Correct |
168 ms |
9188 KB |
Output is correct |
77 |
Correct |
141 ms |
8784 KB |
Output is correct |
78 |
Correct |
135 ms |
8528 KB |
Output is correct |
79 |
Correct |
128 ms |
9556 KB |
Output is correct |
80 |
Correct |
121 ms |
9184 KB |
Output is correct |
81 |
Correct |
150 ms |
9180 KB |
Output is correct |
82 |
Correct |
164 ms |
9176 KB |
Output is correct |
83 |
Correct |
0 ms |
348 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
0 ms |
348 KB |
Output is correct |
86 |
Correct |
0 ms |
348 KB |
Output is correct |
87 |
Correct |
1 ms |
348 KB |
Output is correct |
88 |
Correct |
0 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
0 ms |
348 KB |
Output is correct |
91 |
Correct |
1 ms |
348 KB |
Output is correct |
92 |
Correct |
1 ms |
348 KB |
Output is correct |
93 |
Correct |
0 ms |
344 KB |
Output is correct |
94 |
Correct |
0 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
344 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
0 ms |
348 KB |
Output is correct |
100 |
Correct |
1 ms |
348 KB |
Output is correct |
101 |
Correct |
1 ms |
344 KB |
Output is correct |
102 |
Correct |
1 ms |
344 KB |
Output is correct |
103 |
Correct |
207 ms |
12032 KB |
Output is correct |
104 |
Correct |
203 ms |
11204 KB |
Output is correct |
105 |
Correct |
227 ms |
11236 KB |
Output is correct |
106 |
Correct |
176 ms |
12392 KB |
Output is correct |
107 |
Correct |
163 ms |
11932 KB |
Output is correct |
108 |
Correct |
197 ms |
12004 KB |
Output is correct |
109 |
Correct |
224 ms |
12372 KB |
Output is correct |
110 |
Correct |
2 ms |
856 KB |
Output is correct |
111 |
Correct |
2 ms |
812 KB |
Output is correct |
112 |
Correct |
2 ms |
860 KB |
Output is correct |
113 |
Correct |
2 ms |
860 KB |
Output is correct |
114 |
Correct |
2 ms |
860 KB |
Output is correct |
115 |
Correct |
257 ms |
14932 KB |
Output is correct |
116 |
Correct |
105 ms |
9560 KB |
Output is correct |
117 |
Correct |
114 ms |
9972 KB |
Output is correct |
118 |
Correct |
113 ms |
10064 KB |
Output is correct |
119 |
Correct |
242 ms |
14748 KB |
Output is correct |
120 |
Correct |
272 ms |
17344 KB |
Output is correct |
121 |
Correct |
258 ms |
17264 KB |
Output is correct |
122 |
Correct |
220 ms |
17752 KB |
Output is correct |
123 |
Correct |
204 ms |
17492 KB |
Output is correct |
124 |
Correct |
252 ms |
17264 KB |
Output is correct |
125 |
Correct |
256 ms |
18016 KB |
Output is correct |
126 |
Correct |
11 ms |
4444 KB |
Output is correct |
127 |
Correct |
12 ms |
4444 KB |
Output is correct |
128 |
Correct |
13 ms |
4552 KB |
Output is correct |
129 |
Correct |
11 ms |
4580 KB |
Output is correct |
130 |
Correct |
12 ms |
4444 KB |
Output is correct |
131 |
Correct |
21 ms |
4700 KB |
Output is correct |
132 |
Correct |
441 ms |
48364 KB |
Output is correct |
133 |
Correct |
474 ms |
47888 KB |
Output is correct |
134 |
Correct |
451 ms |
48444 KB |
Output is correct |
135 |
Correct |
523 ms |
48356 KB |
Output is correct |
136 |
Correct |
495 ms |
48092 KB |
Output is correct |
137 |
Correct |
358 ms |
31076 KB |
Output is correct |
138 |
Correct |
357 ms |
31060 KB |
Output is correct |
139 |
Correct |
346 ms |
48212 KB |
Output is correct |
140 |
Correct |
333 ms |
47956 KB |
Output is correct |
141 |
Correct |
453 ms |
47836 KB |
Output is correct |
142 |
Correct |
481 ms |
48240 KB |
Output is correct |