# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1033348 |
2024-07-24T16:59:48 Z |
Andrey |
Council (JOI23_council) |
C++14 |
|
543 ms |
46980 KB |
#include<bits/stdc++.h>
using namespace std;
vector<pair<int,int>> bruh((1 << 20),{-1,-1});
vector<pair<int,int>> dp((1 << 20),{-1,-1});
vector<pair<int,int>> idk((1 << 20),{0,0});
vector<pair<int,int>> pos((1 << 20),{-1,-1});
void merge(int x, int c, int d) {
if(c == -1) {
return;
}
if(pos[x].first == c) {
idk[x] = {max(d,idk[x].first),idk[x].second};
}
else if(pos[x].second == c) {
idk[x] = {idk[x].first,max(idk[x].second,d)};
if(idk[x].first < idk[x].second) {
idk[x] = {idk[x].second,idk[x].first};
pos[x] = {pos[x].second,pos[x].first};
}
}
else {
if(d > idk[x].first) {
idk[x] = {d,idk[x].first};
pos[x] = {c,pos[x].first};
}
else if(d > idk[x].second) {
idk[x] = {idk[x].first,d};
pos[x] = {pos[x].first,c};
}
}
}
pair<int,int> calc(pair<int,int> a, int b) {
if(b == -1) {
return a;
}
if(a.first == -1) {
return {b,-1};
}
else if(a.second == -1 && a.first != b) {
return {a.first,b};
}
return a;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n,m,a;
cin >> n >> m;
vector<int> br(m);
vector<int> haha(n);
for(int i = 0; i < n; i++) {
int c = 0,d = m;
for(int j = 0; j < m; j++) {
cin >> a;
br[j]+=a;
d-=a;
c+=a*(1 << j);
}
bruh[c] = calc(bruh[c],i);
haha[i] = c;
}
for(int i = 0; i < (1 << m); i++) {
dp[i] = bruh[i];
for(int j = 0; j < m; j++) {
if((1 << j)&i) {
dp[i] = calc(dp[i],dp[i-(1 << j)].first);
dp[i] = calc(dp[i],dp[i-(1 << j)].second);
}
}
}
for(int i = (1 << m)-1; i >= 0; i--) {
int br = 0;
for(int j = 0; j < m; j++) {
if(((1 << j)&i) == 0) {
br++;
}
}
if(dp[i].first != -1) {
merge(i,dp[i].first,br);
}
if(dp[i].second != -1) {
merge(i,dp[i].second,br);
}
for(int j = 0; j < m; j++) {
if(((1 << j)&i) == 0) {
merge(i,pos[i+(1 << j)].first,idk[i+(1 << j)].first);
merge(i,pos[i+(1 << j)].second,idk[i+(1 << j)].second);
}
}
}
for(int i = 0; i < n; i++) {
int x = 0,ans = 0;
for(int j = 0; j < m; j++) {
int c = br[j];
if((1 << j)&haha[i]) {
c--;
}
if(c == n/2) {
x+=(1 << j);
}
if(c > n/2) {
ans++;
}
}
x = (1 << m)-1-x;
if(pos[x].first == i) {
cout << ans+idk[x].second << "\n";
}
else {
cout << ans+idk[x].first << "\n";
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
33116 KB |
Output is correct |
2 |
Correct |
14 ms |
33316 KB |
Output is correct |
3 |
Correct |
12 ms |
33116 KB |
Output is correct |
4 |
Correct |
12 ms |
33128 KB |
Output is correct |
5 |
Correct |
221 ms |
33292 KB |
Output is correct |
6 |
Correct |
200 ms |
33116 KB |
Output is correct |
7 |
Correct |
230 ms |
33292 KB |
Output is correct |
8 |
Correct |
250 ms |
33112 KB |
Output is correct |
9 |
Correct |
251 ms |
33116 KB |
Output is correct |
10 |
Correct |
203 ms |
33288 KB |
Output is correct |
11 |
Correct |
261 ms |
33112 KB |
Output is correct |
12 |
Correct |
264 ms |
33360 KB |
Output is correct |
13 |
Correct |
13 ms |
33116 KB |
Output is correct |
14 |
Correct |
12 ms |
33112 KB |
Output is correct |
15 |
Correct |
12 ms |
33116 KB |
Output is correct |
16 |
Correct |
12 ms |
33116 KB |
Output is correct |
17 |
Correct |
12 ms |
33248 KB |
Output is correct |
18 |
Correct |
12 ms |
33116 KB |
Output is correct |
19 |
Correct |
13 ms |
33264 KB |
Output is correct |
20 |
Correct |
16 ms |
33144 KB |
Output is correct |
21 |
Correct |
17 ms |
33112 KB |
Output is correct |
22 |
Correct |
17 ms |
33272 KB |
Output is correct |
23 |
Correct |
13 ms |
33116 KB |
Output is correct |
24 |
Correct |
12 ms |
33224 KB |
Output is correct |
25 |
Correct |
12 ms |
33116 KB |
Output is correct |
26 |
Correct |
12 ms |
33112 KB |
Output is correct |
27 |
Correct |
11 ms |
33116 KB |
Output is correct |
28 |
Correct |
13 ms |
33112 KB |
Output is correct |
29 |
Correct |
12 ms |
33116 KB |
Output is correct |
30 |
Correct |
12 ms |
33312 KB |
Output is correct |
31 |
Correct |
12 ms |
33116 KB |
Output is correct |
32 |
Correct |
12 ms |
33116 KB |
Output is correct |
33 |
Correct |
13 ms |
33116 KB |
Output is correct |
34 |
Correct |
13 ms |
33116 KB |
Output is correct |
35 |
Correct |
12 ms |
33116 KB |
Output is correct |
36 |
Correct |
11 ms |
33100 KB |
Output is correct |
37 |
Correct |
11 ms |
33116 KB |
Output is correct |
38 |
Correct |
11 ms |
33192 KB |
Output is correct |
39 |
Correct |
11 ms |
33232 KB |
Output is correct |
40 |
Correct |
11 ms |
33116 KB |
Output is correct |
41 |
Correct |
13 ms |
33316 KB |
Output is correct |
42 |
Correct |
12 ms |
33116 KB |
Output is correct |
43 |
Correct |
13 ms |
33280 KB |
Output is correct |
44 |
Correct |
14 ms |
33116 KB |
Output is correct |
45 |
Correct |
15 ms |
33180 KB |
Output is correct |
46 |
Correct |
42 ms |
33116 KB |
Output is correct |
47 |
Correct |
35 ms |
33100 KB |
Output is correct |
48 |
Correct |
40 ms |
33112 KB |
Output is correct |
49 |
Correct |
36 ms |
33112 KB |
Output is correct |
50 |
Correct |
36 ms |
33116 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
33116 KB |
Output is correct |
2 |
Correct |
14 ms |
33316 KB |
Output is correct |
3 |
Correct |
12 ms |
33116 KB |
Output is correct |
4 |
Correct |
12 ms |
33128 KB |
Output is correct |
5 |
Correct |
221 ms |
33292 KB |
Output is correct |
6 |
Correct |
200 ms |
33116 KB |
Output is correct |
7 |
Correct |
230 ms |
33292 KB |
Output is correct |
8 |
Correct |
250 ms |
33112 KB |
Output is correct |
9 |
Correct |
251 ms |
33116 KB |
Output is correct |
10 |
Correct |
203 ms |
33288 KB |
Output is correct |
11 |
Correct |
261 ms |
33112 KB |
Output is correct |
12 |
Correct |
264 ms |
33360 KB |
Output is correct |
13 |
Correct |
13 ms |
33116 KB |
Output is correct |
14 |
Correct |
12 ms |
33112 KB |
Output is correct |
15 |
Correct |
12 ms |
33116 KB |
Output is correct |
16 |
Correct |
12 ms |
33116 KB |
Output is correct |
17 |
Correct |
12 ms |
33248 KB |
Output is correct |
18 |
Correct |
12 ms |
33116 KB |
Output is correct |
19 |
Correct |
13 ms |
33264 KB |
Output is correct |
20 |
Correct |
16 ms |
33144 KB |
Output is correct |
21 |
Correct |
17 ms |
33112 KB |
Output is correct |
22 |
Correct |
17 ms |
33272 KB |
Output is correct |
23 |
Correct |
13 ms |
33116 KB |
Output is correct |
24 |
Correct |
12 ms |
33224 KB |
Output is correct |
25 |
Correct |
12 ms |
33116 KB |
Output is correct |
26 |
Correct |
12 ms |
33112 KB |
Output is correct |
27 |
Correct |
11 ms |
33116 KB |
Output is correct |
28 |
Correct |
13 ms |
33112 KB |
Output is correct |
29 |
Correct |
12 ms |
33116 KB |
Output is correct |
30 |
Correct |
12 ms |
33312 KB |
Output is correct |
31 |
Correct |
12 ms |
33116 KB |
Output is correct |
32 |
Correct |
12 ms |
33116 KB |
Output is correct |
33 |
Correct |
13 ms |
33116 KB |
Output is correct |
34 |
Correct |
13 ms |
33116 KB |
Output is correct |
35 |
Correct |
12 ms |
33116 KB |
Output is correct |
36 |
Correct |
11 ms |
33100 KB |
Output is correct |
37 |
Correct |
11 ms |
33116 KB |
Output is correct |
38 |
Correct |
11 ms |
33192 KB |
Output is correct |
39 |
Correct |
11 ms |
33232 KB |
Output is correct |
40 |
Correct |
11 ms |
33116 KB |
Output is correct |
41 |
Correct |
13 ms |
33316 KB |
Output is correct |
42 |
Correct |
12 ms |
33116 KB |
Output is correct |
43 |
Correct |
13 ms |
33280 KB |
Output is correct |
44 |
Correct |
14 ms |
33116 KB |
Output is correct |
45 |
Correct |
15 ms |
33180 KB |
Output is correct |
46 |
Correct |
42 ms |
33116 KB |
Output is correct |
47 |
Correct |
35 ms |
33100 KB |
Output is correct |
48 |
Correct |
40 ms |
33112 KB |
Output is correct |
49 |
Correct |
36 ms |
33112 KB |
Output is correct |
50 |
Correct |
36 ms |
33116 KB |
Output is correct |
51 |
Correct |
185 ms |
33368 KB |
Output is correct |
52 |
Correct |
240 ms |
33616 KB |
Output is correct |
53 |
Correct |
203 ms |
33372 KB |
Output is correct |
54 |
Correct |
221 ms |
33372 KB |
Output is correct |
55 |
Correct |
17 ms |
33112 KB |
Output is correct |
56 |
Correct |
45 ms |
33412 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
33116 KB |
Output is correct |
2 |
Correct |
45 ms |
36136 KB |
Output is correct |
3 |
Correct |
45 ms |
36000 KB |
Output is correct |
4 |
Correct |
36 ms |
35408 KB |
Output is correct |
5 |
Correct |
60 ms |
36144 KB |
Output is correct |
6 |
Correct |
40 ms |
35408 KB |
Output is correct |
7 |
Correct |
51 ms |
36176 KB |
Output is correct |
8 |
Correct |
12 ms |
33112 KB |
Output is correct |
9 |
Correct |
13 ms |
33112 KB |
Output is correct |
10 |
Correct |
14 ms |
33116 KB |
Output is correct |
11 |
Correct |
15 ms |
33116 KB |
Output is correct |
12 |
Correct |
14 ms |
33112 KB |
Output is correct |
13 |
Correct |
14 ms |
33112 KB |
Output is correct |
14 |
Correct |
13 ms |
33112 KB |
Output is correct |
15 |
Correct |
13 ms |
33112 KB |
Output is correct |
16 |
Correct |
13 ms |
33116 KB |
Output is correct |
17 |
Correct |
14 ms |
33112 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
33116 KB |
Output is correct |
2 |
Correct |
45 ms |
36136 KB |
Output is correct |
3 |
Correct |
45 ms |
36000 KB |
Output is correct |
4 |
Correct |
36 ms |
35408 KB |
Output is correct |
5 |
Correct |
60 ms |
36144 KB |
Output is correct |
6 |
Correct |
40 ms |
35408 KB |
Output is correct |
7 |
Correct |
51 ms |
36176 KB |
Output is correct |
8 |
Correct |
12 ms |
33112 KB |
Output is correct |
9 |
Correct |
13 ms |
33112 KB |
Output is correct |
10 |
Correct |
14 ms |
33116 KB |
Output is correct |
11 |
Correct |
15 ms |
33116 KB |
Output is correct |
12 |
Correct |
14 ms |
33112 KB |
Output is correct |
13 |
Correct |
14 ms |
33112 KB |
Output is correct |
14 |
Correct |
13 ms |
33112 KB |
Output is correct |
15 |
Correct |
13 ms |
33112 KB |
Output is correct |
16 |
Correct |
13 ms |
33116 KB |
Output is correct |
17 |
Correct |
14 ms |
33112 KB |
Output is correct |
18 |
Correct |
14 ms |
33072 KB |
Output is correct |
19 |
Correct |
12 ms |
33116 KB |
Output is correct |
20 |
Correct |
148 ms |
40864 KB |
Output is correct |
21 |
Correct |
142 ms |
40436 KB |
Output is correct |
22 |
Correct |
144 ms |
40272 KB |
Output is correct |
23 |
Correct |
133 ms |
41040 KB |
Output is correct |
24 |
Correct |
144 ms |
40788 KB |
Output is correct |
25 |
Correct |
147 ms |
40852 KB |
Output is correct |
26 |
Correct |
154 ms |
40784 KB |
Output is correct |
27 |
Correct |
13 ms |
33116 KB |
Output is correct |
28 |
Correct |
13 ms |
33116 KB |
Output is correct |
29 |
Correct |
13 ms |
33116 KB |
Output is correct |
30 |
Correct |
14 ms |
33116 KB |
Output is correct |
31 |
Correct |
13 ms |
33116 KB |
Output is correct |
32 |
Correct |
17 ms |
33124 KB |
Output is correct |
33 |
Correct |
13 ms |
33276 KB |
Output is correct |
34 |
Correct |
13 ms |
33116 KB |
Output is correct |
35 |
Correct |
12 ms |
33256 KB |
Output is correct |
36 |
Correct |
14 ms |
33116 KB |
Output is correct |
37 |
Correct |
14 ms |
33116 KB |
Output is correct |
38 |
Correct |
14 ms |
33116 KB |
Output is correct |
39 |
Correct |
13 ms |
33100 KB |
Output is correct |
40 |
Correct |
13 ms |
33184 KB |
Output is correct |
41 |
Correct |
13 ms |
33244 KB |
Output is correct |
42 |
Correct |
14 ms |
33176 KB |
Output is correct |
43 |
Correct |
12 ms |
33116 KB |
Output is correct |
44 |
Correct |
14 ms |
33116 KB |
Output is correct |
45 |
Correct |
14 ms |
33076 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
33116 KB |
Output is correct |
2 |
Correct |
45 ms |
36136 KB |
Output is correct |
3 |
Correct |
45 ms |
36000 KB |
Output is correct |
4 |
Correct |
36 ms |
35408 KB |
Output is correct |
5 |
Correct |
60 ms |
36144 KB |
Output is correct |
6 |
Correct |
40 ms |
35408 KB |
Output is correct |
7 |
Correct |
51 ms |
36176 KB |
Output is correct |
8 |
Correct |
12 ms |
33112 KB |
Output is correct |
9 |
Correct |
13 ms |
33112 KB |
Output is correct |
10 |
Correct |
14 ms |
33116 KB |
Output is correct |
11 |
Correct |
15 ms |
33116 KB |
Output is correct |
12 |
Correct |
14 ms |
33112 KB |
Output is correct |
13 |
Correct |
14 ms |
33112 KB |
Output is correct |
14 |
Correct |
13 ms |
33112 KB |
Output is correct |
15 |
Correct |
13 ms |
33112 KB |
Output is correct |
16 |
Correct |
13 ms |
33116 KB |
Output is correct |
17 |
Correct |
14 ms |
33112 KB |
Output is correct |
18 |
Correct |
14 ms |
33072 KB |
Output is correct |
19 |
Correct |
12 ms |
33116 KB |
Output is correct |
20 |
Correct |
148 ms |
40864 KB |
Output is correct |
21 |
Correct |
142 ms |
40436 KB |
Output is correct |
22 |
Correct |
144 ms |
40272 KB |
Output is correct |
23 |
Correct |
133 ms |
41040 KB |
Output is correct |
24 |
Correct |
144 ms |
40788 KB |
Output is correct |
25 |
Correct |
147 ms |
40852 KB |
Output is correct |
26 |
Correct |
154 ms |
40784 KB |
Output is correct |
27 |
Correct |
13 ms |
33116 KB |
Output is correct |
28 |
Correct |
13 ms |
33116 KB |
Output is correct |
29 |
Correct |
13 ms |
33116 KB |
Output is correct |
30 |
Correct |
14 ms |
33116 KB |
Output is correct |
31 |
Correct |
13 ms |
33116 KB |
Output is correct |
32 |
Correct |
17 ms |
33124 KB |
Output is correct |
33 |
Correct |
13 ms |
33276 KB |
Output is correct |
34 |
Correct |
13 ms |
33116 KB |
Output is correct |
35 |
Correct |
12 ms |
33256 KB |
Output is correct |
36 |
Correct |
14 ms |
33116 KB |
Output is correct |
37 |
Correct |
14 ms |
33116 KB |
Output is correct |
38 |
Correct |
14 ms |
33116 KB |
Output is correct |
39 |
Correct |
13 ms |
33100 KB |
Output is correct |
40 |
Correct |
13 ms |
33184 KB |
Output is correct |
41 |
Correct |
13 ms |
33244 KB |
Output is correct |
42 |
Correct |
14 ms |
33176 KB |
Output is correct |
43 |
Correct |
12 ms |
33116 KB |
Output is correct |
44 |
Correct |
14 ms |
33116 KB |
Output is correct |
45 |
Correct |
14 ms |
33076 KB |
Output is correct |
46 |
Correct |
16 ms |
33148 KB |
Output is correct |
47 |
Correct |
214 ms |
43088 KB |
Output is correct |
48 |
Correct |
189 ms |
42576 KB |
Output is correct |
49 |
Correct |
190 ms |
42520 KB |
Output is correct |
50 |
Correct |
174 ms |
43344 KB |
Output is correct |
51 |
Correct |
174 ms |
43092 KB |
Output is correct |
52 |
Correct |
193 ms |
43048 KB |
Output is correct |
53 |
Correct |
221 ms |
43344 KB |
Output is correct |
54 |
Correct |
15 ms |
33116 KB |
Output is correct |
55 |
Correct |
18 ms |
33116 KB |
Output is correct |
56 |
Correct |
17 ms |
33116 KB |
Output is correct |
57 |
Correct |
17 ms |
33320 KB |
Output is correct |
58 |
Correct |
16 ms |
33316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
33116 KB |
Output is correct |
2 |
Correct |
45 ms |
36136 KB |
Output is correct |
3 |
Correct |
45 ms |
36000 KB |
Output is correct |
4 |
Correct |
36 ms |
35408 KB |
Output is correct |
5 |
Correct |
60 ms |
36144 KB |
Output is correct |
6 |
Correct |
40 ms |
35408 KB |
Output is correct |
7 |
Correct |
51 ms |
36176 KB |
Output is correct |
8 |
Correct |
12 ms |
33112 KB |
Output is correct |
9 |
Correct |
13 ms |
33112 KB |
Output is correct |
10 |
Correct |
14 ms |
33116 KB |
Output is correct |
11 |
Correct |
15 ms |
33116 KB |
Output is correct |
12 |
Correct |
14 ms |
33112 KB |
Output is correct |
13 |
Correct |
14 ms |
33112 KB |
Output is correct |
14 |
Correct |
13 ms |
33112 KB |
Output is correct |
15 |
Correct |
13 ms |
33112 KB |
Output is correct |
16 |
Correct |
13 ms |
33116 KB |
Output is correct |
17 |
Correct |
14 ms |
33112 KB |
Output is correct |
18 |
Correct |
14 ms |
33072 KB |
Output is correct |
19 |
Correct |
12 ms |
33116 KB |
Output is correct |
20 |
Correct |
148 ms |
40864 KB |
Output is correct |
21 |
Correct |
142 ms |
40436 KB |
Output is correct |
22 |
Correct |
144 ms |
40272 KB |
Output is correct |
23 |
Correct |
133 ms |
41040 KB |
Output is correct |
24 |
Correct |
144 ms |
40788 KB |
Output is correct |
25 |
Correct |
147 ms |
40852 KB |
Output is correct |
26 |
Correct |
154 ms |
40784 KB |
Output is correct |
27 |
Correct |
13 ms |
33116 KB |
Output is correct |
28 |
Correct |
13 ms |
33116 KB |
Output is correct |
29 |
Correct |
13 ms |
33116 KB |
Output is correct |
30 |
Correct |
14 ms |
33116 KB |
Output is correct |
31 |
Correct |
13 ms |
33116 KB |
Output is correct |
32 |
Correct |
17 ms |
33124 KB |
Output is correct |
33 |
Correct |
13 ms |
33276 KB |
Output is correct |
34 |
Correct |
13 ms |
33116 KB |
Output is correct |
35 |
Correct |
12 ms |
33256 KB |
Output is correct |
36 |
Correct |
14 ms |
33116 KB |
Output is correct |
37 |
Correct |
14 ms |
33116 KB |
Output is correct |
38 |
Correct |
14 ms |
33116 KB |
Output is correct |
39 |
Correct |
13 ms |
33100 KB |
Output is correct |
40 |
Correct |
13 ms |
33184 KB |
Output is correct |
41 |
Correct |
13 ms |
33244 KB |
Output is correct |
42 |
Correct |
14 ms |
33176 KB |
Output is correct |
43 |
Correct |
12 ms |
33116 KB |
Output is correct |
44 |
Correct |
14 ms |
33116 KB |
Output is correct |
45 |
Correct |
14 ms |
33076 KB |
Output is correct |
46 |
Correct |
16 ms |
33148 KB |
Output is correct |
47 |
Correct |
214 ms |
43088 KB |
Output is correct |
48 |
Correct |
189 ms |
42576 KB |
Output is correct |
49 |
Correct |
190 ms |
42520 KB |
Output is correct |
50 |
Correct |
174 ms |
43344 KB |
Output is correct |
51 |
Correct |
174 ms |
43092 KB |
Output is correct |
52 |
Correct |
193 ms |
43048 KB |
Output is correct |
53 |
Correct |
221 ms |
43344 KB |
Output is correct |
54 |
Correct |
15 ms |
33116 KB |
Output is correct |
55 |
Correct |
18 ms |
33116 KB |
Output is correct |
56 |
Correct |
17 ms |
33116 KB |
Output is correct |
57 |
Correct |
17 ms |
33320 KB |
Output is correct |
58 |
Correct |
16 ms |
33316 KB |
Output is correct |
59 |
Correct |
263 ms |
44624 KB |
Output is correct |
60 |
Correct |
149 ms |
37708 KB |
Output is correct |
61 |
Correct |
134 ms |
38224 KB |
Output is correct |
62 |
Correct |
148 ms |
38228 KB |
Output is correct |
63 |
Correct |
242 ms |
44456 KB |
Output is correct |
64 |
Correct |
263 ms |
44884 KB |
Output is correct |
65 |
Correct |
286 ms |
44820 KB |
Output is correct |
66 |
Correct |
220 ms |
45392 KB |
Output is correct |
67 |
Correct |
215 ms |
44952 KB |
Output is correct |
68 |
Correct |
252 ms |
44840 KB |
Output is correct |
69 |
Correct |
270 ms |
45140 KB |
Output is correct |
70 |
Correct |
38 ms |
33116 KB |
Output is correct |
71 |
Correct |
36 ms |
33112 KB |
Output is correct |
72 |
Correct |
39 ms |
33116 KB |
Output is correct |
73 |
Correct |
37 ms |
33116 KB |
Output is correct |
74 |
Correct |
39 ms |
33116 KB |
Output is correct |
75 |
Correct |
49 ms |
33380 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
33116 KB |
Output is correct |
2 |
Correct |
14 ms |
33316 KB |
Output is correct |
3 |
Correct |
12 ms |
33116 KB |
Output is correct |
4 |
Correct |
12 ms |
33128 KB |
Output is correct |
5 |
Correct |
221 ms |
33292 KB |
Output is correct |
6 |
Correct |
200 ms |
33116 KB |
Output is correct |
7 |
Correct |
230 ms |
33292 KB |
Output is correct |
8 |
Correct |
250 ms |
33112 KB |
Output is correct |
9 |
Correct |
251 ms |
33116 KB |
Output is correct |
10 |
Correct |
203 ms |
33288 KB |
Output is correct |
11 |
Correct |
261 ms |
33112 KB |
Output is correct |
12 |
Correct |
264 ms |
33360 KB |
Output is correct |
13 |
Correct |
13 ms |
33116 KB |
Output is correct |
14 |
Correct |
12 ms |
33112 KB |
Output is correct |
15 |
Correct |
12 ms |
33116 KB |
Output is correct |
16 |
Correct |
12 ms |
33116 KB |
Output is correct |
17 |
Correct |
12 ms |
33248 KB |
Output is correct |
18 |
Correct |
12 ms |
33116 KB |
Output is correct |
19 |
Correct |
13 ms |
33264 KB |
Output is correct |
20 |
Correct |
16 ms |
33144 KB |
Output is correct |
21 |
Correct |
17 ms |
33112 KB |
Output is correct |
22 |
Correct |
17 ms |
33272 KB |
Output is correct |
23 |
Correct |
13 ms |
33116 KB |
Output is correct |
24 |
Correct |
12 ms |
33224 KB |
Output is correct |
25 |
Correct |
12 ms |
33116 KB |
Output is correct |
26 |
Correct |
12 ms |
33112 KB |
Output is correct |
27 |
Correct |
11 ms |
33116 KB |
Output is correct |
28 |
Correct |
13 ms |
33112 KB |
Output is correct |
29 |
Correct |
12 ms |
33116 KB |
Output is correct |
30 |
Correct |
12 ms |
33312 KB |
Output is correct |
31 |
Correct |
12 ms |
33116 KB |
Output is correct |
32 |
Correct |
12 ms |
33116 KB |
Output is correct |
33 |
Correct |
13 ms |
33116 KB |
Output is correct |
34 |
Correct |
13 ms |
33116 KB |
Output is correct |
35 |
Correct |
12 ms |
33116 KB |
Output is correct |
36 |
Correct |
11 ms |
33100 KB |
Output is correct |
37 |
Correct |
11 ms |
33116 KB |
Output is correct |
38 |
Correct |
11 ms |
33192 KB |
Output is correct |
39 |
Correct |
11 ms |
33232 KB |
Output is correct |
40 |
Correct |
11 ms |
33116 KB |
Output is correct |
41 |
Correct |
13 ms |
33316 KB |
Output is correct |
42 |
Correct |
12 ms |
33116 KB |
Output is correct |
43 |
Correct |
13 ms |
33280 KB |
Output is correct |
44 |
Correct |
14 ms |
33116 KB |
Output is correct |
45 |
Correct |
15 ms |
33180 KB |
Output is correct |
46 |
Correct |
42 ms |
33116 KB |
Output is correct |
47 |
Correct |
35 ms |
33100 KB |
Output is correct |
48 |
Correct |
40 ms |
33112 KB |
Output is correct |
49 |
Correct |
36 ms |
33112 KB |
Output is correct |
50 |
Correct |
36 ms |
33116 KB |
Output is correct |
51 |
Correct |
185 ms |
33368 KB |
Output is correct |
52 |
Correct |
240 ms |
33616 KB |
Output is correct |
53 |
Correct |
203 ms |
33372 KB |
Output is correct |
54 |
Correct |
221 ms |
33372 KB |
Output is correct |
55 |
Correct |
17 ms |
33112 KB |
Output is correct |
56 |
Correct |
45 ms |
33412 KB |
Output is correct |
57 |
Correct |
12 ms |
33116 KB |
Output is correct |
58 |
Correct |
45 ms |
36136 KB |
Output is correct |
59 |
Correct |
45 ms |
36000 KB |
Output is correct |
60 |
Correct |
36 ms |
35408 KB |
Output is correct |
61 |
Correct |
60 ms |
36144 KB |
Output is correct |
62 |
Correct |
40 ms |
35408 KB |
Output is correct |
63 |
Correct |
51 ms |
36176 KB |
Output is correct |
64 |
Correct |
12 ms |
33112 KB |
Output is correct |
65 |
Correct |
13 ms |
33112 KB |
Output is correct |
66 |
Correct |
14 ms |
33116 KB |
Output is correct |
67 |
Correct |
15 ms |
33116 KB |
Output is correct |
68 |
Correct |
14 ms |
33112 KB |
Output is correct |
69 |
Correct |
14 ms |
33112 KB |
Output is correct |
70 |
Correct |
13 ms |
33112 KB |
Output is correct |
71 |
Correct |
13 ms |
33112 KB |
Output is correct |
72 |
Correct |
13 ms |
33116 KB |
Output is correct |
73 |
Correct |
14 ms |
33112 KB |
Output is correct |
74 |
Correct |
14 ms |
33072 KB |
Output is correct |
75 |
Correct |
12 ms |
33116 KB |
Output is correct |
76 |
Correct |
148 ms |
40864 KB |
Output is correct |
77 |
Correct |
142 ms |
40436 KB |
Output is correct |
78 |
Correct |
144 ms |
40272 KB |
Output is correct |
79 |
Correct |
133 ms |
41040 KB |
Output is correct |
80 |
Correct |
144 ms |
40788 KB |
Output is correct |
81 |
Correct |
147 ms |
40852 KB |
Output is correct |
82 |
Correct |
154 ms |
40784 KB |
Output is correct |
83 |
Correct |
13 ms |
33116 KB |
Output is correct |
84 |
Correct |
13 ms |
33116 KB |
Output is correct |
85 |
Correct |
13 ms |
33116 KB |
Output is correct |
86 |
Correct |
14 ms |
33116 KB |
Output is correct |
87 |
Correct |
13 ms |
33116 KB |
Output is correct |
88 |
Correct |
17 ms |
33124 KB |
Output is correct |
89 |
Correct |
13 ms |
33276 KB |
Output is correct |
90 |
Correct |
13 ms |
33116 KB |
Output is correct |
91 |
Correct |
12 ms |
33256 KB |
Output is correct |
92 |
Correct |
14 ms |
33116 KB |
Output is correct |
93 |
Correct |
14 ms |
33116 KB |
Output is correct |
94 |
Correct |
14 ms |
33116 KB |
Output is correct |
95 |
Correct |
13 ms |
33100 KB |
Output is correct |
96 |
Correct |
13 ms |
33184 KB |
Output is correct |
97 |
Correct |
13 ms |
33244 KB |
Output is correct |
98 |
Correct |
14 ms |
33176 KB |
Output is correct |
99 |
Correct |
12 ms |
33116 KB |
Output is correct |
100 |
Correct |
14 ms |
33116 KB |
Output is correct |
101 |
Correct |
14 ms |
33076 KB |
Output is correct |
102 |
Correct |
16 ms |
33148 KB |
Output is correct |
103 |
Correct |
214 ms |
43088 KB |
Output is correct |
104 |
Correct |
189 ms |
42576 KB |
Output is correct |
105 |
Correct |
190 ms |
42520 KB |
Output is correct |
106 |
Correct |
174 ms |
43344 KB |
Output is correct |
107 |
Correct |
174 ms |
43092 KB |
Output is correct |
108 |
Correct |
193 ms |
43048 KB |
Output is correct |
109 |
Correct |
221 ms |
43344 KB |
Output is correct |
110 |
Correct |
15 ms |
33116 KB |
Output is correct |
111 |
Correct |
18 ms |
33116 KB |
Output is correct |
112 |
Correct |
17 ms |
33116 KB |
Output is correct |
113 |
Correct |
17 ms |
33320 KB |
Output is correct |
114 |
Correct |
16 ms |
33316 KB |
Output is correct |
115 |
Correct |
263 ms |
44624 KB |
Output is correct |
116 |
Correct |
149 ms |
37708 KB |
Output is correct |
117 |
Correct |
134 ms |
38224 KB |
Output is correct |
118 |
Correct |
148 ms |
38228 KB |
Output is correct |
119 |
Correct |
242 ms |
44456 KB |
Output is correct |
120 |
Correct |
263 ms |
44884 KB |
Output is correct |
121 |
Correct |
286 ms |
44820 KB |
Output is correct |
122 |
Correct |
220 ms |
45392 KB |
Output is correct |
123 |
Correct |
215 ms |
44952 KB |
Output is correct |
124 |
Correct |
252 ms |
44840 KB |
Output is correct |
125 |
Correct |
270 ms |
45140 KB |
Output is correct |
126 |
Correct |
38 ms |
33116 KB |
Output is correct |
127 |
Correct |
36 ms |
33112 KB |
Output is correct |
128 |
Correct |
39 ms |
33116 KB |
Output is correct |
129 |
Correct |
37 ms |
33116 KB |
Output is correct |
130 |
Correct |
39 ms |
33116 KB |
Output is correct |
131 |
Correct |
49 ms |
33380 KB |
Output is correct |
132 |
Correct |
439 ms |
46932 KB |
Output is correct |
133 |
Correct |
488 ms |
46932 KB |
Output is correct |
134 |
Correct |
481 ms |
46980 KB |
Output is correct |
135 |
Correct |
459 ms |
46976 KB |
Output is correct |
136 |
Correct |
492 ms |
46892 KB |
Output is correct |
137 |
Correct |
361 ms |
46164 KB |
Output is correct |
138 |
Correct |
357 ms |
46356 KB |
Output is correct |
139 |
Correct |
412 ms |
46932 KB |
Output is correct |
140 |
Correct |
393 ms |
46672 KB |
Output is correct |
141 |
Correct |
503 ms |
46688 KB |
Output is correct |
142 |
Correct |
543 ms |
46976 KB |
Output is correct |