답안 #885746

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
885746 2023-12-10T15:24:11 Z huutuan Council (JOI23_council) C++14
100 / 100
928 ms 78876 KB
#include<bits/stdc++.h>

using namespace std;

#define int long long
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define isz(x) ((int)(x).size())
#define sumof(x) accumulate(all(x), 0ll)

const int N=3e5+1, M=20;
int n, m, a[N][M], cnt[M], msk[N];
pair<int, int> f[1<<M];

int get_val(int idx, int val){
   return val==-1?-1:__builtin_popcount(idx&(~msk[val]));
}

void optimize(int idx, int val){
   int t1=get_val(idx, val);
   int t2=get_val(idx, f[idx].first);
   int t3=get_val(idx, f[idx].second);
   if (t1>t2){
      f[idx].second=f[idx].first;
      f[idx].first=val;
   }else if (t1>t3 && val!=f[idx].first){
      f[idx].second=val;
   }
}

void optimize(int idx, pair<int, int> val){
   optimize(idx, val.first);
   optimize(idx, val.second);
}

void solve(){
   cin >> n >> m;
   for (int j=0; j<(1<<m); ++j) f[j]={-1, -1};
   for (int i=1; i<=n; ++i) for (int j=0; j<m; ++j) cin >> a[i][j], msk[i]^=a[i][j]<<j, cnt[j]+=a[i][j];
   for (int i=1; i<=n; ++i) optimize((~msk[i])&((1<<m)-1), i);
   for (int i=(1<<m)-1; i>=0; --i) for (int j=0; j<m; ++j) if (i>>j&1) optimize(i^(1<<j), f[i]);
   for (int i=0; i<(1<<m); ++i) for (int j=0; j<m; ++j) if (i>>j&1) optimize(i, f[i^(1<<j)]);
   int val=n/2;
   for (int i=1; i<=n; ++i){
      int ans=0;
      int mask=0;
      for (int j=0; j<m; ++j){
         cnt[j]-=a[i][j];
         if (cnt[j]>val) ++ans;
         if (cnt[j]==val) mask^=1<<j;
      }
      int t=f[mask].first;
      if (t==i) t=f[mask].second;
      if (t!=-1) ans+=get_val(mask, t);
      cout << ans << '\n';
      for (int j=0; j<m; ++j) cnt[j]+=a[i][j];
   }
}

