#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define ff first
#define ss second
#define all(x) begin(x), end(x)
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define F0R(i, x) FOR(i, 0, x)
#define FORd(i, a, b) for(int i = (b)-1; i >= (a); i--)
#define F0Rd(i, x) FORd(i, 0, x)
const int MAX_N = 3e5+69;
const ll MOD = 1000000007;
const ll INF = 1e18;
int n, m, k;
int nums[MAX_N], tot[20];
pii val1[1 << 20];
pair<pii, pii> val2[1 << 20];
int main(int argc, const char * argv[]){
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(cin.failbit);
cin >> n >> m; k = n/2;
F0R(i, n) F0R(j, m){
int x; cin >> x;
if(x) nums[i] ^= 1 << j;
tot[j] += x;
}
F0R(i, n) nums[i] ^= (1 << m)-1;
F0R(i, 1 << m) val1[i] = {-1, -1};
F0R(i, n){
if(~val1[nums[i]].ff) val1[nums[i]].ss = i;
else val1[nums[i]].ff = i;
}
F0R(i, m) F0R(msk, 1 << m) if(msk&(1 << i)){
vector<int> v;
v.push_back(val1[msk].ff), v.push_back(val1[msk].ss);
v.push_back(val1[msk^(1 << i)].ff), v.push_back(val1[msk^(1 << i)].ss);
sort(all(v)), reverse(all(v));
val1[msk^(1 << i)] = {v[0], v[1]};
}
F0R(msk, 1 << m){
if(~val1[msk].ff)
val2[msk].ff = {__builtin_popcount(msk), val1[msk].ff};
else val2[msk].ff = {0, -1};
if(~val1[msk].ss)
val2[msk].ss = {__builtin_popcount(msk), val1[msk].ss};
else val2[msk].ss = {0, -1};
}
F0R(i, m) F0R(msk, 1 << m) if(msk&(1 << i)){
vector<pii> v;
v.push_back(val2[msk].ff), v.push_back(val2[msk].ss);
v.push_back(val2[msk^(1 << i)].ff), v.push_back(val2[msk^(1 << i)].ss);
sort(all(v)), reverse(all(v));
int k = 2;
val2[msk] = {v[0], v[1]};
while(val2[msk].ff.ss == val2[msk].ss.ss)
val2[msk].ss = v[k++];
}
F0R(i, n){
int val = 0, ans = 0;
F0R(j, m){
if(tot[j] > k+1) ans++;
if(tot[j] == k+1){
if(!(nums[i]&(1 << j))) val ^= (1 << j);
else ans++;
}
if((nums[i]&(1 << j)) && tot[j] == k) val ^= (1 << j);
}
if(i == val2[val].ff.ss) cout << ans+val2[val].ss.ff << '\n';
else cout << ans+val2[val].ff.ff << '\n';
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
5 ms |
4444 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
1493 ms |
25292 KB |
Output is correct |
6 |
Correct |
1554 ms |
25172 KB |
Output is correct |
7 |
Correct |
1558 ms |
25236 KB |
Output is correct |
8 |
Correct |
1546 ms |
25292 KB |
Output is correct |
9 |
Correct |
1606 ms |
25248 KB |
Output is correct |
10 |
Correct |
1519 ms |
25172 KB |
Output is correct |
11 |
Correct |
1561 ms |
25232 KB |
Output is correct |
12 |
Correct |
1632 ms |
25244 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4556 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4444 KB |
Output is correct |
22 |
Correct |
2 ms |
4444 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
4440 KB |
Output is correct |
25 |
Correct |
1 ms |
4444 KB |
Output is correct |
26 |
Correct |
1 ms |
4444 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
1 ms |
4444 KB |
Output is correct |
30 |
Correct |
2 ms |
4444 KB |
Output is correct |
31 |
Correct |
2 ms |
4440 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4440 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
1 ms |
4560 KB |
Output is correct |
37 |
Correct |
1 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
2 ms |
4444 KB |
Output is correct |
40 |
Correct |
2 ms |
4444 KB |
Output is correct |
41 |
Correct |
18 ms |
6612 KB |
Output is correct |
42 |
Correct |
18 ms |
6748 KB |
Output is correct |
43 |
Correct |
19 ms |
6616 KB |
Output is correct |
44 |
Correct |
24 ms |
6748 KB |
Output is correct |
45 |
Correct |
19 ms |
6744 KB |
Output is correct |
46 |
Correct |
164 ms |
8640 KB |
Output is correct |
47 |
Correct |
163 ms |
8788 KB |
Output is correct |
48 |
Correct |
167 ms |
8788 KB |
Output is correct |
49 |
Correct |
175 ms |
8820 KB |
Output is correct |
50 |
Correct |
178 ms |
8644 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
5 ms |
4444 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
1493 ms |
25292 KB |
Output is correct |
6 |
Correct |
1554 ms |
25172 KB |
Output is correct |
7 |
Correct |
1558 ms |
25236 KB |
Output is correct |
8 |
Correct |
1546 ms |
25292 KB |
Output is correct |
9 |
Correct |
1606 ms |
25248 KB |
Output is correct |
10 |
Correct |
1519 ms |
25172 KB |
Output is correct |
11 |
Correct |
1561 ms |
25232 KB |
Output is correct |
12 |
Correct |
1632 ms |
25244 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4556 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4444 KB |
Output is correct |
22 |
Correct |
2 ms |
4444 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
4440 KB |
Output is correct |
25 |
Correct |
1 ms |
4444 KB |
Output is correct |
26 |
Correct |
1 ms |
4444 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
1 ms |
4444 KB |
Output is correct |
30 |
Correct |
2 ms |
4444 KB |
Output is correct |
31 |
Correct |
2 ms |
4440 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4440 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
1 ms |
4560 KB |
Output is correct |
37 |
Correct |
1 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
2 ms |
4444 KB |
Output is correct |
40 |
Correct |
2 ms |
4444 KB |
Output is correct |
41 |
Correct |
18 ms |
6612 KB |
Output is correct |
42 |
Correct |
18 ms |
6748 KB |
Output is correct |
43 |
Correct |
19 ms |
6616 KB |
Output is correct |
44 |
Correct |
24 ms |
6748 KB |
Output is correct |
45 |
Correct |
19 ms |
6744 KB |
Output is correct |
46 |
Correct |
164 ms |
8640 KB |
Output is correct |
47 |
Correct |
163 ms |
8788 KB |
Output is correct |
48 |
Correct |
167 ms |
8788 KB |
Output is correct |
49 |
Correct |
175 ms |
8820 KB |
Output is correct |
50 |
Correct |
178 ms |
8644 KB |
Output is correct |
51 |
Correct |
1520 ms |
25360 KB |
Output is correct |
52 |
Correct |
1495 ms |
25608 KB |
Output is correct |
53 |
Correct |
1582 ms |
25416 KB |
Output is correct |
54 |
Correct |
1675 ms |
25156 KB |
Output is correct |
55 |
Correct |
1 ms |
4440 KB |
Output is correct |
56 |
Correct |
174 ms |
8916 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
52 ms |
7252 KB |
Output is correct |
3 |
Correct |
41 ms |
7248 KB |
Output is correct |
4 |
Correct |
29 ms |
6748 KB |
Output is correct |
5 |
Correct |
55 ms |
7248 KB |
Output is correct |
6 |
Correct |
38 ms |
6484 KB |
Output is correct |
7 |
Correct |
45 ms |
7248 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4440 KB |
Output is correct |
16 |
Correct |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
2 ms |
4444 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
52 ms |
7252 KB |
Output is correct |
3 |
Correct |
41 ms |
7248 KB |
Output is correct |
4 |
Correct |
29 ms |
6748 KB |
Output is correct |
5 |
Correct |
55 ms |
7248 KB |
Output is correct |
6 |
Correct |
38 ms |
6484 KB |
Output is correct |
7 |
Correct |
45 ms |
7248 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4440 KB |
Output is correct |
16 |
Correct |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
2 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
158 ms |
12008 KB |
Output is correct |
21 |
Correct |
142 ms |
11348 KB |
Output is correct |
22 |
Correct |
141 ms |
11376 KB |
Output is correct |
23 |
Correct |
134 ms |
12228 KB |
Output is correct |
24 |
Correct |
131 ms |
11856 KB |
Output is correct |
25 |
Correct |
180 ms |
11808 KB |
Output is correct |
26 |
Correct |
162 ms |
11956 KB |
Output is correct |
27 |
Correct |
2 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4560 KB |
Output is correct |
29 |
Correct |
1 ms |
4444 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
1 ms |
4696 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4444 KB |
Output is correct |
35 |
Correct |
2 ms |
4444 KB |
Output is correct |
36 |
Correct |
2 ms |
4444 KB |
Output is correct |
37 |
Correct |
1 ms |
4440 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4440 KB |
Output is correct |
41 |
Correct |
1 ms |
4440 KB |
Output is correct |
42 |
Correct |
1 ms |
4440 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
2 ms |
4444 KB |
Output is correct |
45 |
Correct |
2 ms |
4444 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
52 ms |
7252 KB |
Output is correct |
3 |
Correct |
41 ms |
7248 KB |
Output is correct |
4 |
Correct |
29 ms |
6748 KB |
Output is correct |
5 |
Correct |
55 ms |
7248 KB |
Output is correct |
6 |
Correct |
38 ms |
6484 KB |
Output is correct |
7 |
Correct |
45 ms |
7248 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4440 KB |
Output is correct |
16 |
Correct |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
2 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
158 ms |
12008 KB |
Output is correct |
21 |
Correct |
142 ms |
11348 KB |
Output is correct |
22 |
Correct |
141 ms |
11376 KB |
Output is correct |
23 |
Correct |
134 ms |
12228 KB |
Output is correct |
24 |
Correct |
131 ms |
11856 KB |
Output is correct |
25 |
Correct |
180 ms |
11808 KB |
Output is correct |
26 |
Correct |
162 ms |
11956 KB |
Output is correct |
27 |
Correct |
2 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4560 KB |
Output is correct |
29 |
Correct |
1 ms |
4444 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
1 ms |
4696 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4444 KB |
Output is correct |
35 |
Correct |
2 ms |
4444 KB |
Output is correct |
36 |
Correct |
2 ms |
4444 KB |
Output is correct |
37 |
Correct |
1 ms |
4440 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4440 KB |
Output is correct |
41 |
Correct |
1 ms |
4440 KB |
Output is correct |
42 |
Correct |
1 ms |
4440 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
2 ms |
4444 KB |
Output is correct |
45 |
Correct |
2 ms |
4444 KB |
Output is correct |
46 |
Correct |
5 ms |
4560 KB |
Output is correct |
47 |
Correct |
237 ms |
16588 KB |
Output is correct |
48 |
Correct |
263 ms |
13908 KB |
Output is correct |
49 |
Correct |
205 ms |
13836 KB |
Output is correct |
50 |
Correct |
195 ms |
16680 KB |
Output is correct |
51 |
Correct |
189 ms |
16724 KB |
Output is correct |
52 |
Correct |
218 ms |
16452 KB |
Output is correct |
53 |
Correct |
234 ms |
16720 KB |
Output is correct |
54 |
Correct |
18 ms |
6744 KB |
Output is correct |
55 |
Correct |
21 ms |
6748 KB |
Output is correct |
56 |
Correct |
19 ms |
6800 KB |
Output is correct |
57 |
Correct |
18 ms |
6748 KB |
Output is correct |
58 |
Correct |
19 ms |
6616 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
52 ms |
7252 KB |
Output is correct |
3 |
Correct |
41 ms |
7248 KB |
Output is correct |
4 |
Correct |
29 ms |
6748 KB |
Output is correct |
5 |
Correct |
55 ms |
7248 KB |
Output is correct |
6 |
Correct |
38 ms |
6484 KB |
Output is correct |
7 |
Correct |
45 ms |
7248 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
1 ms |
4444 KB |
Output is correct |
12 |
Correct |
1 ms |
4444 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4440 KB |
Output is correct |
16 |
Correct |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
2 ms |
4444 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
158 ms |
12008 KB |
Output is correct |
21 |
Correct |
142 ms |
11348 KB |
Output is correct |
22 |
Correct |
141 ms |
11376 KB |
Output is correct |
23 |
Correct |
134 ms |
12228 KB |
Output is correct |
24 |
Correct |
131 ms |
11856 KB |
Output is correct |
25 |
Correct |
180 ms |
11808 KB |
Output is correct |
26 |
Correct |
162 ms |
11956 KB |
Output is correct |
27 |
Correct |
2 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4560 KB |
Output is correct |
29 |
Correct |
1 ms |
4444 KB |
Output is correct |
30 |
Correct |
1 ms |
4444 KB |
Output is correct |
31 |
Correct |
1 ms |
4696 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4444 KB |
Output is correct |
35 |
Correct |
2 ms |
4444 KB |
Output is correct |
36 |
Correct |
2 ms |
4444 KB |
Output is correct |
37 |
Correct |
1 ms |
4440 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
1 ms |
4444 KB |
Output is correct |
40 |
Correct |
1 ms |
4440 KB |
Output is correct |
41 |
Correct |
1 ms |
4440 KB |
Output is correct |
42 |
Correct |
1 ms |
4440 KB |
Output is correct |
43 |
Correct |
1 ms |
4444 KB |
Output is correct |
44 |
Correct |
2 ms |
4444 KB |
Output is correct |
45 |
Correct |
2 ms |
4444 KB |
Output is correct |
46 |
Correct |
5 ms |
4560 KB |
Output is correct |
47 |
Correct |
237 ms |
16588 KB |
Output is correct |
48 |
Correct |
263 ms |
13908 KB |
Output is correct |
49 |
Correct |
205 ms |
13836 KB |
Output is correct |
50 |
Correct |
195 ms |
16680 KB |
Output is correct |
51 |
Correct |
189 ms |
16724 KB |
Output is correct |
52 |
Correct |
218 ms |
16452 KB |
Output is correct |
53 |
Correct |
234 ms |
16720 KB |
Output is correct |
54 |
Correct |
18 ms |
6744 KB |
Output is correct |
55 |
Correct |
21 ms |
6748 KB |
Output is correct |
56 |
Correct |
19 ms |
6800 KB |
Output is correct |
57 |
Correct |
18 ms |
6748 KB |
Output is correct |
58 |
Correct |
19 ms |
6616 KB |
Output is correct |
59 |
Correct |
307 ms |
19984 KB |
Output is correct |
60 |
Correct |
268 ms |
13136 KB |
Output is correct |
61 |
Correct |
317 ms |
13428 KB |
Output is correct |
62 |
Correct |
312 ms |
13620 KB |
Output is correct |
63 |
Correct |
319 ms |
19792 KB |
Output is correct |
64 |
Correct |
484 ms |
20316 KB |
Output is correct |
65 |
Correct |
439 ms |
20344 KB |
Output is correct |
66 |
Correct |
387 ms |
20676 KB |
Output is correct |
67 |
Correct |
357 ms |
20308 KB |
Output is correct |
68 |
Correct |
413 ms |
20448 KB |
Output is correct |
69 |
Correct |
478 ms |
20560 KB |
Output is correct |
70 |
Correct |
160 ms |
8784 KB |
Output is correct |
71 |
Correct |
164 ms |
8644 KB |
Output is correct |
72 |
Correct |
191 ms |
9044 KB |
Output is correct |
73 |
Correct |
167 ms |
8820 KB |
Output is correct |
74 |
Correct |
192 ms |
8816 KB |
Output is correct |
75 |
Correct |
199 ms |
8964 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4444 KB |
Output is correct |
2 |
Correct |
5 ms |
4444 KB |
Output is correct |
3 |
Correct |
1 ms |
4444 KB |
Output is correct |
4 |
Correct |
1 ms |
4444 KB |
Output is correct |
5 |
Correct |
1493 ms |
25292 KB |
Output is correct |
6 |
Correct |
1554 ms |
25172 KB |
Output is correct |
7 |
Correct |
1558 ms |
25236 KB |
Output is correct |
8 |
Correct |
1546 ms |
25292 KB |
Output is correct |
9 |
Correct |
1606 ms |
25248 KB |
Output is correct |
10 |
Correct |
1519 ms |
25172 KB |
Output is correct |
11 |
Correct |
1561 ms |
25232 KB |
Output is correct |
12 |
Correct |
1632 ms |
25244 KB |
Output is correct |
13 |
Correct |
1 ms |
4444 KB |
Output is correct |
14 |
Correct |
1 ms |
4444 KB |
Output is correct |
15 |
Correct |
1 ms |
4444 KB |
Output is correct |
16 |
Correct |
1 ms |
4444 KB |
Output is correct |
17 |
Correct |
1 ms |
4556 KB |
Output is correct |
18 |
Correct |
1 ms |
4444 KB |
Output is correct |
19 |
Correct |
1 ms |
4444 KB |
Output is correct |
20 |
Correct |
1 ms |
4444 KB |
Output is correct |
21 |
Correct |
1 ms |
4444 KB |
Output is correct |
22 |
Correct |
2 ms |
4444 KB |
Output is correct |
23 |
Correct |
1 ms |
4444 KB |
Output is correct |
24 |
Correct |
1 ms |
4440 KB |
Output is correct |
25 |
Correct |
1 ms |
4444 KB |
Output is correct |
26 |
Correct |
1 ms |
4444 KB |
Output is correct |
27 |
Correct |
1 ms |
4444 KB |
Output is correct |
28 |
Correct |
1 ms |
4444 KB |
Output is correct |
29 |
Correct |
1 ms |
4444 KB |
Output is correct |
30 |
Correct |
2 ms |
4444 KB |
Output is correct |
31 |
Correct |
2 ms |
4440 KB |
Output is correct |
32 |
Correct |
1 ms |
4444 KB |
Output is correct |
33 |
Correct |
1 ms |
4444 KB |
Output is correct |
34 |
Correct |
1 ms |
4440 KB |
Output is correct |
35 |
Correct |
1 ms |
4444 KB |
Output is correct |
36 |
Correct |
1 ms |
4560 KB |
Output is correct |
37 |
Correct |
1 ms |
4444 KB |
Output is correct |
38 |
Correct |
1 ms |
4444 KB |
Output is correct |
39 |
Correct |
2 ms |
4444 KB |
Output is correct |
40 |
Correct |
2 ms |
4444 KB |
Output is correct |
41 |
Correct |
18 ms |
6612 KB |
Output is correct |
42 |
Correct |
18 ms |
6748 KB |
Output is correct |
43 |
Correct |
19 ms |
6616 KB |
Output is correct |
44 |
Correct |
24 ms |
6748 KB |
Output is correct |
45 |
Correct |
19 ms |
6744 KB |
Output is correct |
46 |
Correct |
164 ms |
8640 KB |
Output is correct |
47 |
Correct |
163 ms |
8788 KB |
Output is correct |
48 |
Correct |
167 ms |
8788 KB |
Output is correct |
49 |
Correct |
175 ms |
8820 KB |
Output is correct |
50 |
Correct |
178 ms |
8644 KB |
Output is correct |
51 |
Correct |
1520 ms |
25360 KB |
Output is correct |
52 |
Correct |
1495 ms |
25608 KB |
Output is correct |
53 |
Correct |
1582 ms |
25416 KB |
Output is correct |
54 |
Correct |
1675 ms |
25156 KB |
Output is correct |
55 |
Correct |
1 ms |
4440 KB |
Output is correct |
56 |
Correct |
174 ms |
8916 KB |
Output is correct |
57 |
Correct |
1 ms |
4444 KB |
Output is correct |
58 |
Correct |
52 ms |
7252 KB |
Output is correct |
59 |
Correct |
41 ms |
7248 KB |
Output is correct |
60 |
Correct |
29 ms |
6748 KB |
Output is correct |
61 |
Correct |
55 ms |
7248 KB |
Output is correct |
62 |
Correct |
38 ms |
6484 KB |
Output is correct |
63 |
Correct |
45 ms |
7248 KB |
Output is correct |
64 |
Correct |
1 ms |
4440 KB |
Output is correct |
65 |
Correct |
1 ms |
4444 KB |
Output is correct |
66 |
Correct |
1 ms |
4444 KB |
Output is correct |
67 |
Correct |
1 ms |
4444 KB |
Output is correct |
68 |
Correct |
1 ms |
4444 KB |
Output is correct |
69 |
Correct |
1 ms |
4444 KB |
Output is correct |
70 |
Correct |
1 ms |
4444 KB |
Output is correct |
71 |
Correct |
1 ms |
4440 KB |
Output is correct |
72 |
Correct |
1 ms |
4440 KB |
Output is correct |
73 |
Correct |
2 ms |
4444 KB |
Output is correct |
74 |
Correct |
1 ms |
4440 KB |
Output is correct |
75 |
Correct |
1 ms |
4444 KB |
Output is correct |
76 |
Correct |
158 ms |
12008 KB |
Output is correct |
77 |
Correct |
142 ms |
11348 KB |
Output is correct |
78 |
Correct |
141 ms |
11376 KB |
Output is correct |
79 |
Correct |
134 ms |
12228 KB |
Output is correct |
80 |
Correct |
131 ms |
11856 KB |
Output is correct |
81 |
Correct |
180 ms |
11808 KB |
Output is correct |
82 |
Correct |
162 ms |
11956 KB |
Output is correct |
83 |
Correct |
2 ms |
4444 KB |
Output is correct |
84 |
Correct |
1 ms |
4560 KB |
Output is correct |
85 |
Correct |
1 ms |
4444 KB |
Output is correct |
86 |
Correct |
1 ms |
4444 KB |
Output is correct |
87 |
Correct |
1 ms |
4696 KB |
Output is correct |
88 |
Correct |
1 ms |
4444 KB |
Output is correct |
89 |
Correct |
1 ms |
4444 KB |
Output is correct |
90 |
Correct |
1 ms |
4444 KB |
Output is correct |
91 |
Correct |
2 ms |
4444 KB |
Output is correct |
92 |
Correct |
2 ms |
4444 KB |
Output is correct |
93 |
Correct |
1 ms |
4440 KB |
Output is correct |
94 |
Correct |
1 ms |
4444 KB |
Output is correct |
95 |
Correct |
1 ms |
4444 KB |
Output is correct |
96 |
Correct |
1 ms |
4440 KB |
Output is correct |
97 |
Correct |
1 ms |
4440 KB |
Output is correct |
98 |
Correct |
1 ms |
4440 KB |
Output is correct |
99 |
Correct |
1 ms |
4444 KB |
Output is correct |
100 |
Correct |
2 ms |
4444 KB |
Output is correct |
101 |
Correct |
2 ms |
4444 KB |
Output is correct |
102 |
Correct |
5 ms |
4560 KB |
Output is correct |
103 |
Correct |
237 ms |
16588 KB |
Output is correct |
104 |
Correct |
263 ms |
13908 KB |
Output is correct |
105 |
Correct |
205 ms |
13836 KB |
Output is correct |
106 |
Correct |
195 ms |
16680 KB |
Output is correct |
107 |
Correct |
189 ms |
16724 KB |
Output is correct |
108 |
Correct |
218 ms |
16452 KB |
Output is correct |
109 |
Correct |
234 ms |
16720 KB |
Output is correct |
110 |
Correct |
18 ms |
6744 KB |
Output is correct |
111 |
Correct |
21 ms |
6748 KB |
Output is correct |
112 |
Correct |
19 ms |
6800 KB |
Output is correct |
113 |
Correct |
18 ms |
6748 KB |
Output is correct |
114 |
Correct |
19 ms |
6616 KB |
Output is correct |
115 |
Correct |
307 ms |
19984 KB |
Output is correct |
116 |
Correct |
268 ms |
13136 KB |
Output is correct |
117 |
Correct |
317 ms |
13428 KB |
Output is correct |
118 |
Correct |
312 ms |
13620 KB |
Output is correct |
119 |
Correct |
319 ms |
19792 KB |
Output is correct |
120 |
Correct |
484 ms |
20316 KB |
Output is correct |
121 |
Correct |
439 ms |
20344 KB |
Output is correct |
122 |
Correct |
387 ms |
20676 KB |
Output is correct |
123 |
Correct |
357 ms |
20308 KB |
Output is correct |
124 |
Correct |
413 ms |
20448 KB |
Output is correct |
125 |
Correct |
478 ms |
20560 KB |
Output is correct |
126 |
Correct |
160 ms |
8784 KB |
Output is correct |
127 |
Correct |
164 ms |
8644 KB |
Output is correct |
128 |
Correct |
191 ms |
9044 KB |
Output is correct |
129 |
Correct |
167 ms |
8820 KB |
Output is correct |
130 |
Correct |
192 ms |
8816 KB |
Output is correct |
131 |
Correct |
199 ms |
8964 KB |
Output is correct |
132 |
Correct |
1831 ms |
38748 KB |
Output is correct |
133 |
Correct |
1873 ms |
38548 KB |
Output is correct |
134 |
Correct |
1855 ms |
39020 KB |
Output is correct |
135 |
Correct |
1946 ms |
38748 KB |
Output is correct |
136 |
Correct |
1949 ms |
38740 KB |
Output is correct |
137 |
Correct |
1063 ms |
29832 KB |
Output is correct |
138 |
Correct |
1077 ms |
30340 KB |
Output is correct |
139 |
Correct |
1756 ms |
38744 KB |
Output is correct |
140 |
Correct |
1697 ms |
38520 KB |
Output is correct |
141 |
Correct |
1840 ms |
38492 KB |
Output is correct |
142 |
Correct |
1915 ms |
38844 KB |
Output is correct |