답안 #751951

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
751951 2023-06-01T23:34:24 Z grogu Council (JOI23_council) C++14
100 / 100
1310 ms 110908 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 j=0;j<m;j++) {
        for(int i = 1;i<(1<<m);i++) {
          if(dp[i][1].first == 0) continue;
          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';
      }
    }

Compilation message

council.cpp: In function 'int32_t main()':
council.cpp:22:11: warning: variable 'ans' set but not used [-Wunused-but-set-variable]
   22 |       int ans[(1<<m)];
      |           ^~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 3 ms 468 KB Output is correct
3 Correct 1 ms 244 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 634 ms 49552 KB Output is correct
6 Correct 781 ms 49596 KB Output is correct
7 Correct 809 ms 49548 KB Output is correct
8 Correct 815 ms 49608 KB Output is correct
9 Correct 856 ms 49600 KB Output is correct
10 Correct 822 ms 49564 KB Output is correct
11 Correct 836 ms 49548 KB Output is correct
12 Correct 852 ms 49620 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 320 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 1 ms 324 KB Output is correct
17 Correct 1 ms 324 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 320 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 1 ms 212 KB Output is correct
29 Correct 1 ms 288 KB Output is correct
30 Correct 1 ms 316 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 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 324 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 980 KB Output is correct
43 Correct 10 ms 980 KB Output is correct
44 Correct 10 ms 980 KB Output is correct
45 Correct 10 ms 1088 KB Output is correct
46 Correct 67 ms 6464 KB Output is correct
47 Correct 99 ms 6356 KB Output is correct
48 Correct 94 ms 6356 KB Output is correct
49 Correct 96 ms 6460 KB Output is correct
50 Correct 92 ms 6448 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 3 ms 468 KB Output is correct
3 Correct 1 ms 244 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 634 ms 49552 KB Output is correct
6 Correct 781 ms 49596 KB Output is correct
7 Correct 809 ms 49548 KB Output is correct
8 Correct 815 ms 49608 KB Output is correct
9 Correct 856 ms 49600 KB Output is correct
10 Correct 822 ms 49564 KB Output is correct
11 Correct 836 ms 49548 KB Output is correct
12 Correct 852 ms 49620 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 320 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 1 ms 324 KB Output is correct
17 Correct 1 ms 324 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 320 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 1 ms 212 KB Output is correct
29 Correct 1 ms 288 KB Output is correct
30 Correct 1 ms 316 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 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 324 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 980 KB Output is correct
43 Correct 10 ms 980 KB Output is correct
44 Correct 10 ms 980 KB Output is correct
45 Correct 10 ms 1088 KB Output is correct
46 Correct 67 ms 6464 KB Output is correct
47 Correct 99 ms 6356 KB Output is correct
48 Correct 94 ms 6356 KB Output is correct
49 Correct 96 ms 6460 KB Output is correct
50 Correct 92 ms 6448 KB Output is correct
51 Correct 771 ms 50152 KB Output is correct
52 Correct 422 ms 50132 KB Output is correct
53 Correct 636 ms 50148 KB Output is correct
54 Correct 716 ms 50144 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 80 ms 6964 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 57 ms 7880 KB Output is correct
3 Correct 61 ms 7884 KB Output is correct
4 Correct 38 ms 6052 KB Output is correct
5 Correct 58 ms 8912 KB Output is correct
6 Correct 40 ms 6024 KB Output is correct
7 Correct 65 ms 8888 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 324 KB Output is correct
14 Correct 1 ms 256 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 320 KB Output is correct
17 Correct 1 ms 324 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 57 ms 7880 KB Output is correct
3 Correct 61 ms 7884 KB Output is correct
4 Correct 38 ms 6052 KB Output is correct
5 Correct 58 ms 8912 KB Output is correct
6 Correct 40 ms 6024 KB Output is correct
7 Correct 65 ms 8888 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 324 KB Output is correct
14 Correct 1 ms 256 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 320 KB Output is correct
17 Correct 1 ms 324 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 200 ms 31720 KB Output is correct
21 Correct 179 ms 28532 KB Output is correct
22 Correct 208 ms 28948 KB Output is correct
23 Correct 182 ms 31956 KB Output is correct
24 Correct 178 ms 31560 KB Output is correct
25 Correct 194 ms 31776 KB Output is correct
26 Correct 223 ms 31820 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 1 ms 212 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 1 ms 324 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 320 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 ms 212 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 57 ms 7880 KB Output is correct
3 Correct 61 ms 7884 KB Output is correct
4 Correct 38 ms 6052 KB Output is correct
5 Correct 58 ms 8912 KB Output is correct
6 Correct 40 ms 6024 KB Output is correct
7 Correct 65 ms 8888 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 324 KB Output is correct
14 Correct 1 ms 256 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 320 KB Output is correct
17 Correct 1 ms 324 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 200 ms 31720 KB Output is correct
21 Correct 179 ms 28532 KB Output is correct
22 Correct 208 ms 28948 KB Output is correct
23 Correct 182 ms 31956 KB Output is correct
24 Correct 178 ms 31560 KB Output is correct
25 Correct 194 ms 31776 KB Output is correct
26 Correct 223 ms 31820 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 1 ms 212 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 1 ms 324 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 320 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 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 2 ms 456 KB Output is correct
47 Correct 300 ms 43912 KB Output is correct
48 Correct 269 ms 40528 KB Output is correct
49 Correct 253 ms 41032 KB Output is correct
50 Correct 305 ms 43852 KB Output is correct
51 Correct 222 ms 43712 KB Output is correct
52 Correct 275 ms 43724 KB Output is correct
53 Correct 277 ms 44452 KB Output is correct
54 Correct 8 ms 1088 KB Output is correct
55 Correct 10 ms 1084 KB Output is correct
56 Correct 11 ms 980 KB Output is correct
57 Correct 9 ms 980 KB Output is correct
58 Correct 10 ms 1088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 57 ms 7880 KB Output is correct
3 Correct 61 ms 7884 KB Output is correct
4 Correct 38 ms 6052 KB Output is correct
5 Correct 58 ms 8912 KB Output is correct
6 Correct 40 ms 6024 KB Output is correct
7 Correct 65 ms 8888 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 324 KB Output is correct
14 Correct 1 ms 256 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 320 KB Output is correct
17 Correct 1 ms 324 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 200 ms 31720 KB Output is correct
21 Correct 179 ms 28532 KB Output is correct
22 Correct 208 ms 28948 KB Output is correct
23 Correct 182 ms 31956 KB Output is correct
24 Correct 178 ms 31560 KB Output is correct
25 Correct 194 ms 31776 KB Output is correct
26 Correct 223 ms 31820 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 1 ms 212 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 1 ms 324 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 320 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 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 2 ms 456 KB Output is correct
47 Correct 300 ms 43912 KB Output is correct
48 Correct 269 ms 40528 KB Output is correct
49 Correct 253 ms 41032 KB Output is correct
50 Correct 305 ms 43852 KB Output is correct
51 Correct 222 ms 43712 KB Output is correct
52 Correct 275 ms 43724 KB Output is correct
53 Correct 277 ms 44452 KB Output is correct
54 Correct 8 ms 1088 KB Output is correct
55 Correct 10 ms 1084 KB Output is correct
56 Correct 11 ms 980 KB Output is correct
57 Correct 9 ms 980 KB Output is correct
58 Correct 10 ms 1088 KB Output is correct
59 Correct 333 ms 52388 KB Output is correct
60 Correct 208 ms 26124 KB Output is correct
61 Correct 212 ms 27496 KB Output is correct
62 Correct 202 ms 28240 KB Output is correct
63 Correct 350 ms 52144 KB Output is correct
64 Correct 434 ms 57968 KB Output is correct
65 Correct 419 ms 57996 KB Output is correct
66 Correct 357 ms 58420 KB Output is correct
67 Correct 298 ms 57872 KB Output is correct
68 Correct 395 ms 57836 KB Output is correct
69 Correct 415 ms 58524 KB Output is correct
70 Correct 66 ms 6356 KB Output is correct
71 Correct 85 ms 6464 KB Output is correct
72 Correct 89 ms 6460 KB Output is correct
73 Correct 83 ms 6444 KB Output is correct
74 Correct 89 ms 6356 KB Output is correct
75 Correct 75 ms 6996 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 3 ms 468 KB Output is correct
3 Correct 1 ms 244 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 634 ms 49552 KB Output is correct
6 Correct 781 ms 49596 KB Output is correct
7 Correct 809 ms 49548 KB Output is correct
8 Correct 815 ms 49608 KB Output is correct
9 Correct 856 ms 49600 KB Output is correct
10 Correct 822 ms 49564 KB Output is correct
11 Correct 836 ms 49548 KB Output is correct
12 Correct 852 ms 49620 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 320 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 1 ms 324 KB Output is correct
17 Correct 1 ms 324 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 320 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 1 ms 212 KB Output is correct
29 Correct 1 ms 288 KB Output is correct
30 Correct 1 ms 316 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 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 324 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 980 KB Output is correct
43 Correct 10 ms 980 KB Output is correct
44 Correct 10 ms 980 KB Output is correct
45 Correct 10 ms 1088 KB Output is correct
46 Correct 67 ms 6464 KB Output is correct
47 Correct 99 ms 6356 KB Output is correct
48 Correct 94 ms 6356 KB Output is correct
49 Correct 96 ms 6460 KB Output is correct
50 Correct 92 ms 6448 KB Output is correct
51 Correct 771 ms 50152 KB Output is correct
52 Correct 422 ms 50132 KB Output is correct
53 Correct 636 ms 50148 KB Output is correct
54 Correct 716 ms 50144 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 80 ms 6964 KB Output is correct
57 Correct 1 ms 212 KB Output is correct
58 Correct 57 ms 7880 KB Output is correct
59 Correct 61 ms 7884 KB Output is correct
60 Correct 38 ms 6052 KB Output is correct
61 Correct 58 ms 8912 KB Output is correct
62 Correct 40 ms 6024 KB Output is correct
63 Correct 65 ms 8888 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 1 ms 212 KB Output is correct
68 Correct 1 ms 212 KB Output is correct
69 Correct 1 ms 324 KB Output is correct
70 Correct 1 ms 256 KB Output is correct
71 Correct 0 ms 212 KB Output is correct
72 Correct 0 ms 320 KB Output is correct
73 Correct 1 ms 324 KB Output is correct
74 Correct 1 ms 212 KB Output is correct
75 Correct 1 ms 212 KB Output is correct
76 Correct 200 ms 31720 KB Output is correct
77 Correct 179 ms 28532 KB Output is correct
78 Correct 208 ms 28948 KB Output is correct
79 Correct 182 ms 31956 KB Output is correct
80 Correct 178 ms 31560 KB Output is correct
81 Correct 194 ms 31776 KB Output is correct
82 Correct 223 ms 31820 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 1 ms 212 KB Output is correct
87 Correct 1 ms 212 KB Output is correct
88 Correct 1 ms 212 KB Output is correct
89 Correct 1 ms 212 KB Output is correct
90 Correct 1 ms 340 KB Output is correct
91 Correct 1 ms 340 KB Output is correct
92 Correct 1 ms 324 KB Output is correct
93 Correct 1 ms 212 KB Output is correct
94 Correct 0 ms 212 KB Output is correct
95 Correct 1 ms 212 KB Output is correct
96 Correct 1 ms 320 KB Output is correct
97 Correct 1 ms 212 KB Output is correct
98 Correct 1 ms 212 KB Output is correct
99 Correct 2 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 2 ms 456 KB Output is correct
103 Correct 300 ms 43912 KB Output is correct
104 Correct 269 ms 40528 KB Output is correct
105 Correct 253 ms 41032 KB Output is correct
106 Correct 305 ms 43852 KB Output is correct
107 Correct 222 ms 43712 KB Output is correct
108 Correct 275 ms 43724 KB Output is correct
109 Correct 277 ms 44452 KB Output is correct
110 Correct 8 ms 1088 KB Output is correct
111 Correct 10 ms 1084 KB Output is correct
112 Correct 11 ms 980 KB Output is correct
113 Correct 9 ms 980 KB Output is correct
114 Correct 10 ms 1088 KB Output is correct
115 Correct 333 ms 52388 KB Output is correct
116 Correct 208 ms 26124 KB Output is correct
117 Correct 212 ms 27496 KB Output is correct
118 Correct 202 ms 28240 KB Output is correct
119 Correct 350 ms 52144 KB Output is correct
120 Correct 434 ms 57968 KB Output is correct
121 Correct 419 ms 57996 KB Output is correct
122 Correct 357 ms 58420 KB Output is correct
123 Correct 298 ms 57872 KB Output is correct
124 Correct 395 ms 57836 KB Output is correct
125 Correct 415 ms 58524 KB Output is correct
126 Correct 66 ms 6356 KB Output is correct
127 Correct 85 ms 6464 KB Output is correct
128 Correct 89 ms 6460 KB Output is correct
129 Correct 83 ms 6444 KB Output is correct
130 Correct 89 ms 6356 KB Output is correct
131 Correct 75 ms 6996 KB Output is correct
132 Correct 943 ms 109908 KB Output is correct
133 Correct 933 ms 109752 KB Output is correct
134 Correct 982 ms 110484 KB Output is correct
135 Correct 1310 ms 110216 KB Output is correct
136 Correct 1185 ms 109964 KB Output is correct
137 Correct 768 ms 82812 KB Output is correct
138 Correct 771 ms 83476 KB Output is correct
139 Correct 1058 ms 110620 KB Output is correct
140 Correct 752 ms 109760 KB Output is correct
141 Correct 956 ms 109668 KB Output is correct
142 Correct 977 ms 110908 KB Output is correct