Submission #567663

# Submission time Handle Problem Language Result Execution time Memory
567663 2022-05-24T01:47:30 Z hhhhaura Painting Walls (APIO20_paint) C++14
100 / 100
702 ms 18952 KB
#include "paint.h"

#include <vector>
#define wiwihorz
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse")
#pragma loop-opt(on)
#define rep(i, a, b) for(int i = a; i <= b; i ++)
#define rrep(i, a, b) for(int i = b; i >= a; i --)
#define all(x) x.begin(), x.end()
#define ceil(a, b) ((a + b - 1) / (b))
#define ll long long int
#define lld long double
#define pii pair<int, int>
#define random mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count())
#define INF 1000000000000000000
#define MOD 1000000007
#define eps (1e-9)
using namespace std;
#ifdef wiwihorz
#define print(a...)cerr<<"Line "<<__LINE__<<":",kout("["+string(#a)+"] = ", a)
void vprint(auto L,auto R){while(L<R)cerr<<*L<<" \n"[next(L) == R], ++L; }
void kout() { cerr << endl; }
template<class T1,class ... T2>void kout(T1 a,T2 ... e){cerr<<a<<" ",kout(e...);}
#else
#define print(...) 0
#define vprint(...) 0
#endif
#define x first
#define y second 

using namespace std;
int minimumInstructions(int N, int M, int K, vector<int> C, 
	vector<int> A, vector<vector<int>> B) {
	vector<vector<int>> mp(K, vector<int>());
	rep(i, 0, M - 1) for(auto j : B[i]) {
		mp[j].push_back(i);
	}
	set<int> t, s;
	rep(i, 0, N - 1) t.insert(i);
	auto pos = [&](int x, int s, int t) {
		int val = (x + (t - s)) % M;
		if(val < 0) return val + M;
		else return val;
	};
	auto check = [&](int x, int y) {
		int id = lower_bound(all(B[x]), y) - B[x].begin();
		return id < A[x] && B[x][id] == y;
	};
	for(int i = M - 1; i < N; i += M) {
		for(auto j : mp[C[i]]) {
			int l = i, r = i;
			while(l - 1 >= i - M + 1 && check(pos(j, i, l - 1), C[l - 1])) l--;
			while(r + 1 <= min(N, i + M - 1) 
				&& check(pos(j, i, r + 1), C[r + 1])) r++;
			auto it = t.lower_bound(l);
			while(it != t.end()) {
				if(*it + M - 1 > r) break;
				auto tp = it;
				it = next(it);
				t.erase(tp);
			}
		}
	}
	rep(i, 0, N - 1) if(!t.count(i)) {
		s.insert(i);
	}
	int cnt = 0, cur = 0;
	while(cur < N) {
		auto it = s.upper_bound(cur);
		if(it == s.begin()) return -1;
		it = prev(it);
		if(*it + M <= cur) return -1;
		cur = *it + M;
		cnt ++;
	}
	return cnt;
	
}

Compilation message

paint.cpp:8: warning: ignoring '#pragma loop ' [-Wunknown-pragmas]
    8 | #pragma loop-opt(on)
      | 
paint.cpp:23:13: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   23 | void vprint(auto L,auto R){while(L<R)cerr<<*L<<" \n"[next(L) == R], ++L; }
      |             ^~~~
paint.cpp:23:20: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   23 | void vprint(auto L,auto R){while(L<R)cerr<<*L<<" \n"[next(L) == R], ++L; }
      |                    ^~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 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 2 ms 2644 KB Output is correct
