답안 #732294

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
732294 2023-04-29T00:45:11 Z Magikarp4000 벽 칠하기 (APIO20_paint) C++17
63 / 100
1500 ms 28536 KB
#include "paint.h"
#include <bits/stdc++.h>
using namespace std;
#define OPTM ios_base::sync_with_stdio(0); cin.tie(0);
#define INF int(1e9+7)
#define ln '\n' 
#define ll long long
#define ull unsigned long long
#define ui unsigned int
#define us unsigned short
#define FOR(i,s,n) for (int i = s; i < n; i++)
#define FORR(i,n,s) for (int i = n; i > s; i--)
#define FORX(u, arr) for (auto u : arr)
#define PB push_back
#define in(v,x) (v.find(x) != v.end())
#define F first
#define S second
#define PII pair<int, int>
#define PLL pair<ll, ll>
#define UM unordered_map
#define US unordered_set
#define PQ priority_queue
#define ALL(v) v.begin(), v.end()
const ll LLINF = 1e18+1;

const int MAXN = 1e5+1;
int w[MAXN], dp[MAXN];
US<int> col[MAXN];
bool z[MAXN];

int minimumInstructions(
    int n, int m, int K, std::vector<int> c,
    std::vector<int> a, std::vector<std::vector<int>> b) {
  FOR(i,0,m) {
    FOR(j,0,a[i]) col[b[i][j]].insert(i);
  }
  FOR(i,0,m) {
    // cout << i << ": ";
    FORX(u,col[c[i]]) {
      // cout << ((m+u-i)%m) << ' ';
      w[(m+u-i)%m]++;
    }
    // cout << ln;
  }
  vector<int> v;
  FOR(i,0,n) dp[i] = INF;
  dp[0] = 0;
  int cnt = 0;
  FOR(i,0,m) if (w[i] == m) cnt++;
  if (cnt > 0) v.PB(0);
  // cout << ln;
  // cout << 0 << ": ";
  // FOR(j,0,m) cout << w[j] << ' ';
  // cout << ln;
  FOR(i,0,n-m) {
    // cout << i+m << ln;
    FORX(u,col[c[i+m]]) {
      int k = (u-((i)%m)+m)%m;
      int diff = 1-col[c[i]].count(u);
      if (w[k] == m-1 && diff == 1) {
        //cout << "+++++ i: " << i << " u: " << u << ln;
        cnt++;
      }
      w[k] += diff;
    }
    FORX(u,col[c[i]]) {
      int k = (u-((i)%m)+m)%m;
      int diff = col[c[i+m]].count(u)-1;
      if (w[k] == m && diff == -1) {
        //cout << "----- i: " << i << " u: " << u << ln;
        cnt--;
      }
      w[k] += diff;
    }
    if (cnt > 0) v.PB(i+1);
    // cout << i+1 << ": ";
    // FOR(j,0,m) cout << w[j] << ' ';
    // cout << "cnt: " << cnt;
    // cout << ln;
  }
  int vn = v.size();
  if (vn == 0 || v[0] > 0) return -1;
  // cout << ln;
  // FOR(i,0,vn) cout << v[i] << ' ';
  // cout << ln;
  int i = 0, res = 1;
  while (i < vn) {
    int sta = v[i];
    if (i == vn-1) break;
    if (v[i+1] > sta+m) break;
    while (i < vn-1 && v[i+1] <= sta+m) i++;
    res++;
  }
  if (v[i]+m >= n) return res;
  return -1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 5716 KB Output is correct
2 Correct 3 ms 5716 KB Output is correct
3 Correct 3 ms 5716 KB Output is correct
4 Correct 3 ms 5716 KB Output is correct
5 Correct 3 ms 5716 KB Output is correct
6 Correct 3 ms 5716 KB Output is correct
7 Correct 3 ms 5716 KB Output is correct
8 Correct 4 ms 5716 KB Output is correct
9 Correct 3 ms 5716 KB Output is correct
10 Correct 4 ms 5796 KB Output is correct
11 Correct 3 ms 5716 KB Output is correct
12 Correct 3 ms 5796 KB Output is correct
13 Correct 4 ms 5844 KB Output is correct
14 Correct 5 ms 5844 KB Output is correct
15 Correct 5 ms 5792 KB Output is correct
16 Correct 4 ms 5844 KB Output is correct
17 Correct 4 ms 5836 KB Output is correct
18 Correct 4 ms 5844 KB Output is correct
19 Correct 4 ms 5924 KB Output is correct
20 Correct 4 ms 5972 KB Output is correct
21 Correct 4 ms 5972 KB Output is correct
22 Correct 38 ms 21180 KB Output is correct
23 Correct 40 ms 21244 KB Output is correct
24 Correct 45 ms 21168 KB Output is correct
25 Correct 7 ms 6228 KB Output is correct
26 Correct 6 ms 6188 KB Output is correct
27 Correct 6 ms 6056 KB Output is correct
28 Correct 6 ms 6032 KB Output is correct
29 Correct 7 ms 6032 KB Output is correct
30 Correct 7 ms 6056 KB Output is correct
31 Correct 18 ms 9556 KB Output is correct
32 Correct 21 ms 9464 KB Output is correct
33 Correct 17 ms 9484 KB Output is correct
34 Correct 19 ms 9568 KB Output is correct
35 Correct 18 ms 9564 KB Output is correct
36 Correct 19 ms 9512 KB Output is correct
37 Correct 59 ms 21792 KB Output is correct
38 Correct 52 ms 21708 KB Output is correct
39 Correct 48 ms 21716 KB Output is correct
40 Correct 15 ms 7632 KB Output is correct
41 Correct 9 ms 6956 KB Output is correct
42 Correct 16 ms 7536 KB Output is correct
43 Correct 12 ms 6684 KB Output is correct
44 Correct 11 ms 6572 KB Output is correct
45 Correct 16 ms 7204 KB Output is correct
46 Correct 70 ms 26116 KB Output is correct
47 Correct 45 ms 17968 KB Output is correct
48 Correct 45 ms 20464 KB Output is correct
49 Correct 65 ms 24004 KB Output is correct
50 Correct 72 ms 23944 KB Output is correct
51 Correct 63 ms 19796 KB Output is correct
52 Correct 18 ms 7760 KB Output is correct
53 Correct 18 ms 7728 KB Output is correct
54 Correct 15 ms 7508 KB Output is correct
55 Correct 15 ms 7252 KB Output is correct
56 Correct 14 ms 7124 KB Output is correct
57 Correct 16 ms 7124 KB Output is correct
58 Correct 84 ms 28452 KB Output is correct
59 Correct 80 ms 28492 KB Output is correct
60 Correct 84 ms 28492 KB Output is correct
61 Correct 87 ms 28484 KB Output is correct
62 Correct 81 ms 28488 KB Output is correct
63 Correct 81 ms 28536 KB Output is correct
64 Correct 123 ms 27424 KB Output is correct
65 Correct 109 ms 27560 KB Output is correct
66 Correct 91 ms 27664 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 5716 KB Output is correct
2 Correct 3 ms 5716 KB Output is correct
3 Correct 3 ms 5716 KB Output is correct
4 Correct 3 ms 5716 KB Output is correct
5 Correct 3 ms 5716 KB Output is correct
6 Correct 3 ms 5716 KB Output is correct
7 Correct 3 ms 5716 KB Output is correct
8 Correct 4 ms 5716 KB Output is correct
9 Correct 3 ms 5716 KB Output is correct
10 Correct 4 ms 5796 KB Output is correct
11 Correct 3 ms 5716 KB Output is correct
12 Correct 3 ms 5796 KB Output is correct
13 Correct 4 ms 5844 KB Output is correct
14 Correct 5 ms 5844 KB Output is correct
15 Correct 5 ms 5792 KB Output is correct
16 Correct 4 ms 5844 KB Output is correct
17 Correct 4 ms 5836 KB Output is correct
18 Correct 4 ms 5844 KB Output is correct
19 Correct 4 ms 5924 KB Output is correct
20 Correct 4 ms 5972 KB Output is correct
21 Correct 4 ms 5972 KB Output is correct
22 Correct 3 ms 5716 KB Output is correct
23 Correct 4 ms 5716 KB Output is correct
24 Correct 3 ms 5716 KB Output is correct
25 Correct 3 ms 5796 KB Output is correct
26 Correct 4 ms 5716 KB Output is correct
27 Correct 4 ms 5732 KB Output is correct
28 Correct 5 ms 5792 KB Output is correct
29 Correct 4 ms 5716 KB Output is correct
30 Correct 4 ms 5784 KB Output is correct
31 Correct 4 ms 5716 KB Output is correct
32 Correct 5 ms 5792 KB Output is correct
33 Correct 3 ms 5796 KB Output is correct
34 Correct 4 ms 5796 KB Output is correct
35 Correct 3 ms 5844 KB Output is correct
36 Correct 3 ms 5844 KB Output is correct
37 Correct 4 ms 5844 KB Output is correct
38 Correct 5 ms 5936 KB Output is correct
39 Correct 5 ms 5716 KB Output is correct
40 Correct 4 ms 5844 KB Output is correct
41 Correct 3 ms 5844 KB Output is correct
42 Correct 5 ms 5844 KB Output is correct
43 Correct 4 ms 5844 KB Output is correct
44 Correct 4 ms 5716 KB Output is correct
45 Correct 4 ms 5716 KB Output is correct
46 Correct 5 ms 5796 KB Output is correct
47 Correct 4 ms 5820 KB Output is correct
48 Correct 4 ms 5792 KB Output is correct
49 Correct 4 ms 5716 KB Output is correct
50 Correct 4 ms 5880 KB Output is correct
51 Correct 4 ms 5844 KB Output is correct
52 Correct 7 ms 5820 KB Output is correct
53 Correct 5 ms 5844 KB Output is correct
54 Correct 4 ms 5796 KB Output is correct
55 Correct 5 ms 5796 KB Output is correct
56 Correct 5 ms 5972 KB Output is correct
57 Correct 4 ms 5844 KB Output is correct
58 Correct 5 ms 5932 KB Output is correct
59 Correct 4 ms 5844 KB Output is correct
60 Correct 5 ms 5972 KB Output is correct
61 Correct 4 ms 5844 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 5716 KB Output is correct
2 Correct 4 ms 5716 KB Output is correct
3 Correct 3 ms 5716 KB Output is correct
4 Correct 3 ms 5716 KB Output is correct
5 Correct 3 ms 5716 KB Output is correct
6 Correct 3 ms 5716 KB Output is correct
7 Correct 3 ms 5716 KB Output is correct
8 Correct 3 ms 5716 KB Output is correct
9 Correct 3 ms 5716 KB Output is correct
10 Correct 4 ms 5716 KB Output is correct
11 Correct 3 ms 5716 KB Output is correct
12 Correct 4 ms 5796 KB Output is correct
13 Correct 3 ms 5716 KB Output is correct
14 Correct 3 ms 5796 KB Output is correct
15 Correct 4 ms 5844 KB Output is correct
16 Correct 5 ms 5844 KB Output is correct
17 Correct 5 ms 5792 KB Output is correct
18 Correct 4 ms 5844 KB Output is correct
19 Correct 4 ms 5836 KB Output is correct
20 Correct 4 ms 5844 KB Output is correct
21 Correct 4 ms 5924 KB Output is correct
22 Correct 4 ms 5972 KB Output is correct
23 Correct 4 ms 5972 KB Output is correct
24 Correct 38 ms 21180 KB Output is correct
25 Correct 40 ms 21244 KB Output is correct
26 Correct 45 ms 21168 KB Output is correct
27 Correct 3 ms 5716 KB Output is correct
28 Correct 3 ms 5796 KB Output is correct
29 Correct 4 ms 5716 KB Output is correct
30 Correct 4 ms 5732 KB Output is correct
31 Correct 5 ms 5792 KB Output is correct
32 Correct 4 ms 5716 KB Output is correct
33 Correct 4 ms 5784 KB Output is correct
34 Correct 4 ms 5716 KB Output is correct
35 Correct 5 ms 5792 KB Output is correct
36 Correct 3 ms 5796 KB Output is correct
37 Correct 4 ms 5796 KB Output is correct
38 Correct 3 ms 5844 KB Output is correct
39 Correct 3 ms 5844 KB Output is correct
40 Correct 4 ms 5844 KB Output is correct
41 Correct 5 ms 5936 KB Output is correct
42 Correct 5 ms 5716 KB Output is correct
43 Correct 4 ms 5844 KB Output is correct
44 Correct 3 ms 5844 KB Output is correct
45 Correct 5 ms 5844 KB Output is correct
46 Correct 4 ms 5844 KB Output is correct
47 Correct 4 ms 5716 KB Output is correct
48 Correct 4 ms 5716 KB Output is correct
49 Correct 5 ms 5796 KB Output is correct
50 Correct 4 ms 5820 KB Output is correct
51 Correct 4 ms 5792 KB Output is correct
52 Correct 4 ms 5716 KB Output is correct
53 Correct 4 ms 5880 KB Output is correct
54 Correct 4 ms 5844 KB Output is correct
55 Correct 7 ms 5820 KB Output is correct
56 Correct 5 ms 5844 KB Output is correct
57 Correct 4 ms 5796 KB Output is correct
58 Correct 5 ms 5796 KB Output is correct
59 Correct 5 ms 5972 KB Output is correct
60 Correct 4 ms 5844 KB Output is correct
61 Correct 5 ms 5932 KB Output is correct
62 Correct 4 ms 5844 KB Output is correct
63 Correct 5 ms 5972 KB Output is correct
64 Correct 4 ms 5844 KB Output is correct
65 Correct 5 ms 5716 KB Output is correct
66 Correct 4 ms 5756 KB Output is correct
67 Correct 5 ms 5792 KB Output is correct
68 Correct 6 ms 5788 KB Output is correct
69 Correct 5 ms 5844 KB Output is correct
70 Correct 7 ms 6356 KB Output is correct
71 Correct 8 ms 6508 KB Output is correct
72 Correct 7 ms 6356 KB Output is correct
73 Correct 7 ms 6188 KB Output is correct
74 Correct 10 ms 6484 KB Output is correct
75 Correct 7 ms 6192 KB Output is correct
76 Correct 51 ms 16832 KB Output is correct
77 Correct 40 ms 18636 KB Output is correct
78 Correct 67 ms 20360 KB Output is correct
79 Correct 6 ms 5716 KB Output is correct
80 Correct 7 ms 5844 KB Output is correct
81 Correct 6 ms 5844 KB Output is correct
82 Correct 7 ms 5844 KB Output is correct
83 Correct 6 ms 5844 KB Output is correct
84 Correct 9 ms 6612 KB Output is correct
85 Correct 7 ms 6568 KB Output is correct
86 Correct 8 ms 6576 KB Output is correct
87 Correct 7 ms 6484 KB Output is correct
88 Correct 8 ms 6572 KB Output is correct
89 Correct 7 ms 6484 KB Output is correct
90 Correct 64 ms 21468 KB Output is correct
91 Correct 73 ms 21472 KB Output is correct
92 Correct 68 ms 21380 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 5716 KB Output is correct
2 Correct 4 ms 5716 KB Output is correct
3 Correct 3 ms 5716 KB Output is correct
4 Correct 3 ms 5716 KB Output is correct
5 Correct 3 ms 5716 KB Output is correct
6 Correct 3 ms 5716 KB Output is correct
7 Correct 3 ms 5716 KB Output is correct
8 Correct 3 ms 5716 KB Output is correct
9 Correct 3 ms 5716 KB Output is correct
10 Correct 4 ms 5716 KB Output is correct
11 Correct 3 ms 5716 KB Output is correct
12 Correct 4 ms 5796 KB Output is correct
13 Correct 3 ms 5716 KB Output is correct
14 Correct 3 ms 5796 KB Output is correct
15 Correct 4 ms 5844 KB Output is correct
16 Correct 5 ms 5844 KB Output is correct
17 Correct 5 ms 5792 KB Output is correct
18 Correct 4 ms 5844 KB Output is correct
19 Correct 4 ms 5836 KB Output is correct
20 Correct 4 ms 5844 KB Output is correct
21 Correct 4 ms 5924 KB Output is correct
22 Correct 4 ms 5972 KB Output is correct
23 Correct 4 ms 5972 KB Output is correct
24 Correct 38 ms 21180 KB Output is correct
25 Correct 40 ms 21244 KB Output is correct
26 Correct 45 ms 21168 KB Output is correct
27 Correct 7 ms 6228 KB Output is correct
28 Correct 6 ms 6188 KB Output is correct
29 Correct 6 ms 6056 KB Output is correct
30 Correct 6 ms 6032 KB Output is correct
31 Correct 7 ms 6032 KB Output is correct
32 Correct 7 ms 6056 KB Output is correct
33 Correct 18 ms 9556 KB Output is correct
34 Correct 21 ms 9464 KB Output is correct
35 Correct 17 ms 9484 KB Output is correct
36 Correct 19 ms 9568 KB Output is correct
37 Correct 18 ms 9564 KB Output is correct
38 Correct 19 ms 9512 KB Output is correct
39 Correct 59 ms 21792 KB Output is correct
40 Correct 52 ms 21708 KB Output is correct
41 Correct 48 ms 21716 KB Output is correct
42 Correct 3 ms 5716 KB Output is correct
43 Correct 3 ms 5796 KB Output is correct
44 Correct 4 ms 5716 KB Output is correct
45 Correct 4 ms 5732 KB Output is correct
46 Correct 5 ms 5792 KB Output is correct
47 Correct 4 ms 5716 KB Output is correct
48 Correct 4 ms 5784 KB Output is correct
49 Correct 4 ms 5716 KB Output is correct
50 Correct 5 ms 5792 KB Output is correct
51 Correct 3 ms 5796 KB Output is correct
52 Correct 4 ms 5796 KB Output is correct
53 Correct 3 ms 5844 KB Output is correct
54 Correct 3 ms 5844 KB Output is correct
55 Correct 4 ms 5844 KB Output is correct
56 Correct 5 ms 5936 KB Output is correct
57 Correct 5 ms 5716 KB Output is correct
58 Correct 4 ms 5844 KB Output is correct
59 Correct 3 ms 5844 KB Output is correct
60 Correct 5 ms 5844 KB Output is correct
61 Correct 4 ms 5844 KB Output is correct
62 Correct 4 ms 5716 KB Output is correct
63 Correct 4 ms 5716 KB Output is correct
64 Correct 5 ms 5796 KB Output is correct
65 Correct 4 ms 5820 KB Output is correct
66 Correct 4 ms 5792 KB Output is correct
67 Correct 4 ms 5716 KB Output is correct
68 Correct 4 ms 5880 KB Output is correct
69 Correct 4 ms 5844 KB Output is correct
70 Correct 7 ms 5820 KB Output is correct
71 Correct 5 ms 5844 KB Output is correct
72 Correct 4 ms 5796 KB Output is correct
73 Correct 5 ms 5796 KB Output is correct
74 Correct 5 ms 5972 KB Output is correct
75 Correct 4 ms 5844 KB Output is correct
76 Correct 5 ms 5932 KB Output is correct
77 Correct 4 ms 5844 KB Output is correct
78 Correct 5 ms 5972 KB Output is correct
79 Correct 4 ms 5844 KB Output is correct
80 Correct 5 ms 5716 KB Output is correct
81 Correct 4 ms 5756 KB Output is correct
82 Correct 5 ms 5792 KB Output is correct
83 Correct 6 ms 5788 KB Output is correct
84 Correct 5 ms 5844 KB Output is correct
85 Correct 7 ms 6356 KB Output is correct
86 Correct 8 ms 6508 KB Output is correct
87 Correct 7 ms 6356 KB Output is correct
88 Correct 7 ms 6188 KB Output is correct
89 Correct 10 ms 6484 KB Output is correct
90 Correct 7 ms 6192 KB Output is correct
91 Correct 51 ms 16832 KB Output is correct
92 Correct 40 ms 18636 KB Output is correct
93 Correct 67 ms 20360 KB Output is correct
94 Correct 6 ms 5716 KB Output is correct
95 Correct 7 ms 5844 KB Output is correct
96 Correct 6 ms 5844 KB Output is correct
97 Correct 7 ms 5844 KB Output is correct
98 Correct 6 ms 5844 KB Output is correct
99 Correct 9 ms 6612 KB Output is correct
100 Correct 7 ms 6568 KB Output is correct
101 Correct 8 ms 6576 KB Output is correct
102 Correct 7 ms 6484 KB Output is correct
103 Correct 8 ms 6572 KB Output is correct
104 Correct 7 ms 6484 KB Output is correct
105 Correct 64 ms 21468 KB Output is correct
106 Correct 73 ms 21472 KB Output is correct
107 Correct 68 ms 21380 KB Output is correct
108 Correct 6 ms 6188 KB Output is correct
109 Correct 247 ms 6244 KB Output is correct
110 Correct 161 ms 6056 KB Output is correct
111 Correct 148 ms 6068 KB Output is correct
112 Correct 143 ms 6100 KB Output is correct
113 Correct 102 ms 6108 KB Output is correct
114 Correct 20 ms 9784 KB Output is correct
115 Correct 21 ms 9860 KB Output is correct
116 Correct 35 ms 11584 KB Output is correct
117 Correct 28 ms 9744 KB Output is correct
118 Correct 36 ms 10292 KB Output is correct
119 Correct 19 ms 9668 KB Output is correct
120 Correct 41 ms 15424 KB Output is correct
121 Correct 10 ms 7508 KB Output is correct
122 Correct 50 ms 16604 KB Output is correct
123 Correct 10 ms 7344 KB Output is correct
124 Correct 61 ms 18568 KB Output is correct
125 Correct 16 ms 8404 KB Output is correct
126 Correct 12 ms 8664 KB Output is correct
127 Correct 22 ms 9468 KB Output is correct
128 Correct 17 ms 8404 KB Output is correct
129 Correct 15 ms 8564 KB Output is correct
130 Correct 6 ms 6160 KB Output is correct
131 Correct 349 ms 6540 KB Output is correct
132 Correct 318 ms 6188 KB Output is correct
133 Correct 250 ms 6228 KB Output is correct
134 Correct 218 ms 6228 KB Output is correct
135 Correct 209 ms 6264 KB Output is correct
136 Correct 38 ms 12216 KB Output is correct
137 Correct 34 ms 12236 KB Output is correct
138 Correct 33 ms 12244 KB Output is correct
139 Correct 36 ms 12280 KB Output is correct
140 Correct 48 ms 12220 KB Output is correct
141 Correct 47 ms 12184 KB Output is correct
142 Correct 77 ms 21972 KB Output is correct
143 Correct 14 ms 8752 KB Output is correct
144 Correct 72 ms 21920 KB Output is correct
145 Correct 16 ms 8768 KB Output is correct
146 Correct 80 ms 21980 KB Output is correct
147 Correct 15 ms 8752 KB Output is correct
148 Correct 20 ms 9796 KB Output is correct
149 Correct 25 ms 9816 KB Output is correct
150 Correct 18 ms 9760 KB Output is correct
151 Correct 16 ms 9556 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 5716 KB Output is correct
2 Correct 4 ms 5716 KB Output is correct
3 Correct 3 ms 5716 KB Output is correct
4 Correct 3 ms 5716 KB Output is correct
5 Correct 3 ms 5716 KB Output is correct
6 Correct 3 ms 5716 KB Output is correct
7 Correct 3 ms 5716 KB Output is correct
8 Correct 3 ms 5716 KB Output is correct
9 Correct 3 ms 5716 KB Output is correct
10 Correct 4 ms 5716 KB Output is correct
11 Correct 3 ms 5716 KB Output is correct
12 Correct 4 ms 5796 KB Output is correct
13 Correct 3 ms 5716 KB Output is correct
14 Correct 3 ms 5796 KB Output is correct
15 Correct 4 ms 5844 KB Output is correct
16 Correct 5 ms 5844 KB Output is correct
17 Correct 5 ms 5792 KB Output is correct
18 Correct 4 ms 5844 KB Output is correct
19 Correct 4 ms 5836 KB Output is correct
20 Correct 4 ms 5844 KB Output is correct
21 Correct 4 ms 5924 KB Output is correct
22 Correct 4 ms 5972 KB Output is correct
23 Correct 4 ms 5972 KB Output is correct
24 Correct 38 ms 21180 KB Output is correct
25 Correct 40 ms 21244 KB Output is correct
26 Correct 45 ms 21168 KB Output is correct
27 Correct 7 ms 6228 KB Output is correct
28 Correct 6 ms 6188 KB Output is correct
29 Correct 6 ms 6056 KB Output is correct
30 Correct 6 ms 6032 KB Output is correct
31 Correct 7 ms 6032 KB Output is correct
32 Correct 7 ms 6056 KB Output is correct
33 Correct 18 ms 9556 KB Output is correct
34 Correct 21 ms 9464 KB Output is correct
35 Correct 17 ms 9484 KB Output is correct
36 Correct 19 ms 9568 KB Output is correct
37 Correct 18 ms 9564 KB Output is correct
38 Correct 19 ms 9512 KB Output is correct
39 Correct 59 ms 21792 KB Output is correct
40 Correct 52 ms 21708 KB Output is correct
41 Correct 48 ms 21716 KB Output is correct
42 Correct 15 ms 7632 KB Output is correct
43 Correct 9 ms 6956 KB Output is correct
44 Correct 16 ms 7536 KB Output is correct
45 Correct 12 ms 6684 KB Output is correct
46 Correct 11 ms 6572 KB Output is correct
47 Correct 16 ms 7204 KB Output is correct
48 Correct 70 ms 26116 KB Output is correct
49 Correct 45 ms 17968 KB Output is correct
50 Correct 45 ms 20464 KB Output is correct
51 Correct 65 ms 24004 KB Output is correct
52 Correct 72 ms 23944 KB Output is correct
53 Correct 63 ms 19796 KB Output is correct
54 Correct 18 ms 7760 KB Output is correct
55 Correct 18 ms 7728 KB Output is correct
56 Correct 15 ms 7508 KB Output is correct
57 Correct 15 ms 7252 KB Output is correct
58 Correct 14 ms 7124 KB Output is correct
59 Correct 16 ms 7124 KB Output is correct
60 Correct 84 ms 28452 KB Output is correct
61 Correct 80 ms 28492 KB Output is correct
62 Correct 84 ms 28492 KB Output is correct
63 Correct 87 ms 28484 KB Output is correct
64 Correct 81 ms 28488 KB Output is correct
65 Correct 81 ms 28536 KB Output is correct
66 Correct 123 ms 27424 KB Output is correct
67 Correct 109 ms 27560 KB Output is correct
68 Correct 91 ms 27664 KB Output is correct
69 Correct 3 ms 5716 KB Output is correct
70 Correct 3 ms 5796 KB Output is correct
71 Correct 4 ms 5716 KB Output is correct
72 Correct 4 ms 5732 KB Output is correct
73 Correct 5 ms 5792 KB Output is correct
74 Correct 4 ms 5716 KB Output is correct
75 Correct 4 ms 5784 KB Output is correct
76 Correct 4 ms 5716 KB Output is correct
77 Correct 5 ms 5792 KB Output is correct
78 Correct 3 ms 5796 KB Output is correct
79 Correct 4 ms 5796 KB Output is correct
80 Correct 3 ms 5844 KB Output is correct
81 Correct 3 ms 5844 KB Output is correct
82 Correct 4 ms 5844 KB Output is correct
83 Correct 5 ms 5936 KB Output is correct
84 Correct 5 ms 5716 KB Output is correct
85 Correct 4 ms 5844 KB Output is correct
86 Correct 3 ms 5844 KB Output is correct
87 Correct 5 ms 5844 KB Output is correct
88 Correct 4 ms 5844 KB Output is correct
89 Correct 4 ms 5716 KB Output is correct
90 Correct 4 ms 5716 KB Output is correct
91 Correct 5 ms 5796 KB Output is correct
92 Correct 4 ms 5820 KB Output is correct
93 Correct 4 ms 5792 KB Output is correct
94 Correct 4 ms 5716 KB Output is correct
95 Correct 4 ms 5880 KB Output is correct
96 Correct 4 ms 5844 KB Output is correct
97 Correct 7 ms 5820 KB Output is correct
98 Correct 5 ms 5844 KB Output is correct
99 Correct 4 ms 5796 KB Output is correct
100 Correct 5 ms 5796 KB Output is correct
101 Correct 5 ms 5972 KB Output is correct
102 Correct 4 ms 5844 KB Output is correct
103 Correct 5 ms 5932 KB Output is correct
104 Correct 4 ms 5844 KB Output is correct
105 Correct 5 ms 5972 KB Output is correct
106 Correct 4 ms 5844 KB Output is correct
107 Correct 5 ms 5716 KB Output is correct
108 Correct 4 ms 5756 KB Output is correct
109 Correct 5 ms 5792 KB Output is correct
110 Correct 6 ms 5788 KB Output is correct
111 Correct 5 ms 5844 KB Output is correct
112 Correct 7 ms 6356 KB Output is correct
113 Correct 8 ms 6508 KB Output is correct
114 Correct 7 ms 6356 KB Output is correct
115 Correct 7 ms 6188 KB Output is correct
116 Correct 10 ms 6484 KB Output is correct
117 Correct 7 ms 6192 KB Output is correct
118 Correct 51 ms 16832 KB Output is correct
119 Correct 40 ms 18636 KB Output is correct
120 Correct 67 ms 20360 KB Output is correct
121 Correct 6 ms 5716 KB Output is correct
122 Correct 7 ms 5844 KB Output is correct
123 Correct 6 ms 5844 KB Output is correct
124 Correct 7 ms 5844 KB Output is correct
125 Correct 6 ms 5844 KB Output is correct
126 Correct 9 ms 6612 KB Output is correct
127 Correct 7 ms 6568 KB Output is correct
128 Correct 8 ms 6576 KB Output is correct
129 Correct 7 ms 6484 KB Output is correct
130 Correct 8 ms 6572 KB Output is correct
131 Correct 7 ms 6484 KB Output is correct
132 Correct 64 ms 21468 KB Output is correct
133 Correct 73 ms 21472 KB Output is correct
134 Correct 68 ms 21380 KB Output is correct
135 Correct 6 ms 6188 KB Output is correct
136 Correct 247 ms 6244 KB Output is correct
137 Correct 161 ms 6056 KB Output is correct
138 Correct 148 ms 6068 KB Output is correct
139 Correct 143 ms 6100 KB Output is correct
140 Correct 102 ms 6108 KB Output is correct
141 Correct 20 ms 9784 KB Output is correct
142 Correct 21 ms 9860 KB Output is correct
143 Correct 35 ms 11584 KB Output is correct
144 Correct 28 ms 9744 KB Output is correct
145 Correct 36 ms 10292 KB Output is correct
146 Correct 19 ms 9668 KB Output is correct
147 Correct 41 ms 15424 KB Output is correct
148 Correct 10 ms 7508 KB Output is correct
149 Correct 50 ms 16604 KB Output is correct
150 Correct 10 ms 7344 KB Output is correct
151 Correct 61 ms 18568 KB Output is correct
152 Correct 16 ms 8404 KB Output is correct
153 Correct 12 ms 8664 KB Output is correct
154 Correct 22 ms 9468 KB Output is correct
155 Correct 17 ms 8404 KB Output is correct
156 Correct 15 ms 8564 KB Output is correct
157 Correct 6 ms 6160 KB Output is correct
158 Correct 349 ms 6540 KB Output is correct
159 Correct 318 ms 6188 KB Output is correct
160 Correct 250 ms 6228 KB Output is correct
161 Correct 218 ms 6228 KB Output is correct
162 Correct 209 ms 6264 KB Output is correct
163 Correct 38 ms 12216 KB Output is correct
164 Correct 34 ms 12236 KB Output is correct
165 Correct 33 ms 12244 KB Output is correct
166 Correct 36 ms 12280 KB Output is correct
167 Correct 48 ms 12220 KB Output is correct
168 Correct 47 ms 12184 KB Output is correct
169 Correct 77 ms 21972 KB Output is correct
170 Correct 14 ms 8752 KB Output is correct
171 Correct 72 ms 21920 KB Output is correct
172 Correct 16 ms 8768 KB Output is correct
173 Correct 80 ms 21980 KB Output is correct
174 Correct 15 ms 8752 KB Output is correct
175 Correct 20 ms 9796 KB Output is correct
176 Correct 25 ms 9816 KB Output is correct
177 Correct 18 ms 9760 KB Output is correct
178 Correct 16 ms 9556 KB Output is correct
179 Correct 11 ms 6996 KB Output is correct
180 Correct 707 ms 6944 KB Output is correct
181 Correct 887 ms 6956 KB Output is correct
182 Correct 1206 ms 7316 KB Output is correct
183 Correct 626 ms 6864 KB Output is correct
184 Correct 564 ms 6868 KB Output is correct
185 Correct 59 ms 17796 KB Output is correct
186 Correct 47 ms 18940 KB Output is correct
187 Correct 87 ms 19916 KB Output is correct
188 Correct 71 ms 18052 KB Output is correct
189 Correct 66 ms 18244 KB Output is correct
190 Correct 75 ms 18920 KB Output is correct
191 Correct 64 ms 17836 KB Output is correct
192 Correct 53 ms 16588 KB Output is correct
193 Correct 47 ms 14852 KB Output is correct
194 Correct 16 ms 7796 KB Output is correct
195 Execution timed out 1581 ms 7956 KB Time limit exceeded
196 Halted 0 ms 0 KB -