# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
727529 |
2023-04-21T00:02:55 Z |
cig32 |
Council (JOI23_council) |
C++17 |
|
1324 ms |
111676 KB |
#include "bits/stdc++.h"
#define int long long
using namespace std;
int32_t main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
int a[n][m];
int b[n];
int s[m];
for(int i=0; i<m; i++) s[i] = 0;
for(int i=0; i<n; i++) {
b[i] = 0;
for(int j=0; j<m; j++) {
cin >> a[i][j];
s[j] += a[i][j];
b[i] |= (a[i][j] << j);
}
}
int cnt[(1<<m)];
int ans[(1<<m)];
for(int i=0; i<(1<<m); i++) cnt[i] = 0, ans[i] = -1;
for(int i=0; i<n; i++) cnt[b[i]]++;
pair<int,int> dp[(1<<m)][2];
for(int i=0; i<(1<<m); i++) for(int j=0; j<2; j++) dp[i][j] = {1e9, -1};
for(int i=0; i<n; i++) {
if(dp[b[i]][0].first == 0) dp[b[i]][1] = {0, i};
else dp[b[i]][0] = {0, i};
}
for(int i=0; i<m; i++) {
for(int j=0; j<(1<<m); j++) {
if(j & (1<<i)) {
vector<pair<int,int> > w = {
dp[j^(1<<i)][0], dp[j^(1<<i)][1],
dp[j][0], dp[j][1]
};
sort(w.begin(),w.end());
dp[j][0] = w[0];
for(int k=1; k<4; k++) {
if(dp[j][0].second != w[k].second) {
dp[j][1] = w[k]; break;
}
}
}
}
}
reverse(dp, dp+(1<<m));
for(int i=1; i<(1<<m); i++) {
if(dp[i][1].first == 0) continue;
for(int j=0; j<m; j++) {
if(i&(1<<j)) {
int tar0=dp[i^(1<<j)][0].first+1, tar1=dp[i^(1<<j)][1].first+1;
vector<pair<int,int> > w = {
{tar0,dp[i^(1<<j)][0].second},
{tar1,dp[i^(1<<j)][1].second},
dp[i][0],dp[i][1]
};
sort(w.begin(), w.end());
dp[i][0] = w[0];
for(int k=1; k<4; k++) {
if(dp[i][0].second != w[k].second) {
dp[i][1] = w[k]; break;
}
}
}
}
}
for(int i=0; i<n; i++) {
int bad = 0, base = 0;
for(int j=0; j<m; j++) {
int ss = s[j] - a[i][j];
if(ss >= n/2) base++;
if(ss == n/2) bad |= (1<<j);
}
int opt = dp[bad][0].first;
if(dp[bad][0].second == i) opt = dp[bad][1].first;
cout << base - opt << '\n';
}
}
/*
g++ B.cpp -std=c++17 -o B
g++ B2.cpp -std=c++17 -o B2
g++ gen.cpp -std=c++17 -o gen
g++ checker.cpp -std=c++17 -o checker
for ((i=1; ; ++i)); do
./gen $i > input_file
./B < input_file > myAnswer
./B2 < input_file > correctAnswer
./checker > checker_log
echo "Passed test: " $i
done
*/
Compilation message
council.cpp: In function 'int32_t main()':
council.cpp:22:7: warning: variable 'ans' set but not used [-Wunused-but-set-variable]
22 | int ans[(1<<m)];
| ^~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
2 ms |
468 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
652 ms |
49548 KB |
Output is correct |
6 |
Correct |
853 ms |
49592 KB |
Output is correct |
7 |
Correct |
962 ms |
49540 KB |
Output is correct |
8 |
Correct |
987 ms |
49540 KB |
Output is correct |
9 |
Correct |
921 ms |
49612 KB |
Output is correct |
10 |
Correct |
992 ms |
49612 KB |
Output is correct |
11 |
Correct |
989 ms |
49612 KB |
Output is correct |
12 |
Correct |
919 ms |
49516 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |
14 |
Correct |
0 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
0 ms |
212 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
0 ms |
212 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
336 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
7 ms |
980 KB |
Output is correct |
42 |
Correct |
12 ms |
1076 KB |
Output is correct |
43 |
Correct |
11 ms |
1088 KB |
Output is correct |
44 |
Correct |
12 ms |
980 KB |
Output is correct |
45 |
Correct |
11 ms |
980 KB |
Output is correct |
46 |
Correct |
71 ms |
6356 KB |
Output is correct |
47 |
Correct |
103 ms |
6356 KB |
Output is correct |
48 |
Correct |
104 ms |
6456 KB |
Output is correct |
49 |
Correct |
106 ms |
6448 KB |
Output is correct |
50 |
Correct |
105 ms |
6356 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
2 ms |
468 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
652 ms |
49548 KB |
Output is correct |
6 |
Correct |
853 ms |
49592 KB |
Output is correct |
7 |
Correct |
962 ms |
49540 KB |
Output is correct |
8 |
Correct |
987 ms |
49540 KB |
Output is correct |
9 |
Correct |
921 ms |
49612 KB |
Output is correct |
10 |
Correct |
992 ms |
49612 KB |
Output is correct |
11 |
Correct |
989 ms |
49612 KB |
Output is correct |
12 |
Correct |
919 ms |
49516 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |
14 |
Correct |
0 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
0 ms |
212 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
0 ms |
212 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
336 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
7 ms |
980 KB |
Output is correct |
42 |
Correct |
12 ms |
1076 KB |
Output is correct |
43 |
Correct |
11 ms |
1088 KB |
Output is correct |
44 |
Correct |
12 ms |
980 KB |
Output is correct |
45 |
Correct |
11 ms |
980 KB |
Output is correct |
46 |
Correct |
71 ms |
6356 KB |
Output is correct |
47 |
Correct |
103 ms |
6356 KB |
Output is correct |
48 |
Correct |
104 ms |
6456 KB |
Output is correct |
49 |
Correct |
106 ms |
6448 KB |
Output is correct |
50 |
Correct |
105 ms |
6356 KB |
Output is correct |
51 |
Correct |
821 ms |
50140 KB |
Output is correct |
52 |
Correct |
392 ms |
50156 KB |
Output is correct |
53 |
Correct |
592 ms |
50152 KB |
Output is correct |
54 |
Correct |
677 ms |
50228 KB |
Output is correct |
55 |
Correct |
1 ms |
340 KB |
Output is correct |
56 |
Correct |
71 ms |
6976 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
62 ms |
8964 KB |
Output is correct |
3 |
Correct |
56 ms |
9020 KB |
Output is correct |
4 |
Correct |
38 ms |
6216 KB |
Output is correct |
5 |
Correct |
56 ms |
8996 KB |
Output is correct |
6 |
Correct |
40 ms |
6104 KB |
Output is correct |
7 |
Correct |
62 ms |
8960 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
212 KB |
Output is correct |
11 |
Correct |
0 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
62 ms |
8964 KB |
Output is correct |
3 |
Correct |
56 ms |
9020 KB |
Output is correct |
4 |
Correct |
38 ms |
6216 KB |
Output is correct |
5 |
Correct |
56 ms |
8996 KB |
Output is correct |
6 |
Correct |
40 ms |
6104 KB |
Output is correct |
7 |
Correct |
62 ms |
8960 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
212 KB |
Output is correct |
11 |
Correct |
0 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
207 ms |
32276 KB |
Output is correct |
21 |
Correct |
180 ms |
29128 KB |
Output is correct |
22 |
Correct |
185 ms |
29244 KB |
Output is correct |
23 |
Correct |
172 ms |
32780 KB |
Output is correct |
24 |
Correct |
167 ms |
32484 KB |
Output is correct |
25 |
Correct |
181 ms |
32364 KB |
Output is correct |
26 |
Correct |
195 ms |
32416 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
0 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
0 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
62 ms |
8964 KB |
Output is correct |
3 |
Correct |
56 ms |
9020 KB |
Output is correct |
4 |
Correct |
38 ms |
6216 KB |
Output is correct |
5 |
Correct |
56 ms |
8996 KB |
Output is correct |
6 |
Correct |
40 ms |
6104 KB |
Output is correct |
7 |
Correct |
62 ms |
8960 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
212 KB |
Output is correct |
11 |
Correct |
0 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
207 ms |
32276 KB |
Output is correct |
21 |
Correct |
180 ms |
29128 KB |
Output is correct |
22 |
Correct |
185 ms |
29244 KB |
Output is correct |
23 |
Correct |
172 ms |
32780 KB |
Output is correct |
24 |
Correct |
167 ms |
32484 KB |
Output is correct |
25 |
Correct |
181 ms |
32364 KB |
Output is correct |
26 |
Correct |
195 ms |
32416 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
0 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
0 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
46 |
Correct |
3 ms |
468 KB |
Output is correct |
47 |
Correct |
312 ms |
44924 KB |
Output is correct |
48 |
Correct |
248 ms |
41432 KB |
Output is correct |
49 |
Correct |
250 ms |
41448 KB |
Output is correct |
50 |
Correct |
237 ms |
45260 KB |
Output is correct |
51 |
Correct |
226 ms |
44256 KB |
Output is correct |
52 |
Correct |
247 ms |
44364 KB |
Output is correct |
53 |
Correct |
275 ms |
44748 KB |
Output is correct |
54 |
Correct |
8 ms |
980 KB |
Output is correct |
55 |
Correct |
12 ms |
1092 KB |
Output is correct |
56 |
Correct |
12 ms |
1084 KB |
Output is correct |
57 |
Correct |
11 ms |
980 KB |
Output is correct |
58 |
Correct |
11 ms |
980 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
62 ms |
8964 KB |
Output is correct |
3 |
Correct |
56 ms |
9020 KB |
Output is correct |
4 |
Correct |
38 ms |
6216 KB |
Output is correct |
5 |
Correct |
56 ms |
8996 KB |
Output is correct |
6 |
Correct |
40 ms |
6104 KB |
Output is correct |
7 |
Correct |
62 ms |
8960 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
212 KB |
Output is correct |
11 |
Correct |
0 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
207 ms |
32276 KB |
Output is correct |
21 |
Correct |
180 ms |
29128 KB |
Output is correct |
22 |
Correct |
185 ms |
29244 KB |
Output is correct |
23 |
Correct |
172 ms |
32780 KB |
Output is correct |
24 |
Correct |
167 ms |
32484 KB |
Output is correct |
25 |
Correct |
181 ms |
32364 KB |
Output is correct |
26 |
Correct |
195 ms |
32416 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
0 ms |
212 KB |
Output is correct |
31 |
Correct |
0 ms |
212 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
212 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
0 ms |
212 KB |
Output is correct |
38 |
Correct |
0 ms |
212 KB |
Output is correct |
39 |
Correct |
0 ms |
212 KB |
Output is correct |
40 |
Correct |
0 ms |
212 KB |
Output is correct |
41 |
Correct |
0 ms |
212 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
46 |
Correct |
3 ms |
468 KB |
Output is correct |
47 |
Correct |
312 ms |
44924 KB |
Output is correct |
48 |
Correct |
248 ms |
41432 KB |
Output is correct |
49 |
Correct |
250 ms |
41448 KB |
Output is correct |
50 |
Correct |
237 ms |
45260 KB |
Output is correct |
51 |
Correct |
226 ms |
44256 KB |
Output is correct |
52 |
Correct |
247 ms |
44364 KB |
Output is correct |
53 |
Correct |
275 ms |
44748 KB |
Output is correct |
54 |
Correct |
8 ms |
980 KB |
Output is correct |
55 |
Correct |
12 ms |
1092 KB |
Output is correct |
56 |
Correct |
12 ms |
1084 KB |
Output is correct |
57 |
Correct |
11 ms |
980 KB |
Output is correct |
58 |
Correct |
11 ms |
980 KB |
Output is correct |
59 |
Correct |
319 ms |
53008 KB |
Output is correct |
60 |
Correct |
192 ms |
26700 KB |
Output is correct |
61 |
Correct |
211 ms |
28096 KB |
Output is correct |
62 |
Correct |
202 ms |
28924 KB |
Output is correct |
63 |
Correct |
347 ms |
53156 KB |
Output is correct |
64 |
Correct |
409 ms |
57916 KB |
Output is correct |
65 |
Correct |
416 ms |
59208 KB |
Output is correct |
66 |
Correct |
357 ms |
59584 KB |
Output is correct |
67 |
Correct |
292 ms |
59184 KB |
Output is correct |
68 |
Correct |
365 ms |
59480 KB |
Output is correct |
69 |
Correct |
376 ms |
58188 KB |
Output is correct |
70 |
Correct |
70 ms |
6356 KB |
Output is correct |
71 |
Correct |
105 ms |
6448 KB |
Output is correct |
72 |
Correct |
108 ms |
6452 KB |
Output is correct |
73 |
Correct |
105 ms |
6356 KB |
Output is correct |
74 |
Correct |
105 ms |
6448 KB |
Output is correct |
75 |
Correct |
71 ms |
6964 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
2 ms |
468 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
652 ms |
49548 KB |
Output is correct |
6 |
Correct |
853 ms |
49592 KB |
Output is correct |
7 |
Correct |
962 ms |
49540 KB |
Output is correct |
8 |
Correct |
987 ms |
49540 KB |
Output is correct |
9 |
Correct |
921 ms |
49612 KB |
Output is correct |
10 |
Correct |
992 ms |
49612 KB |
Output is correct |
11 |
Correct |
989 ms |
49612 KB |
Output is correct |
12 |
Correct |
919 ms |
49516 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |
14 |
Correct |
0 ms |
212 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
0 ms |
212 KB |
Output is correct |
17 |
Correct |
1 ms |
212 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
212 KB |
Output is correct |
21 |
Correct |
0 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
0 ms |
212 KB |
Output is correct |
24 |
Correct |
1 ms |
212 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
0 ms |
212 KB |
Output is correct |
28 |
Correct |
0 ms |
212 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
0 ms |
212 KB |
Output is correct |
33 |
Correct |
0 ms |
336 KB |
Output is correct |
34 |
Correct |
0 ms |
212 KB |
Output is correct |
35 |
Correct |
0 ms |
212 KB |
Output is correct |
36 |
Correct |
0 ms |
212 KB |
Output is correct |
37 |
Correct |
1 ms |
212 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
7 ms |
980 KB |
Output is correct |
42 |
Correct |
12 ms |
1076 KB |
Output is correct |
43 |
Correct |
11 ms |
1088 KB |
Output is correct |
44 |
Correct |
12 ms |
980 KB |
Output is correct |
45 |
Correct |
11 ms |
980 KB |
Output is correct |
46 |
Correct |
71 ms |
6356 KB |
Output is correct |
47 |
Correct |
103 ms |
6356 KB |
Output is correct |
48 |
Correct |
104 ms |
6456 KB |
Output is correct |
49 |
Correct |
106 ms |
6448 KB |
Output is correct |
50 |
Correct |
105 ms |
6356 KB |
Output is correct |
51 |
Correct |
821 ms |
50140 KB |
Output is correct |
52 |
Correct |
392 ms |
50156 KB |
Output is correct |
53 |
Correct |
592 ms |
50152 KB |
Output is correct |
54 |
Correct |
677 ms |
50228 KB |
Output is correct |
55 |
Correct |
1 ms |
340 KB |
Output is correct |
56 |
Correct |
71 ms |
6976 KB |
Output is correct |
57 |
Correct |
0 ms |
212 KB |
Output is correct |
58 |
Correct |
62 ms |
8964 KB |
Output is correct |
59 |
Correct |
56 ms |
9020 KB |
Output is correct |
60 |
Correct |
38 ms |
6216 KB |
Output is correct |
61 |
Correct |
56 ms |
8996 KB |
Output is correct |
62 |
Correct |
40 ms |
6104 KB |
Output is correct |
63 |
Correct |
62 ms |
8960 KB |
Output is correct |
64 |
Correct |
0 ms |
212 KB |
Output is correct |
65 |
Correct |
0 ms |
212 KB |
Output is correct |
66 |
Correct |
0 ms |
212 KB |
Output is correct |
67 |
Correct |
0 ms |
212 KB |
Output is correct |
68 |
Correct |
0 ms |
212 KB |
Output is correct |
69 |
Correct |
0 ms |
212 KB |
Output is correct |
70 |
Correct |
1 ms |
212 KB |
Output is correct |
71 |
Correct |
0 ms |
212 KB |
Output is correct |
72 |
Correct |
0 ms |
212 KB |
Output is correct |
73 |
Correct |
1 ms |
340 KB |
Output is correct |
74 |
Correct |
0 ms |
212 KB |
Output is correct |
75 |
Correct |
0 ms |
212 KB |
Output is correct |
76 |
Correct |
207 ms |
32276 KB |
Output is correct |
77 |
Correct |
180 ms |
29128 KB |
Output is correct |
78 |
Correct |
185 ms |
29244 KB |
Output is correct |
79 |
Correct |
172 ms |
32780 KB |
Output is correct |
80 |
Correct |
167 ms |
32484 KB |
Output is correct |
81 |
Correct |
181 ms |
32364 KB |
Output is correct |
82 |
Correct |
195 ms |
32416 KB |
Output is correct |
83 |
Correct |
1 ms |
340 KB |
Output is correct |
84 |
Correct |
0 ms |
212 KB |
Output is correct |
85 |
Correct |
0 ms |
212 KB |
Output is correct |
86 |
Correct |
0 ms |
212 KB |
Output is correct |
87 |
Correct |
0 ms |
212 KB |
Output is correct |
88 |
Correct |
0 ms |
212 KB |
Output is correct |
89 |
Correct |
0 ms |
212 KB |
Output is correct |
90 |
Correct |
0 ms |
212 KB |
Output is correct |
91 |
Correct |
1 ms |
340 KB |
Output is correct |
92 |
Correct |
1 ms |
340 KB |
Output is correct |
93 |
Correct |
0 ms |
212 KB |
Output is correct |
94 |
Correct |
0 ms |
212 KB |
Output is correct |
95 |
Correct |
0 ms |
212 KB |
Output is correct |
96 |
Correct |
0 ms |
212 KB |
Output is correct |
97 |
Correct |
0 ms |
212 KB |
Output is correct |
98 |
Correct |
1 ms |
212 KB |
Output is correct |
99 |
Correct |
1 ms |
212 KB |
Output is correct |
100 |
Correct |
1 ms |
340 KB |
Output is correct |
101 |
Correct |
1 ms |
340 KB |
Output is correct |
102 |
Correct |
3 ms |
468 KB |
Output is correct |
103 |
Correct |
312 ms |
44924 KB |
Output is correct |
104 |
Correct |
248 ms |
41432 KB |
Output is correct |
105 |
Correct |
250 ms |
41448 KB |
Output is correct |
106 |
Correct |
237 ms |
45260 KB |
Output is correct |
107 |
Correct |
226 ms |
44256 KB |
Output is correct |
108 |
Correct |
247 ms |
44364 KB |
Output is correct |
109 |
Correct |
275 ms |
44748 KB |
Output is correct |
110 |
Correct |
8 ms |
980 KB |
Output is correct |
111 |
Correct |
12 ms |
1092 KB |
Output is correct |
112 |
Correct |
12 ms |
1084 KB |
Output is correct |
113 |
Correct |
11 ms |
980 KB |
Output is correct |
114 |
Correct |
11 ms |
980 KB |
Output is correct |
115 |
Correct |
319 ms |
53008 KB |
Output is correct |
116 |
Correct |
192 ms |
26700 KB |
Output is correct |
117 |
Correct |
211 ms |
28096 KB |
Output is correct |
118 |
Correct |
202 ms |
28924 KB |
Output is correct |
119 |
Correct |
347 ms |
53156 KB |
Output is correct |
120 |
Correct |
409 ms |
57916 KB |
Output is correct |
121 |
Correct |
416 ms |
59208 KB |
Output is correct |
122 |
Correct |
357 ms |
59584 KB |
Output is correct |
123 |
Correct |
292 ms |
59184 KB |
Output is correct |
124 |
Correct |
365 ms |
59480 KB |
Output is correct |
125 |
Correct |
376 ms |
58188 KB |
Output is correct |
126 |
Correct |
70 ms |
6356 KB |
Output is correct |
127 |
Correct |
105 ms |
6448 KB |
Output is correct |
128 |
Correct |
108 ms |
6452 KB |
Output is correct |
129 |
Correct |
105 ms |
6356 KB |
Output is correct |
130 |
Correct |
105 ms |
6448 KB |
Output is correct |
131 |
Correct |
71 ms |
6964 KB |
Output is correct |
132 |
Correct |
902 ms |
111676 KB |
Output is correct |
133 |
Correct |
900 ms |
111092 KB |
Output is correct |
134 |
Correct |
891 ms |
111496 KB |
Output is correct |
135 |
Correct |
1302 ms |
111356 KB |
Output is correct |
136 |
Correct |
1324 ms |
111488 KB |
Output is correct |
137 |
Correct |
852 ms |
83672 KB |
Output is correct |
138 |
Correct |
790 ms |
83892 KB |
Output is correct |
139 |
Correct |
1202 ms |
111420 KB |
Output is correct |
140 |
Correct |
717 ms |
111216 KB |
Output is correct |
141 |
Correct |
935 ms |
111100 KB |
Output is correct |
142 |
Correct |
1025 ms |
111584 KB |
Output is correct |