int32_t main(){
   ios_base::sync_with_stdio(false);
   cin.tie(nullptr);
   int ntests=1;
   // cin >> ntests;
   for (int i=1; i<=ntests; ++i) solve();
   return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4444 KB Output is correct
2 Correct 2 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 462 ms 19088 KB Output is correct
6 Correct 445 ms 19536 KB Output is correct
7 Correct 416 ms 19088 KB Output is correct
8 Correct 422 ms 19036 KB Output is correct
9 Correct 494 ms 19100 KB Output is correct
10 Correct 409 ms 19232 KB Output is correct
11 Correct 426 ms 19092 KB Output is correct
12 Correct 488 ms 19116 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 4560 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 2 ms 4564 KB Output is correct
22 Correct 1 ms 4444 KB Output is correct
23 Correct 1 ms 4440 KB Output is correct
24 Correct 1 ms 4444 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 4556 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 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 4564 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 1 ms 4696 KB Output is correct
38 Correct 1 ms 4440 KB Output is correct
39 Correct 1 ms 4444 KB Output is correct
40 Correct 1 ms 4444 KB Output is correct
41 Correct 6 ms 6748 KB Output is correct
42 Correct 6 ms 6792 KB Output is correct
43 Correct 6 ms 6800 KB Output is correct
44 Correct 6 ms 6748 KB Output is correct
45 Correct 6 ms 6804 KB Output is correct
46 Correct 50 ms 6804 KB Output is correct
47 Correct 47 ms 6776 KB Output is correct
48 Correct 52 ms 6776 KB Output is correct
49 Correct 47 ms 6780 KB Output is correct
50 Correct 49 ms 6788 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4444 KB Output is correct
2 Correct 2 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 462 ms 19088 KB Output is correct
6 Correct 445 ms 19536 KB Output is correct
7 Correct 416 ms 19088 KB Output is correct
8 Correct 422 ms 19036 KB Output is correct
9 Correct 494 ms 19100 KB Output is correct
10 Correct 409 ms 19232 KB Output is correct
11 Correct 426 ms 19092 KB Output is correct
12 Correct 488 ms 19116 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 4560 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 2 ms 4564 KB Output is correct
22 Correct 1 ms 4444 KB Output is correct
23 Correct 1 ms 4440 KB Output is correct
24 Correct 1 ms 4444 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 4556 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 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 4564 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 1 ms 4696 KB Output is correct
38 Correct 1 ms 4440 KB Output is correct
39 Correct 1 ms 4444 KB Output is correct
40 Correct 1 ms 4444 KB Output is correct
41 Correct 6 ms 6748 KB Output is correct
42 Correct 6 ms 6792 KB Output is correct
43 Correct 6 ms 6800 KB Output is correct
44 Correct 6 ms 6748 KB Output is correct
45 Correct 6 ms 6804 KB Output is correct
46 Correct 50 ms 6804 KB Output is correct
47 Correct 47 ms 6776 KB Output is correct
48 Correct 52 ms 6776 KB Output is correct
49 Correct 47 ms 6780 KB Output is correct
50 Correct 49 ms 6788 KB Output is correct
51 Correct 409 ms 19032 KB Output is correct
52 Correct 506 ms 19208 KB Output is correct
53 Correct 526 ms 19228 KB Output is correct
54 Correct 538 ms 19036 KB Output is correct
55 Correct 1 ms 4440 KB Output is correct
56 Correct 62 ms 6888 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4444 KB Output is correct
2 Correct 55 ms 53332 KB Output is correct
3 Correct 54 ms 53332 KB Output is correct
4 Correct 36 ms 52816 KB Output is correct
5 Correct 56 ms 53332 KB Output is correct
6 Correct 41 ms 52672 KB Output is correct
7 Correct 55 ms 53328 KB Output is correct
8 Correct 1 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 1 ms 4440 KB Output is correct
11 Correct 1 ms 4440 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 4444 KB Output is correct
16 Correct 1 ms 4444 KB Output is correct
17 Correct 1 ms 4444 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4444 KB Output is correct
2 Correct 55 ms 53332 KB Output is correct
3 Correct 54 ms 53332 KB Output is correct
4 Correct 36 ms 52816 KB Output is correct
5 Correct 56 ms 53332 KB Output is correct
6 Correct 41 ms 52672 KB Output is correct
7 Correct 55 ms 53328 KB Output is correct
8 Correct 1 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 1 ms 4440 KB Output is correct
11 Correct 1 ms 4440 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 4444 KB Output is correct
16 Correct 1 ms 4444 KB Output is correct
17 Correct 1 ms 4444 KB Output is correct
18 Correct 1 ms 4640 KB Output is correct
19 Correct 1 ms 4444 KB Output is correct
20 Correct 180 ms 58208 KB Output is correct
21 Correct 146 ms 57424 KB Output is correct
22 Correct 146 ms 57428 KB Output is correct
23 Correct 149 ms 58668 KB Output is correct
24 Correct 133 ms 57940 KB Output is correct
25 Correct 152 ms 57932 KB Output is correct
26 Correct 166 ms 57996 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 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 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 4560 KB Output is correct
35 Correct 2 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 1 ms 4808 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 4444 KB Output is correct
41 Correct 1 ms 4444 KB Output is correct
42 Correct 1 ms 4444 KB Output is correct
43 Correct 1 ms 4444 KB Output is correct
44 Correct 1 ms 4444 KB Output is correct
45 Correct 1 ms 4444 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4444 KB Output is correct
2 Correct 55 ms 53332 KB Output is correct
3 Correct 54 ms 53332 KB Output is correct
4 Correct 36 ms 52816 KB Output is correct
5 Correct 56 ms 53332 KB Output is correct
6 Correct 41 ms 52672 KB Output is correct
7 Correct 55 ms 53328 KB Output is correct
8 Correct 1 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 1 ms 4440 KB Output is correct
11 Correct 1 ms 4440 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 4444 KB Output is correct
16 Correct 1 ms 4444 KB Output is correct
17 Correct 1 ms 4444 KB Output is correct
18 Correct 1 ms 4640 KB Output is correct
19 Correct 1 ms 4444 KB Output is correct
20 Correct 180 ms 58208 KB Output is correct
21 Correct 146 ms 57424 KB Output is correct
22 Correct 146 ms 57428 KB Output is correct
23 Correct 149 ms 58668 KB Output is correct
24 Correct 133 ms 57940 KB Output is correct
25 Correct 152 ms 57932 KB Output is correct
26 Correct 166 ms 57996 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 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 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 4560 KB Output is correct
35 Correct 2 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 1 ms 4808 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 4444 KB Output is correct
41 Correct 1 ms 4444 KB Output is correct
42 Correct 1 ms 4444 KB Output is correct
43 Correct 1 ms 4444 KB Output is correct
44 Correct 1 ms 4444 KB Output is correct
45 Correct 1 ms 4444 KB Output is correct
46 Correct 2 ms 4444 KB Output is correct
47 Correct 223 ms 62580 KB Output is correct
48 Correct 214 ms 59984 KB Output is correct
49 Correct 204 ms 59732 KB Output is correct
50 Correct 208 ms 62920 KB Output is correct
51 Correct 180 ms 62476 KB Output is correct
52 Correct 209 ms 62464 KB Output is correct
53 Correct 227 ms 62804 KB Output is correct
54 Correct 6 ms 6748 KB Output is correct
55 Correct 6 ms 6748 KB Output is correct
56 Correct 6 ms 6748 KB Output is correct
57 Correct 6 ms 6748 KB Output is correct
58 Correct 8 ms 6800 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4444 KB Output is correct
2 Correct 55 ms 53332 KB Output is correct
3 Correct 54 ms 53332 KB Output is correct
4 Correct 36 ms 52816 KB Output is correct
5 Correct 56 ms 53332 KB Output is correct
6 Correct 41 ms 52672 KB Output is correct
7 Correct 55 ms 53328 KB Output is correct
8 Correct 1 ms 4444 KB Output is correct
9 Correct 1 ms 4444 KB Output is correct
10 Correct 1 ms 4440 KB Output is correct
11 Correct 1 ms 4440 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 4444 KB Output is correct
16 Correct 1 ms 4444 KB Output is correct
17 Correct 1 ms 4444 KB Output is correct
18 Correct 1 ms 4640 KB Output is correct
19 Correct 1 ms 4444 KB Output is correct
20 Correct 180 ms 58208 KB Output is correct
21 Correct 146 ms 57424 KB Output is correct
22 Correct 146 ms 57428 KB Output is correct
23 Correct 149 ms 58668 KB Output is correct
24 Correct 133 ms 57940 KB Output is correct
25 Correct 152 ms 57932 KB Output is correct
26 Correct 166 ms 57996 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 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 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 4560 KB Output is correct
35 Correct 2 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 1 ms 4808 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 4444 KB Output is correct
41 Correct 1 ms 4444 KB Output is correct
42 Correct 1 ms 4444 KB Output is correct
43 Correct 1 ms 4444 KB Output is correct
44 Correct 1 ms 4444 KB Output is correct
45 Correct 1 ms 4444 KB Output is correct
46 Correct 2 ms 4444 KB Output is correct
47 Correct 223 ms 62580 KB Output is correct
48 Correct 214 ms 59984 KB Output is correct
49 Correct 204 ms 59732 KB Output is correct
50 Correct 208 ms 62920 KB Output is correct
51 Correct 180 ms 62476 KB Output is correct
52 Correct 209 ms 62464 KB Output is correct
53 Correct 227 ms 62804 KB Output is correct
54 Correct 6 ms 6748 KB Output is correct
55 Correct 6 ms 6748 KB Output is correct
56 Correct 6 ms 6748 KB Output is correct
57 Correct 6 ms 6748 KB Output is correct
58 Correct 8 ms 6800 KB Output is correct
59 Correct 249 ms 64084 KB Output is correct
60 Correct 165 ms 29160 KB Output is correct
61 Correct 175 ms 31572 KB Output is correct
62 Correct 177 ms 31824 KB Output is correct
63 Correct 288 ms 63688 KB Output is correct
64 Correct 317 ms 64384 KB Output is correct
65 Correct 323 ms 64496 KB Output is correct
66 Correct 256 ms 64524 KB Output is correct
67 Correct 262 ms 64340 KB Output is correct
68 Correct 304 ms 64336 KB Output is correct
69 Correct 328 ms 64592 KB Output is correct
70 Correct 50 ms 6748 KB Output is correct
71 Correct 45 ms 6748 KB Output is correct
72 Correct 47 ms 6748 KB Output is correct
73 Correct 55 ms 6748 KB Output is correct
74 Correct 48 ms 6772 KB Output is correct
75 Correct 79 ms 6748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4444 KB Output is correct
2 Correct 2 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 462 ms 19088 KB Output is correct
6 Correct 445 ms 19536 KB Output is correct
7 Correct 416 ms 19088 KB Output is correct
8 Correct 422 ms 19036 KB Output is correct
9 Correct 494 ms 19100 KB Output is correct
10 Correct 409 ms 19232 KB Output is correct
11 Correct 426 ms 19092 KB Output is correct
12 Correct 488 ms 19116 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 4560 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 2 ms 4564 KB Output is correct
22 Correct 1 ms 4444 KB Output is correct
23 Correct 1 ms 4440 KB Output is correct
24 Correct 1 ms 4444 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 4556 KB Output is correct
30 Correct 1 ms 4444 KB Output is correct
31 Correct 1 ms 4444 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 4564 KB Output is correct
35 Correct 1 ms 4444 KB Output is correct
36 Correct 1 ms 4444 KB Output is correct
37 Correct 1 ms 4696 KB Output is correct
38 Correct 1 ms 4440 KB Output is correct
39 Correct 1 ms 4444 KB Output is correct
40 Correct 1 ms 4444 KB Output is correct
41 Correct 6 ms 6748 KB Output is correct
42 Correct 6 ms 6792 KB Output is correct
43 Correct 6 ms 6800 KB Output is correct
44 Correct 6 ms 6748 KB Output is correct
45 Correct 6 ms 6804 KB Output is correct
46 Correct 50 ms 6804 KB Output is correct
47 Correct 47 ms 6776 KB Output is correct
48 Correct 52 ms 6776 KB Output is correct
49 Correct 47 ms 6780 KB Output is correct
50 Correct 49 ms 6788 KB Output is correct
51 Correct 409 ms 19032 KB Output is correct
52 Correct 506 ms 19208 KB Output is correct
53 Correct 526 ms 19228 KB Output is correct
54 Correct 538 ms 19036 KB Output is correct
55 Correct 1 ms 4440 KB Output is correct
56 Correct 62 ms 6888 KB Output is correct
57 Correct 1 ms 4444 KB Output is correct
58 Correct 55 ms 53332 KB Output is correct
59 Correct 54 ms 53332 KB Output is correct
60 Correct 36 ms 52816 KB Output is correct
61 Correct 56 ms 53332 KB Output is correct
62 Correct 41 ms 52672 KB Output is correct
63 Correct 55 ms 53328 KB Output is correct
64 Correct 1 ms 4444 KB Output is correct
65 Correct 1 ms 4444 KB Output is correct
66 Correct 1 ms 4440 KB Output is correct
67 Correct 1 ms 4440 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 4444 KB Output is correct
72 Correct 1 ms 4444 KB Output is correct
73 Correct 1 ms 4444 KB Output is correct
74 Correct 1 ms 4640 KB Output is correct
75 Correct 1 ms 4444 KB Output is correct
76 Correct 180 ms 58208 KB Output is correct
77 Correct 146 ms 57424 KB Output is correct
78 Correct 146 ms 57428 KB Output is correct
79 Correct 149 ms 58668 KB Output is correct
80 Correct 133 ms 57940 KB Output is correct
81 Correct 152 ms 57932 KB Output is correct
82 Correct 166 ms 57996 KB Output is correct
83 Correct 1 ms 4444 KB Output is correct
84 Correct 1 ms 4444 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 4444 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 4560 KB Output is correct
91 Correct 2 ms 4444 KB Output is correct
92 Correct 1 ms 4444 KB Output is correct
93 Correct 1 ms 4808 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 4444 KB Output is correct
97 Correct 1 ms 4444 KB Output is correct
98 Correct 1 ms 4444 KB Output is correct
99 Correct 1 ms 4444 KB Output is correct
100 Correct 1 ms 4444 KB Output is correct
101 Correct 1 ms 4444 KB Output is correct
102 Correct 2 ms 4444 KB Output is correct
103 Correct 223 ms 62580 KB Output is correct
104 Correct 214 ms 59984 KB Output is correct
105 Correct 204 ms 59732 KB Output is correct
106 Correct 208 ms 62920 KB Output is correct
107 Correct 180 ms 62476 KB Output is correct
108 Correct 209 ms 62464 KB Output is correct
109 Correct 227 ms 62804 KB Output is correct
110 Correct 6 ms 6748 KB Output is correct
111 Correct 6 ms 6748 KB Output is correct
112 Correct 6 ms 6748 KB Output is correct
113 Correct 6 ms 6748 KB Output is correct
114 Correct 8 ms 6800 KB Output is correct
115 Correct 249 ms 64084 KB Output is correct
116 Correct 165 ms 29160 KB Output is correct
117 Correct 175 ms 31572 KB Output is correct
118 Correct 177 ms 31824 KB Output is correct
119 Correct 288 ms 63688 KB Output is correct
120 Correct 317 ms 64384 KB Output is correct
121 Correct 323 ms 64496 KB Output is correct
122 Correct 256 ms 64524 KB Output is correct
123 Correct 262 ms 64340 KB Output is correct
124 Correct 304 ms 64336 KB Output is correct
125 Correct 328 ms 64592 KB Output is correct
126 Correct 50 ms 6748 KB Output is correct
127 Correct 45 ms 6748 KB Output is correct
128 Correct 47 ms 6748 KB Output is correct
129 Correct 55 ms 6748 KB Output is correct
130 Correct 48 ms 6772 KB Output is correct
131 Correct 79 ms 6748 KB Output is correct
132 Correct 882 ms 78744 KB Output is correct
133 Correct 888 ms 78408 KB Output is correct
134 Correct 885 ms 78752 KB Output is correct
135 Correct 875 ms 78876 KB Output is correct
136 Correct 879 ms 78676 KB Output is correct
137 Correct 587 ms 71768 KB Output is correct
138 Correct 545 ms 71992 KB Output is correct
139 Correct 664 ms 78680 KB Output is correct
140 Correct 744 ms 78416 KB Output is correct
141 Correct 902 ms 78352 KB Output is correct
142 Correct 928 ms 78748 KB Output is correct