14 Correct 2 ms 2644 KB Output is correct
15 Correct 2 ms 2644 KB Output is correct
16 Correct 2 ms 2644 KB Output is correct
17 Correct 2 ms 2644 KB Output is correct
18 Correct 2 ms 2644 KB Output is correct
19 Correct 2 ms 2644 KB Output is correct
20 Correct 2 ms 2644 KB Output is correct
21 Correct 2 ms 2644 KB Output is correct
22 Correct 17 ms 6484 KB Output is correct
23 Correct 17 ms 6596 KB Output is correct
24 Correct 17 ms 6612 KB Output is correct
25 Correct 10 ms 1288 KB Output is correct
26 Correct 10 ms 1364 KB Output is correct
27 Correct 9 ms 1364 KB Output is correct
28 Correct 9 ms 1364 KB Output is correct
29 Correct 7 ms 1364 KB Output is correct
30 Correct 6 ms 1364 KB Output is correct
31 Correct 14 ms 4564 KB Output is correct
32 Correct 18 ms 4564 KB Output is correct
33 Correct 14 ms 4644 KB Output is correct
34 Correct 14 ms 4564 KB Output is correct
35 Correct 15 ms 4616 KB Output is correct
36 Correct 15 ms 4564 KB Output is correct
37 Correct 26 ms 7716 KB Output is correct
38 Correct 24 ms 7708 KB Output is correct
39 Correct 25 ms 7720 KB Output is correct
40 Correct 55 ms 5260 KB Output is correct
41 Correct 31 ms 3460 KB Output is correct
42 Correct 46 ms 5852 KB Output is correct
43 Correct 27 ms 3916 KB Output is correct
44 Correct 24 ms 3680 KB Output is correct
45 Correct 49 ms 5884 KB Output is correct
46 Correct 70 ms 16780 KB Output is correct
47 Correct 41 ms 10704 KB Output is correct
48 Correct 43 ms 13060 KB Output is correct
49 Correct 50 ms 13676 KB Output is correct
50 Correct 54 ms 13868 KB Output is correct
51 Correct 51 ms 11336 KB Output is correct
52 Correct 58 ms 5964 KB Output is correct
53 Correct 60 ms 5964 KB Output is correct
54 Correct 47 ms 5884 KB Output is correct
55 Correct 46 ms 5952 KB Output is correct
56 Correct 39 ms 5868 KB Output is correct
57 Correct 39 ms 5896 KB Output is correct
58 Correct 82 ms 18364 KB Output is correct
59 Correct 88 ms 18284 KB Output is correct
60 Correct 82 ms 18340 KB Output is correct
61 Correct 79 ms 18344 KB Output is correct
62 Correct 80 ms 18284 KB Output is correct
63 Correct 77 ms 18404 KB Output is correct
64 Correct 71 ms 17528 KB Output is correct
65 Correct 72 ms 17528 KB Output is correct
66 Correct 73 ms 17472 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 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 2 ms 2644 KB Output is correct
14 Correct 2 ms 2644 KB Output is correct
15 Correct 2 ms 2644 KB Output is correct
16 Correct 2 ms 2644 KB Output is correct
17 Correct 2 ms 2644 KB Output is correct
18 Correct 2 ms 2644 KB Output is correct
19 Correct 2 ms 2644 KB Output is correct
20 Correct 2 ms 2644 KB Output is correct
21 Correct 2 ms 2644 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 0 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 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 2260 KB Output is correct
34 Correct 1 ms 1748 KB Output is correct
35 Correct 1 ms 1620 KB Output is correct
36 Correct 2 ms 2644 KB Output is correct
37 Correct 1 ms 2132 KB Output is correct
38 Correct 2 ms 2388 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 2 ms 2132 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 2 ms 2516 KB Output is correct
43 Correct 2 ms 2388 KB Output is correct
44 Correct 1 ms 212 KB Output is correct
45 Correct 1 ms 212 KB Output is correct
46 Correct 1 ms 212 KB Output is correct
47 Correct 1 ms 212 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 2 ms 2644 KB Output is correct
51 Correct 2 ms 2644 KB Output is correct
52 Correct 2 ms 2644 KB Output is correct
53 Correct 2 ms 2644 KB Output is correct
54 Correct 1 ms 2644 KB Output is correct
55 Correct 2 ms 2644 KB Output is correct
56 Correct 2 ms 2644 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 2 ms 2644 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 2 ms 2644 KB Output is correct
61 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 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 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 2 ms 2644 KB Output is correct
16 Correct 2 ms 2644 KB Output is correct
17 Correct 2 ms 2644 KB Output is correct
18 Correct 2 ms 2644 KB Output is correct
19 Correct 2 ms 2644 KB Output is correct
20 Correct 2 ms 2644 KB Output is correct
21 Correct 2 ms 2644 KB Output is correct
22 Correct 2 ms 2644 KB Output is correct
23 Correct 2 ms 2644 KB Output is correct
24 Correct 17 ms 6484 KB Output is correct
25 Correct 17 ms 6596 KB Output is correct
26 Correct 17 ms 6612 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
28 Correct 1 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 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 2260 KB Output is correct
37 Correct 1 ms 1748 KB Output is correct
38 Correct 1 ms 1620 KB Output is correct
39 Correct 2 ms 2644 KB Output is correct
40 Correct 1 ms 2132 KB Output is correct
41 Correct 2 ms 2388 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 ms 2132 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 2 ms 2516 KB Output is correct
46 Correct 2 ms 2388 KB Output is correct
47 Correct 1 ms 212 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 2 ms 2644 KB Output is correct
54 Correct 2 ms 2644 KB Output is correct
55 Correct 2 ms 2644 KB Output is correct
56 Correct 2 ms 2644 KB Output is correct
57 Correct 1 ms 2644 KB Output is correct
58 Correct 2 ms 2644 KB Output is correct
59 Correct 2 ms 2644 KB Output is correct
60 Correct 1 ms 340 KB Output is correct
61 Correct 2 ms 2644 KB Output is correct
62 Correct 1 ms 340 KB Output is correct
63 Correct 2 ms 2644 KB Output is correct
64 Correct 1 ms 340 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 1 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 340 KB Output is correct
70 Correct 3 ms 2388 KB Output is correct
71 Correct 4 ms 2132 KB Output is correct
72 Correct 3 ms 1876 KB Output is correct
73 Correct 2 ms 2004 KB Output is correct
74 Correct 3 ms 2260 KB Output is correct
75 Correct 3 ms 2772 KB Output is correct
76 Correct 17 ms 4528 KB Output is correct
77 Correct 19 ms 5332 KB Output is correct
78 Correct 25 ms 6084 KB Output is correct
79 Correct 1 ms 340 KB Output is correct
80 Correct 2 ms 340 KB Output is correct
81 Correct 2 ms 340 KB Output is correct
82 Correct 2 ms 340 KB Output is correct
83 Correct 2 ms 340 KB Output is correct
84 Correct 4 ms 2904 KB Output is correct
85 Correct 4 ms 2900 KB Output is correct
86 Correct 4 ms 2900 KB Output is correct
87 Correct 4 ms 2900 KB Output is correct
88 Correct 4 ms 2900 KB Output is correct
89 Correct 4 ms 2900 KB Output is correct
90 Correct 24 ms 6368 KB Output is correct
91 Correct 25 ms 6356 KB Output is correct
92 Correct 24 ms 6356 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 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 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 2 ms 2644 KB Output is correct
16 Correct 2 ms 2644 KB Output is correct
17 Correct 2 ms 2644 KB Output is correct
18 Correct 2 ms 2644 KB Output is correct
19 Correct 2 ms 2644 KB Output is correct
20 Correct 2 ms 2644 KB Output is correct
21 Correct 2 ms 2644 KB Output is correct
22 Correct 2 ms 2644 KB Output is correct
23 Correct 2 ms 2644 KB Output is correct
24 Correct 17 ms 6484 KB Output is correct
25 Correct 17 ms 6596 KB Output is correct
26 Correct 17 ms 6612 KB Output is correct
27 Correct 10 ms 1288 KB Output is correct
28 Correct 10 ms 1364 KB Output is correct
29 Correct 9 ms 1364 KB Output is correct
30 Correct 9 ms 1364 KB Output is correct
31 Correct 7 ms 1364 KB Output is correct
32 Correct 6 ms 1364 KB Output is correct
33 Correct 14 ms 4564 KB Output is correct
34 Correct 18 ms 4564 KB Output is correct
35 Correct 14 ms 4644 KB Output is correct
36 Correct 14 ms 4564 KB Output is correct
37 Correct 15 ms 4616 KB Output is correct
38 Correct 15 ms 4564 KB Output is correct
39 Correct 26 ms 7716 KB Output is correct
40 Correct 24 ms 7708 KB Output is correct
41 Correct 25 ms 7720 KB Output is correct
42 Correct 0 ms 212 KB Output is correct
43 Correct 1 ms 212 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 1 ms 212 KB Output is correct
46 Correct 1 ms 212 KB Output is correct
47 Correct 1 ms 212 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 2260 KB Output is correct
52 Correct 1 ms 1748 KB Output is correct
53 Correct 1 ms 1620 KB Output is correct
54 Correct 2 ms 2644 KB Output is correct
55 Correct 1 ms 2132 KB Output is correct
56 Correct 2 ms 2388 KB Output is correct
57 Correct 1 ms 212 KB Output is correct
58 Correct 2 ms 2132 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 2 ms 2516 KB Output is correct
61 Correct 2 ms 2388 KB Output is correct
62 Correct 1 ms 212 KB Output is correct
63 Correct 1 ms 212 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 1 ms 212 KB Output is correct
67 Correct 1 ms 212 KB Output is correct
68 Correct 2 ms 2644 KB Output is correct
69 Correct 2 ms 2644 KB Output is correct
70 Correct 2 ms 2644 KB Output is correct
71 Correct 2 ms 2644 KB Output is correct
72 Correct 1 ms 2644 KB Output is correct
73 Correct 2 ms 2644 KB Output is correct
74 Correct 2 ms 2644 KB Output is correct
75 Correct 1 ms 340 KB Output is correct
76 Correct 2 ms 2644 KB Output is correct
77 Correct 1 ms 340 KB Output is correct
78 Correct 2 ms 2644 KB Output is correct
79 Correct 1 ms 340 KB Output is correct
80 Correct 1 ms 212 KB Output is correct
81 Correct 1 ms 212 KB Output is correct
82 Correct 1 ms 212 KB Output is correct
83 Correct 1 ms 212 KB Output is correct
84 Correct 1 ms 340 KB Output is correct
85 Correct 3 ms 2388 KB Output is correct
86 Correct 4 ms 2132 KB Output is correct
87 Correct 3 ms 1876 KB Output is correct
88 Correct 2 ms 2004 KB Output is correct
89 Correct 3 ms 2260 KB Output is correct
90 Correct 3 ms 2772 KB Output is correct
91 Correct 17 ms 4528 KB Output is correct
92 Correct 19 ms 5332 KB Output is correct
93 Correct 25 ms 6084 KB Output is correct
94 Correct 1 ms 340 KB Output is correct
95 Correct 2 ms 340 KB Output is correct
96 Correct 2 ms 340 KB Output is correct
97 Correct 2 ms 340 KB Output is correct
98 Correct 2 ms 340 KB Output is correct
99 Correct 4 ms 2904 KB Output is correct
100 Correct 4 ms 2900 KB Output is correct
101 Correct 4 ms 2900 KB Output is correct
102 Correct 4 ms 2900 KB Output is correct
103 Correct 4 ms 2900 KB Output is correct
104 Correct 4 ms 2900 KB Output is correct
105 Correct 24 ms 6368 KB Output is correct
106 Correct 25 ms 6356 KB Output is correct
107 Correct 24 ms 6356 KB Output is correct
108 Correct 9 ms 1364 KB Output is correct
109 Correct 95 ms 1164 KB Output is correct
110 Correct 5 ms 980 KB Output is correct
111 Correct 4 ms 1016 KB Output is correct
112 Correct 6 ms 1236 KB Output is correct
113 Correct 4 ms 980 KB Output is correct
114 Correct 17 ms 4212 KB Output is correct
115 Correct 20 ms 3960 KB Output is correct
116 Correct 24 ms 4676 KB Output is correct
117 Correct 16 ms 3560 KB Output is correct
118 Correct 21 ms 4180 KB Output is correct
119 Correct 15 ms 4148 KB Output is correct
120 Correct 19 ms 4820 KB Output is correct
121 Correct 10 ms 1620 KB Output is correct
122 Correct 22 ms 4816 KB Output is correct
123 Correct 7 ms 1536 KB Output is correct
124 Correct 25 ms 6112 KB Output is correct
125 Correct 13 ms 2232 KB Output is correct
126 Correct 11 ms 3080 KB Output is correct
127 Correct 12 ms 4052 KB Output is correct
128 Correct 9 ms 3412 KB Output is correct
129 Correct 10 ms 2900 KB Output is correct
130 Correct 10 ms 1364 KB Output is correct
131 Correct 133 ms 1456 KB Output is correct
132 Correct 8 ms 1492 KB Output is correct
133 Correct 7 ms 1492 KB Output is correct
134 Correct 7 ms 1492 KB Output is correct
135 Correct 8 ms 1492 KB Output is correct
136 Correct 25 ms 5076 KB Output is correct
137 Correct 27 ms 5168 KB Output is correct
138 Correct 26 ms 5132 KB Output is correct
139 Correct 26 ms 5072 KB Output is correct
140 Correct 26 ms 5112 KB Output is correct
141 Correct 25 ms 5172 KB Output is correct
142 Correct 32 ms 7636 KB Output is correct
143 Correct 13 ms 2464 KB Output is correct
144 Correct 32 ms 7508 KB Output is correct
145 Correct 13 ms 2516 KB Output is correct
146 Correct 35 ms 7596 KB Output is correct
147 Correct 13 ms 2516 KB Output is correct
148 Correct 16 ms 4788 KB Output is correct
149 Correct 15 ms 4636 KB Output is correct
150 Correct 15 ms 4564 KB Output is correct
151 Correct 15 ms 4524 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 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 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 2 ms 2644 KB Output is correct
16 Correct 2 ms 2644 KB Output is correct
17 Correct 2 ms 2644 KB Output is correct
18 Correct 2 ms 2644 KB Output is correct
19 Correct 2 ms 2644 KB Output is correct
20 Correct 2 ms 2644 KB Output is correct
21 Correct 2 ms 2644 KB Output is correct
22 Correct 2 ms 2644 KB Output is correct
23 Correct 2 ms 2644 KB Output is correct
24 Correct 17 ms 6484 KB Output is correct
25 Correct 17 ms 6596 KB Output is correct
26 Correct 17 ms 6612 KB Output is correct
27 Correct 10 ms 1288 KB Output is correct
28 Correct 10 ms 1364 KB Output is correct
29 Correct 9 ms 1364 KB Output is correct
30 Correct 9 ms 1364 KB Output is correct
31 Correct 7 ms 1364 KB Output is correct
32 Correct 6 ms 1364 KB Output is correct
33 Correct 14 ms 4564 KB Output is correct
34 Correct 18 ms 4564 KB Output is correct
35 Correct 14 ms 4644 KB Output is correct
36 Correct 14 ms 4564 KB Output is correct
37 Correct 15 ms 4616 KB Output is correct
38 Correct 15 ms 4564 KB Output is correct
39 Correct 26 ms 7716 KB Output is correct
40 Correct 24 ms 7708 KB Output is correct
41 Correct 25 ms 7720 KB Output is correct
42 Correct 55 ms 5260 KB Output is correct
43 Correct 31 ms 3460 KB Output is correct
44 Correct 46 ms 5852 KB Output is correct
45 Correct 27 ms 3916 KB Output is correct
46 Correct 24 ms 3680 KB Output is correct
47 Correct 49 ms 5884 KB Output is correct
48 Correct 70 ms 16780 KB Output is correct
49 Correct 41 ms 10704 KB Output is correct
50 Correct 43 ms 13060 KB Output is correct
51 Correct 50 ms 13676 KB Output is correct
52 Correct 54 ms 13868 KB Output is correct
53 Correct 51 ms 11336 KB Output is correct
54 Correct 58 ms 5964 KB Output is correct
55 Correct 60 ms 5964 KB Output is correct
56 Correct 47 ms 5884 KB Output is correct
57 Correct 46 ms 5952 KB Output is correct
58 Correct 39 ms 5868 KB Output is correct
59 Correct 39 ms 5896 KB Output is correct
60 Correct 82 ms 18364 KB Output is correct
61 Correct 88 ms 18284 KB Output is correct
62 Correct 82 ms 18340 KB Output is correct
63 Correct 79 ms 18344 KB Output is correct
64 Correct 80 ms 18284 KB Output is correct
65 Correct 77 ms 18404 KB Output is correct
66 Correct 71 ms 17528 KB Output is correct
67 Correct 72 ms 17528 KB Output is correct
68 Correct 73 ms 17472 KB Output is correct
69 Correct 0 ms 212 KB Output is correct
70 Correct 1 ms 212 KB Output is correct
71 Correct 0 ms 212 KB Output is correct
72 Correct 1 ms 212 KB Output is correct
73 Correct 1 ms 212 KB Output is correct
74 Correct 1 ms 212 KB Output is correct
75 Correct 1 ms 212 KB Output is correct
76 Correct 1 ms 212 KB Output is correct
77 Correct 1 ms 212 KB Output is correct
78 Correct 1 ms 2260 KB Output is correct
79 Correct 1 ms 1748 KB Output is correct
80 Correct 1 ms 1620 KB Output is correct
81 Correct 2 ms 2644 KB Output is correct
82 Correct 1 ms 2132 KB Output is correct
83 Correct 2 ms 2388 KB Output is correct
84 Correct 1 ms 212 KB Output is correct
85 Correct 2 ms 2132 KB Output is correct
86 Correct 1 ms 340 KB Output is correct
87 Correct 2 ms 2516 KB Output is correct
88 Correct 2 ms 2388 KB Output is correct
89 Correct 1 ms 212 KB Output is correct
90 Correct 1 ms 212 KB Output is correct
91 Correct 1 ms 212 KB Output is correct
92 Correct 1 ms 212 KB Output is correct
93 Correct 1 ms 212 KB Output is correct
94 Correct 1 ms 212 KB Output is correct
95 Correct 2 ms 2644 KB Output is correct
96 Correct 2 ms 2644 KB Output is correct
97 Correct 2 ms 2644 KB Output is correct
98 Correct 2 ms 2644 KB Output is correct
99 Correct 1 ms 2644 KB Output is correct
100 Correct 2 ms 2644 KB Output is correct
101 Correct 2 ms 2644 KB Output is correct
102 Correct 1 ms 340 KB Output is correct
103 Correct 2 ms 2644 KB Output is correct
104 Correct 1 ms 340 KB Output is correct
105 Correct 2 ms 2644 KB Output is correct
106 Correct 1 ms 340 KB Output is correct
107 Correct 1 ms 212 KB Output is correct
108 Correct 1 ms 212 KB Output is correct
109 Correct 1 ms 212 KB Output is correct
110 Correct 1 ms 212 KB Output is correct
111 Correct 1 ms 340 KB Output is correct
112 Correct 3 ms 2388 KB Output is correct
113 Correct 4 ms 2132 KB Output is correct
114 Correct 3 ms 1876 KB Output is correct
115 Correct 2 ms 2004 KB Output is correct
116 Correct 3 ms 2260 KB Output is correct
117 Correct 3 ms 2772 KB Output is correct
118 Correct 17 ms 4528 KB Output is correct
119 Correct 19 ms 5332 KB Output is correct
120 Correct 25 ms 6084 KB Output is correct
121 Correct 1 ms 340 KB Output is correct
122 Correct 2 ms 340 KB Output is correct
123 Correct 2 ms 340 KB Output is correct
124 Correct 2 ms 340 KB Output is correct
125 Correct 2 ms 340 KB Output is correct
126 Correct 4 ms 2904 KB Output is correct
127 Correct 4 ms 2900 KB Output is correct
128 Correct 4 ms 2900 KB Output is correct
129 Correct 4 ms 2900 KB Output is correct
130 Correct 4 ms 2900 KB Output is correct
131 Correct 4 ms 2900 KB Output is correct
132 Correct 24 ms 6368 KB Output is correct
133 Correct 25 ms 6356 KB Output is correct
134 Correct 24 ms 6356 KB Output is correct
135 Correct 9 ms 1364 KB Output is correct
136 Correct 95 ms 1164 KB Output is correct
137 Correct 5 ms 980 KB Output is correct
138 Correct 4 ms 1016 KB Output is correct
139 Correct 6 ms 1236 KB Output is correct
140 Correct 4 ms 980 KB Output is correct
141 Correct 17 ms 4212 KB Output is correct
142 Correct 20 ms 3960 KB Output is correct
143 Correct 24 ms 4676 KB Output is correct
144 Correct 16 ms 3560 KB Output is correct
145 Correct 21 ms 4180 KB Output is correct
146 Correct 15 ms 4148 KB Output is correct
147 Correct 19 ms 4820 KB Output is correct
148 Correct 10 ms 1620 KB Output is correct
149 Correct 22 ms 4816 KB Output is correct
150 Correct 7 ms 1536 KB Output is correct
151 Correct 25 ms 6112 KB Output is correct
152 Correct 13 ms 2232 KB Output is correct
153 Correct 11 ms 3080 KB Output is correct
154 Correct 12 ms 4052 KB Output is correct
155 Correct 9 ms 3412 KB Output is correct
156 Correct 10 ms 2900 KB Output is correct
157 Correct 10 ms 1364 KB Output is correct
158 Correct 133 ms 1456 KB Output is correct
159 Correct 8 ms 1492 KB Output is correct
160 Correct 7 ms 1492 KB Output is correct
161 Correct 7 ms 1492 KB Output is correct
162 Correct 8 ms 1492 KB Output is correct
163 Correct 25 ms 5076 KB Output is correct
164 Correct 27 ms 5168 KB Output is correct
165 Correct 26 ms 5132 KB Output is correct
166 Correct 26 ms 5072 KB Output is correct
167 Correct 26 ms 5112 KB Output is correct
168 Correct 25 ms 5172 KB Output is correct
169 Correct 32 ms 7636 KB Output is correct
170 Correct 13 ms 2464 KB Output is correct
171 Correct 32 ms 7508 KB Output is correct
172 Correct 13 ms 2516 KB Output is correct
173 Correct 35 ms 7596 KB Output is correct
174 Correct 13 ms 2516 KB Output is correct
175 Correct 16 ms 4788 KB Output is correct
176 Correct 15 ms 4636 KB Output is correct
177 Correct 15 ms 4564 KB Output is correct
178 Correct 15 ms 4524 KB Output is correct
179 Correct 36 ms 3700 KB Output is correct
180 Correct 292 ms 3304 KB Output is correct
181 Correct 36 ms 4564 KB Output is correct
182 Correct 38 ms 5932 KB Output is correct
183 Correct 24 ms 4064 KB Output is correct
184 Correct 23 ms 3920 KB Output is correct
185 Correct 48 ms 8204 KB Output is correct
186 Correct 47 ms 10572 KB Output is correct
187 Correct 55 ms 9804 KB Output is correct
188 Correct 52 ms 10632 KB Output is correct
189 Correct 66 ms 10736 KB Output is correct
190 Correct 56 ms 10800 KB Output is correct
191 Correct 58 ms 10980 KB Output is correct
192 Correct 39 ms 8756 KB Output is correct
193 Correct 51 ms 8096 KB Output is correct
194 Correct 55 ms 5956 KB Output is correct
195 Correct 702 ms 6056 KB Output is correct
196 Correct 43 ms 6016 KB Output is correct
197 Correct 41 ms 6072 KB Output is correct
198 Correct 47 ms 6128 KB Output is correct
199 Correct 42 ms 6064 KB Output is correct
200 Correct 101 ms 18952 KB Output is correct
201 Correct 97 ms 18876 KB Output is correct
202 Correct 94 ms 18836 KB Output is correct
203 Correct 93 ms 18852 KB Output is correct
204 Correct 96 ms 18868 KB Output is correct
205 Correct 100 ms 18776 KB Output is correct
206 Correct 82 ms 17828 KB Output is correct
207 Correct 77 ms 17224 KB Output is correct
208 Correct 79 ms 17828 KB Output is correct
209 Correct 75 ms 17144 KB Output is correct
210 Correct 79 ms 17880 KB Output is correct
211 Correct 79 ms 17220 KB Output is correct
212 Correct 84 ms 18612 KB Output is correct
213 Correct 74 ms 15656 KB Output is correct
214 Correct 74 ms 15188 KB Output is correct
215 Correct 76 ms 15048 KB Output is correct