Submission #395859

# Submission time Handle Problem Language Result Execution time Memory
395859 2021-04-29T04:17:37 Z khangal Painting Walls (APIO20_paint) C++14
100 / 100
1366 ms 290676 KB
#pragma GCC optimize("unroll-loops,no-stack-protector,Ofast")
#include<bits/stdc++.h>
using namespace std;
typedef int ll;
typedef double db;
typedef pair<ll,ll> pl;
typedef vector<ll> vl;
#define pb push_back
#define po pop_back
#define ff first
#define ss second
#define MIN -1e18
#define MAX 1e18
#define lw lower_bound

#define SZ(_a) (ll)_a.size()
// typedef tree<ll , null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
// template< typename T>
// using indexed_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
ll n,m,mid,mn,T,sum,c[1234567],h1,h2,x,y,z,l,r,cnt,cnt1,ans;
vector<ll> vec[1234567];
bool ok[1234567],ok1;	
ll minimumInstructions(ll n,ll m,ll k,vector<ll> color,vector<ll> a,vector<vector<ll> > b){
	vector<vector<ll> > loc(k);
	for(int i=0;i<m;i++){
		for(int j=0;j<SZ(b[i]);j++)loc[b[i][j]].pb(i);
	}
	vector<vector<ll> > it(m);
	for(int i=0;i<n;i++){
		for(int j:loc[color[i]]){
			it[((j-i)%m+m)%m].pb(i);
		}
	}
	vector<ll> r(n);
	for(const auto &v:it){
		ll lst=n+1,len=0;
		for(int i=SZ(v)-1;i>=0;i--){
			if(v[i]+1!=lst)len=0;
			++len;
			r[v[i]]=max(r[v[i]],len);
			lst=v[i];
		}
	}
	vector<ll> lis;
	for(int i=0;i<n;i++)if(r[i]>=m)lis.pb(i);
	ll ans=0;
	for(int R=0,id=0;R<n;){
		while(id<SZ(lis)&&lis[id]<=R)++id;
		if(id==0)return -1;
		ll L=lis[id-1];
		if(L+m<=R)return -1;
		++ans;
		R=L+m;
	}
	return ans;
	
}
# Verdict Execution time Memory Grader output
1 Correct 21 ms 29260 KB Output is correct
2 Correct 20 ms 29260 KB Output is correct
3 Correct 20 ms 29300 KB Output is correct
4 Correct 21 ms 29232 KB Output is correct
5 Correct 20 ms 29260 KB Output is correct
6 Correct 20 ms 29264 KB Output is correct
7 Correct 21 ms 29260 KB Output is correct
8 Correct 21 ms 29220 KB Output is correct
9 Correct 22 ms 29260 KB Output is correct
10 Correct 21 ms 29260 KB Output is correct
11 Correct 20 ms 29260 KB Output is correct
12 Correct 21 ms 29196 KB Output is correct
13 Correct 22 ms 31628 KB Output is correct
14 Correct 22 ms 31696 KB Output is correct
15 Correct 24 ms 31688 KB Output is correct
16 Correct 22 ms 31696 KB Output is correct
17 Correct 21 ms 31692 KB Output is correct
18 Correct 22 ms 31692 KB Output is correct
19 Correct 22 ms 31656 KB Output is correct
20 Correct 23 ms 31620 KB Output is correct
21 Correct 22 ms 31692 KB Output is correct
22 Correct 44 ms 35780 KB Output is correct
23 Correct 46 ms 35696 KB Output is correct
24 Correct 45 ms 35772 KB Output is correct
25 Correct 23 ms 29708 KB Output is correct
26 Correct 23 ms 29776 KB Output is correct
27 Correct 24 ms 29764 KB Output is correct
28 Correct 24 ms 29652 KB Output is correct
29 Correct 24 ms 29616 KB Output is correct
30 Correct 23 ms 29612 KB Output is correct
31 Correct 31 ms 33228 KB Output is correct
32 Correct 31 ms 33200 KB Output is correct
33 Correct 31 ms 33236 KB Output is correct
34 Correct 31 ms 33096 KB Output is correct
35 Correct 31 ms 33100 KB Output is correct
36 Correct 34 ms 33204 KB Output is correct
37 Correct 52 ms 36388 KB Output is correct
38 Correct 55 ms 36292 KB Output is correct
39 Correct 52 ms 36292 KB Output is correct
40 Correct 34 ms 31512 KB Output is correct
41 Correct 29 ms 30592 KB Output is correct
42 Correct 38 ms 31240 KB Output is correct
43 Correct 30 ms 30500 KB Output is correct
44 Correct 30 ms 30284 KB Output is correct
45 Correct 35 ms 31176 KB Output is correct
46 Correct 74 ms 43316 KB Output is correct
47 Correct 52 ms 37836 KB Output is correct
48 Correct 57 ms 40544 KB Output is correct
49 Correct 80 ms 41284 KB Output is correct
50 Correct 78 ms 40884 KB Output is correct
51 Correct 67 ms 37788 KB Output is correct
52 Correct 38 ms 31684 KB Output is correct
53 Correct 36 ms 31660 KB Output is correct
54 Correct 37 ms 31212 KB Output is correct
55 Correct 35 ms 31164 KB Output is correct
56 Correct 37 ms 31044 KB Output is correct
57 Correct 34 ms 31172 KB Output is correct
58 Correct 79 ms 44176 KB Output is correct
59 Correct 82 ms 44136 KB Output is correct
60 Correct 80 ms 44172 KB Output is correct
61 Correct 82 ms 44164 KB Output is correct
62 Correct 83 ms 44244 KB Output is correct
63 Correct 78 ms 44244 KB Output is correct
64 Correct 116 ms 43788 KB Output is correct
65 Correct 99 ms 43716 KB Output is correct
66 Correct 98 ms 43716 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 21 ms 29260 KB Output is correct
2 Correct 20 ms 29260 KB Output is correct
3 Correct 20 ms 29300 KB Output is correct
4 Correct 21 ms 29232 KB Output is correct
5 Correct 20 ms 29260 KB Output is correct
6 Correct 20 ms 29264 KB Output is correct
7 Correct 21 ms 29260 KB Output is correct
8 Correct 21 ms 29220 KB Output is correct
9 Correct 22 ms 29260 KB Output is correct
10 Correct 21 ms 29260 KB Output is correct
11 Correct 20 ms 29260 KB Output is correct
12 Correct 21 ms 29196 KB Output is correct
13 Correct 22 ms 31628 KB Output is correct
14 Correct 22 ms 31696 KB Output is correct
15 Correct 24 ms 31688 KB Output is correct
16 Correct 22 ms 31696 KB Output is correct
17 Correct 21 ms 31692 KB Output is correct
18 Correct 22 ms 31692 KB Output is correct
19 Correct 22 ms 31656 KB Output is correct
20 Correct 23 ms 31620 KB Output is correct
21 Correct 22 ms 31692 KB Output is correct
22 Correct 20 ms 29228 KB Output is correct
23 Correct 20 ms 29212 KB Output is correct
24 Correct 20 ms 29264 KB Output is correct
25 Correct 20 ms 29308 KB Output is correct
26 Correct 20 ms 29260 KB Output is correct
27 Correct 20 ms 29260 KB Output is correct
28 Correct 22 ms 29260 KB Output is correct
29 Correct 20 ms 29260 KB Output is correct
30 Correct 21 ms 29260 KB Output is correct
31 Correct 21 ms 29324 KB Output is correct
32 Correct 21 ms 29348 KB Output is correct
33 Correct 22 ms 31308 KB Output is correct
34 Correct 21 ms 30796 KB Output is correct
35 Correct 21 ms 30608 KB Output is correct
36 Correct 22 ms 31580 KB Output is correct
37 Correct 21 ms 31160 KB Output is correct
38 Correct 22 ms 31320 KB Output is correct
39 Correct 20 ms 29260 KB Output is correct
40 Correct 22 ms 31020 KB Output is correct
41 Correct 21 ms 29260 KB Output is correct
42 Correct 22 ms 31456 KB Output is correct
43 Correct 22 ms 31464 KB Output is correct
44 Correct 20 ms 29208 KB Output is correct
45 Correct 21 ms 29400 KB Output is correct
46 Correct 21 ms 29296 KB Output is correct
47 Correct 22 ms 29388 KB Output is correct
48 Correct 21 ms 29372 KB Output is correct
49 Correct 21 ms 29260 KB Output is correct
50 Correct 25 ms 31716 KB Output is correct
51 Correct 22 ms 31672 KB Output is correct
52 Correct 22 ms 31624 KB Output is correct
53 Correct 22 ms 31692 KB Output is correct
54 Correct 24 ms 31692 KB Output is correct
55 Correct 22 ms 31696 KB Output is correct
56 Correct 22 ms 31612 KB Output is correct
57 Correct 20 ms 29368 KB Output is correct
58 Correct 23 ms 31652 KB Output is correct
59 Correct 20 ms 29352 KB Output is correct
60 Correct 22 ms 31656 KB Output is correct
61 Correct 21 ms 29260 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 29228 KB Output is correct
2 Correct 20 ms 29212 KB Output is correct
3 Correct 21 ms 29260 KB Output is correct
4 Correct 20 ms 29260 KB Output is correct
5 Correct 20 ms 29300 KB Output is correct
6 Correct 21 ms 29232 KB Output is correct
7 Correct 20 ms 29260 KB Output is correct
8 Correct 20 ms 29264 KB Output is correct
9 Correct 21 ms 29260 KB Output is correct
10 Correct 21 ms 29220 KB Output is correct
11 Correct 22 ms 29260 KB Output is correct
12 Correct 21 ms 29260 KB Output is correct
13 Correct 20 ms 29260 KB Output is correct
14 Correct 21 ms 29196 KB Output is correct
15 Correct 22 ms 31628 KB Output is correct
16 Correct 22 ms 31696 KB Output is correct
17 Correct 24 ms 31688 KB Output is correct
18 Correct 22 ms 31696 KB Output is correct
19 Correct 21 ms 31692 KB Output is correct
20 Correct 22 ms 31692 KB Output is correct
21 Correct 22 ms 31656 KB Output is correct
22 Correct 23 ms 31620 KB Output is correct
23 Correct 22 ms 31692 KB Output is correct
24 Correct 44 ms 35780 KB Output is correct
25 Correct 46 ms 35696 KB Output is correct
26 Correct 45 ms 35772 KB Output is correct
27 Correct 20 ms 29264 KB Output is correct
28 Correct 20 ms 29308 KB Output is correct
29 Correct 20 ms 29260 KB Output is correct
30 Correct 20 ms 29260 KB Output is correct
31 Correct 22 ms 29260 KB Output is correct
32 Correct 20 ms 29260 KB Output is correct
33 Correct 21 ms 29260 KB Output is correct
34 Correct 21 ms 29324 KB Output is correct
35 Correct 21 ms 29348 KB Output is correct
36 Correct 22 ms 31308 KB Output is correct
37 Correct 21 ms 30796 KB Output is correct
38 Correct 21 ms 30608 KB Output is correct
39 Correct 22 ms 31580 KB Output is correct
40 Correct 21 ms 31160 KB Output is correct
41 Correct 22 ms 31320 KB Output is correct
42 Correct 20 ms 29260 KB Output is correct
43 Correct 22 ms 31020 KB Output is correct
44 Correct 21 ms 29260 KB Output is correct
45 Correct 22 ms 31456 KB Output is correct
46 Correct 22 ms 31464 KB Output is correct
47 Correct 20 ms 29208 KB Output is correct
48 Correct 21 ms 29400 KB Output is correct
49 Correct 21 ms 29296 KB Output is correct
50 Correct 22 ms 29388 KB Output is correct
51 Correct 21 ms 29372 KB Output is correct
52 Correct 21 ms 29260 KB Output is correct
53 Correct 25 ms 31716 KB Output is correct
54 Correct 22 ms 31672 KB Output is correct
55 Correct 22 ms 31624 KB Output is correct
56 Correct 22 ms 31692 KB Output is correct
57 Correct 24 ms 31692 KB Output is correct
58 Correct 22 ms 31696 KB Output is correct
59 Correct 22 ms 31612 KB Output is correct
60 Correct 20 ms 29368 KB Output is correct
61 Correct 23 ms 31652 KB Output is correct
62 Correct 20 ms 29352 KB Output is correct
63 Correct 22 ms 31656 KB Output is correct
64 Correct 21 ms 29260 KB Output is correct
65 Correct 21 ms 29516 KB Output is correct
66 Correct 21 ms 29344 KB Output is correct
67 Correct 22 ms 29532 KB Output is correct
68 Correct 21 ms 29388 KB Output is correct
69 Correct 21 ms 29516 KB Output is correct
70 Correct 24 ms 31520 KB Output is correct
71 Correct 24 ms 31132 KB Output is correct
72 Correct 24 ms 30924 KB Output is correct
73 Correct 23 ms 31052 KB Output is correct
74 Correct 23 ms 31308 KB Output is correct
75 Correct 23 ms 31820 KB Output is correct
76 Correct 43 ms 33732 KB Output is correct
77 Correct 46 ms 34648 KB Output is correct
78 Correct 56 ms 35268 KB Output is correct
79 Correct 23 ms 29652 KB Output is correct
80 Correct 23 ms 29772 KB Output is correct
81 Correct 23 ms 29692 KB Output is correct
82 Correct 22 ms 29772 KB Output is correct
83 Correct 23 ms 29772 KB Output is correct
84 Correct 24 ms 31948 KB Output is correct
85 Correct 24 ms 31904 KB Output is correct
86 Correct 25 ms 31872 KB Output is correct
87 Correct 25 ms 31956 KB Output is correct
88 Correct 25 ms 31940 KB Output is correct
89 Correct 26 ms 31976 KB Output is correct
90 Correct 56 ms 35624 KB Output is correct
91 Correct 55 ms 35552 KB Output is correct
92 Correct 58 ms 35688 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 29228 KB Output is correct
2 Correct 20 ms 29212 KB Output is correct
3 Correct 21 ms 29260 KB Output is correct
4 Correct 20 ms 29260 KB Output is correct
5 Correct 20 ms 29300 KB Output is correct
6 Correct 21 ms 29232 KB Output is correct
7 Correct 20 ms 29260 KB Output is correct
8 Correct 20 ms 29264 KB Output is correct
9 Correct 21 ms 29260 KB Output is correct
10 Correct 21 ms 29220 KB Output is correct
11 Correct 22 ms 29260 KB Output is correct
12 Correct 21 ms 29260 KB Output is correct
13 Correct 20 ms 29260 KB Output is correct
14 Correct 21 ms 29196 KB Output is correct
15 Correct 22 ms 31628 KB Output is correct
16 Correct 22 ms 31696 KB Output is correct
17 Correct 24 ms 31688 KB Output is correct
18 Correct 22 ms 31696 KB Output is correct
19 Correct 21 ms 31692 KB Output is correct
20 Correct 22 ms 31692 KB Output is correct
21 Correct 22 ms 31656 KB Output is correct
22 Correct 23 ms 31620 KB Output is correct
23 Correct 22 ms 31692 KB Output is correct
24 Correct 44 ms 35780 KB Output is correct
25 Correct 46 ms 35696 KB Output is correct
26 Correct 45 ms 35772 KB Output is correct
27 Correct 23 ms 29708 KB Output is correct
28 Correct 23 ms 29776 KB Output is correct
29 Correct 24 ms 29764 KB Output is correct
30 Correct 24 ms 29652 KB Output is correct
31 Correct 24 ms 29616 KB Output is correct
32 Correct 23 ms 29612 KB Output is correct
33 Correct 31 ms 33228 KB Output is correct
34 Correct 31 ms 33200 KB Output is correct
35 Correct 31 ms 33236 KB Output is correct
36 Correct 31 ms 33096 KB Output is correct
37 Correct 31 ms 33100 KB Output is correct
38 Correct 34 ms 33204 KB Output is correct
39 Correct 52 ms 36388 KB Output is correct
40 Correct 55 ms 36292 KB Output is correct
41 Correct 52 ms 36292 KB Output is correct
42 Correct 20 ms 29264 KB Output is correct
43 Correct 20 ms 29308 KB Output is correct
44 Correct 20 ms 29260 KB Output is correct
45 Correct 20 ms 29260 KB Output is correct
46 Correct 22 ms 29260 KB Output is correct
47 Correct 20 ms 29260 KB Output is correct
48 Correct 21 ms 29260 KB Output is correct
49 Correct 21 ms 29324 KB Output is correct
50 Correct 21 ms 29348 KB Output is correct
51 Correct 22 ms 31308 KB Output is correct
52 Correct 21 ms 30796 KB Output is correct
53 Correct 21 ms 30608 KB Output is correct
54 Correct 22 ms 31580 KB Output is correct
55 Correct 21 ms 31160 KB Output is correct
56 Correct 22 ms 31320 KB Output is correct
57 Correct 20 ms 29260 KB Output is correct
58 Correct 22 ms 31020 KB Output is correct
59 Correct 21 ms 29260 KB Output is correct
60 Correct 22 ms 31456 KB Output is correct
61 Correct 22 ms 31464 KB Output is correct
62 Correct 20 ms 29208 KB Output is correct
63 Correct 21 ms 29400 KB Output is correct
64 Correct 21 ms 29296 KB Output is correct
65 Correct 22 ms 29388 KB Output is correct
66 Correct 21 ms 29372 KB Output is correct
67 Correct 21 ms 29260 KB Output is correct
68 Correct 25 ms 31716 KB Output is correct
69 Correct 22 ms 31672 KB Output is correct
70 Correct 22 ms 31624 KB Output is correct
71 Correct 22 ms 31692 KB Output is correct
72 Correct 24 ms 31692 KB Output is correct
73 Correct 22 ms 31696 KB Output is correct
74 Correct 22 ms 31612 KB Output is correct
75 Correct 20 ms 29368 KB Output is correct
76 Correct 23 ms 31652 KB Output is correct
77 Correct 20 ms 29352 KB Output is correct
78 Correct 22 ms 31656 KB Output is correct
79 Correct 21 ms 29260 KB Output is correct
80 Correct 21 ms 29516 KB Output is correct
81 Correct 21 ms 29344 KB Output is correct
82 Correct 22 ms 29532 KB Output is correct
83 Correct 21 ms 29388 KB Output is correct
84 Correct 21 ms 29516 KB Output is correct
85 Correct 24 ms 31520 KB Output is correct
86 Correct 24 ms 31132 KB Output is correct
87 Correct 24 ms 30924 KB Output is correct
88 Correct 23 ms 31052 KB Output is correct
89 Correct 23 ms 31308 KB Output is correct
90 Correct 23 ms 31820 KB Output is correct
91 Correct 43 ms 33732 KB Output is correct
92 Correct 46 ms 34648 KB Output is correct
93 Correct 56 ms 35268 KB Output is correct
94 Correct 23 ms 29652 KB Output is correct
95 Correct 23 ms 29772 KB Output is correct
96 Correct 23 ms 29692 KB Output is correct
97 Correct 22 ms 29772 KB Output is correct
98 Correct 23 ms 29772 KB Output is correct
99 Correct 24 ms 31948 KB Output is correct
100 Correct 24 ms 31904 KB Output is correct
101 Correct 25 ms 31872 KB Output is correct
102 Correct 25 ms 31956 KB Output is correct
103 Correct 25 ms 31940 KB Output is correct
104 Correct 26 ms 31976 KB Output is correct
105 Correct 56 ms 35624 KB Output is correct
106 Correct 55 ms 35552 KB Output is correct
107 Correct 58 ms 35688 KB Output is correct
108 Correct 24 ms 29900 KB Output is correct
109 Correct 200 ms 68656 KB Output is correct
110 Correct 119 ms 52136 KB Output is correct
111 Correct 96 ms 50336 KB Output is correct
112 Correct 110 ms 52788 KB Output is correct
113 Correct 80 ms 45892 KB Output is correct
114 Correct 37 ms 33472 KB Output is correct
115 Correct 36 ms 33092 KB Output is correct
116 Correct 40 ms 33728 KB Output is correct
117 Correct 36 ms 32804 KB Output is correct
118 Correct 37 ms 33348 KB Output is correct
119 Correct 34 ms 33020 KB Output is correct
120 Correct 43 ms 33624 KB Output is correct
121 Correct 27 ms 30532 KB Output is correct
122 Correct 47 ms 33632 KB Output is correct
123 Correct 26 ms 30376 KB Output is correct
124 Correct 53 ms 34784 KB Output is correct
125 Correct 29 ms 30916 KB Output is correct
126 Correct 30 ms 31692 KB Output is correct
127 Correct 32 ms 32584 KB Output is correct
128 Correct 29 ms 31948 KB Output is correct
129 Correct 29 ms 31532 KB Output is correct
130 Correct 24 ms 29892 KB Output is correct
131 Correct 279 ms 96052 KB Output is correct
132 Correct 207 ms 78532 KB Output is correct
133 Correct 170 ms 61664 KB Output is correct
134 Correct 150 ms 62532 KB Output is correct
135 Correct 147 ms 62580 KB Output is correct
136 Correct 41 ms 34116 KB Output is correct
137 Correct 43 ms 34116 KB Output is correct
138 Correct 44 ms 34108 KB Output is correct
139 Correct 43 ms 34116 KB Output is correct
140 Correct 43 ms 34116 KB Output is correct
141 Correct 43 ms 34128 KB Output is correct
142 Correct 65 ms 36432 KB Output is correct
143 Correct 32 ms 31240 KB Output is correct
144 Correct 64 ms 36416 KB Output is correct
145 Correct 31 ms 31260 KB Output is correct
146 Correct 65 ms 36372 KB Output is correct
147 Correct 32 ms 31244 KB Output is correct
148 Correct 33 ms 33228 KB Output is correct
149 Correct 33 ms 33108 KB Output is correct
150 Correct 34 ms 33080 KB Output is correct
151 Correct 32 ms 32972 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 29228 KB Output is correct
2 Correct 20 ms 29212 KB Output is correct
3 Correct 21 ms 29260 KB Output is correct
4 Correct 20 ms 29260 KB Output is correct
5 Correct 20 ms 29300 KB Output is correct
6 Correct 21 ms 29232 KB Output is correct
7 Correct 20 ms 29260 KB Output is correct
8 Correct 20 ms 29264 KB Output is correct
9 Correct 21 ms 29260 KB Output is correct
10 Correct 21 ms 29220 KB Output is correct
11 Correct 22 ms 29260 KB Output is correct
12 Correct 21 ms 29260 KB Output is correct
13 Correct 20 ms 29260 KB Output is correct
14 Correct 21 ms 29196 KB Output is correct
15 Correct 22 ms 31628 KB Output is correct
16 Correct 22 ms 31696 KB Output is correct
17 Correct 24 ms 31688 KB Output is correct
18 Correct 22 ms 31696 KB Output is correct
19 Correct 21 ms 31692 KB Output is correct
20 Correct 22 ms 31692 KB Output is correct
21 Correct 22 ms 31656 KB Output is correct
22 Correct 23 ms 31620 KB Output is correct
23 Correct 22 ms 31692 KB Output is correct
24 Correct 44 ms 35780 KB Output is correct
25 Correct 46 ms 35696 KB Output is correct
26 Correct 45 ms 35772 KB Output is correct
27 Correct 23 ms 29708 KB Output is correct
28 Correct 23 ms 29776 KB Output is correct
29 Correct 24 ms 29764 KB Output is correct
30 Correct 24 ms 29652 KB Output is correct
31 Correct 24 ms 29616 KB Output is correct
32 Correct 23 ms 29612 KB Output is correct
33 Correct 31 ms 33228 KB Output is correct
34 Correct 31 ms 33200 KB Output is correct
35 Correct 31 ms 33236 KB Output is correct
36 Correct 31 ms 33096 KB Output is correct
37 Correct 31 ms 33100 KB Output is correct
38 Correct 34 ms 33204 KB Output is correct
39 Correct 52 ms 36388 KB Output is correct
40 Correct 55 ms 36292 KB Output is correct
41 Correct 52 ms 36292 KB Output is correct
42 Correct 34 ms 31512 KB Output is correct
43 Correct 29 ms 30592 KB Output is correct
44 Correct 38 ms 31240 KB Output is correct
45 Correct 30 ms 30500 KB Output is correct
46 Correct 30 ms 30284 KB Output is correct
47 Correct 35 ms 31176 KB Output is correct
48 Correct 74 ms 43316 KB Output is correct
49 Correct 52 ms 37836 KB Output is correct
50 Correct 57 ms 40544 KB Output is correct
51 Correct 80 ms 41284 KB Output is correct
52 Correct 78 ms 40884 KB Output is correct
53 Correct 67 ms 37788 KB Output is correct
54 Correct 38 ms 31684 KB Output is correct
55 Correct 36 ms 31660 KB Output is correct
56 Correct 37 ms 31212 KB Output is correct
57 Correct 35 ms 31164 KB Output is correct
58 Correct 37 ms 31044 KB Output is correct
59 Correct 34 ms 31172 KB Output is correct
60 Correct 79 ms 44176 KB Output is correct
61 Correct 82 ms 44136 KB Output is correct
62 Correct 80 ms 44172 KB Output is correct
63 Correct 82 ms 44164 KB Output is correct
64 Correct 83 ms 44244 KB Output is correct
65 Correct 78 ms 44244 KB Output is correct
66 Correct 116 ms 43788 KB Output is correct
67 Correct 99 ms 43716 KB Output is correct
68 Correct 98 ms 43716 KB Output is correct
69 Correct 20 ms 29264 KB Output is correct
70 Correct 20 ms 29308 KB Output is correct
71 Correct 20 ms 29260 KB Output is correct
72 Correct 20 ms 29260 KB Output is correct
73 Correct 22 ms 29260 KB Output is correct
74 Correct 20 ms 29260 KB Output is correct
75 Correct 21 ms 29260 KB Output is correct
76 Correct 21 ms 29324 KB Output is correct
77 Correct 21 ms 29348 KB Output is correct
78 Correct 22 ms 31308 KB Output is correct
79 Correct 21 ms 30796 KB Output is correct
80 Correct 21 ms 30608 KB Output is correct
81 Correct 22 ms 31580 KB Output is correct
82 Correct 21 ms 31160 KB Output is correct
83 Correct 22 ms 31320 KB Output is correct
84 Correct 20 ms 29260 KB Output is correct
85 Correct 22 ms 31020 KB Output is correct
86 Correct 21 ms 29260 KB Output is correct
87 Correct 22 ms 31456 KB Output is correct
88 Correct 22 ms 31464 KB Output is correct
89 Correct 20 ms 29208 KB Output is correct
90 Correct 21 ms 29400 KB Output is correct
91 Correct 21 ms 29296 KB Output is correct
92 Correct 22 ms 29388 KB Output is correct
93 Correct 21 ms 29372 KB Output is correct
94 Correct 21 ms 29260 KB Output is correct
95 Correct 25 ms 31716 KB Output is correct
96 Correct 22 ms 31672 KB Output is correct
97 Correct 22 ms 31624 KB Output is correct
98 Correct 22 ms 31692 KB Output is correct
99 Correct 24 ms 31692 KB Output is correct
100 Correct 22 ms 31696 KB Output is correct
101 Correct 22 ms 31612 KB Output is correct
102 Correct 20 ms 29368 KB Output is correct
103 Correct 23 ms 31652 KB Output is correct
104 Correct 20 ms 29352 KB Output is correct
105 Correct 22 ms 31656 KB Output is correct
106 Correct 21 ms 29260 KB Output is correct
107 Correct 21 ms 29516 KB Output is correct
108 Correct 21 ms 29344 KB Output is correct
109 Correct 22 ms 29532 KB Output is correct
110 Correct 21 ms 29388 KB Output is correct
111 Correct 21 ms 29516 KB Output is correct
112 Correct 24 ms 31520 KB Output is correct
113 Correct 24 ms 31132 KB Output is correct
114 Correct 24 ms 30924 KB Output is correct
115 Correct 23 ms 31052 KB Output is correct
116 Correct 23 ms 31308 KB Output is correct
117 Correct 23 ms 31820 KB Output is correct
118 Correct 43 ms 33732 KB Output is correct
119 Correct 46 ms 34648 KB Output is correct
120 Correct 56 ms 35268 KB Output is correct
121 Correct 23 ms 29652 KB Output is correct
122 Correct 23 ms 29772 KB Output is correct
123 Correct 23 ms 29692 KB Output is correct
124 Correct 22 ms 29772 KB Output is correct
125 Correct 23 ms 29772 KB Output is correct
126 Correct 24 ms 31948 KB Output is correct
127 Correct 24 ms 31904 KB Output is correct
128 Correct 25 ms 31872 KB Output is correct
129 Correct 25 ms 31956 KB Output is correct
130 Correct 25 ms 31940 KB Output is correct
131 Correct 26 ms 31976 KB Output is correct
132 Correct 56 ms 35624 KB Output is correct
133 Correct 55 ms 35552 KB Output is correct
134 Correct 58 ms 35688 KB Output is correct
135 Correct 24 ms 29900 KB Output is correct
136 Correct 200 ms 68656 KB Output is correct
137 Correct 119 ms 52136 KB Output is correct
138 Correct 96 ms 50336 KB Output is correct
139 Correct 110 ms 52788 KB Output is correct
140 Correct 80 ms 45892 KB Output is correct
141 Correct 37 ms 33472 KB Output is correct
142 Correct 36 ms 33092 KB Output is correct
143 Correct 40 ms 33728 KB Output is correct
144 Correct 36 ms 32804 KB Output is correct
145 Correct 37 ms 33348 KB Output is correct
146 Correct 34 ms 33020 KB Output is correct
147 Correct 43 ms 33624 KB Output is correct
148 Correct 27 ms 30532 KB Output is correct
149 Correct 47 ms 33632 KB Output is correct
150 Correct 26 ms 30376 KB Output is correct
151 Correct 53 ms 34784 KB Output is correct
152 Correct 29 ms 30916 KB Output is correct
153 Correct 30 ms 31692 KB Output is correct
154 Correct 32 ms 32584 KB Output is correct
155 Correct 29 ms 31948 KB Output is correct
156 Correct 29 ms 31532 KB Output is correct
157 Correct 24 ms 29892 KB Output is correct
158 Correct 279 ms 96052 KB Output is correct
159 Correct 207 ms 78532 KB Output is correct
160 Correct 170 ms 61664 KB Output is correct
161 Correct 150 ms 62532 KB Output is correct
162 Correct 147 ms 62580 KB Output is correct
163 Correct 41 ms 34116 KB Output is correct
164 Correct 43 ms 34116 KB Output is correct
165 Correct 44 ms 34108 KB Output is correct
166 Correct 43 ms 34116 KB Output is correct
167 Correct 43 ms 34116 KB Output is correct
168 Correct 43 ms 34128 KB Output is correct
169 Correct 65 ms 36432 KB Output is correct
170 Correct 32 ms 31240 KB Output is correct
171 Correct 64 ms 36416 KB Output is correct
172 Correct 31 ms 31260 KB Output is correct
173 Correct 65 ms 36372 KB Output is correct
174 Correct 32 ms 31244 KB Output is correct
175 Correct 33 ms 33228 KB Output is correct
176 Correct 33 ms 33108 KB Output is correct
177 Correct 34 ms 33080 KB Output is correct
178 Correct 32 ms 32972 KB Output is correct
179 Correct 30 ms 30920 KB Output is correct
180 Correct 547 ms 137288 KB Output is correct
181 Correct 642 ms 170052 KB Output is correct
182 Correct 787 ms 204312 KB Output is correct
183 Correct 407 ms 129132 KB Output is correct
184 Correct 336 ms 103428 KB Output is correct
185 Correct 56 ms 35392 KB Output is correct
186 Correct 55 ms 37532 KB Output is correct
187 Correct 66 ms 36676 KB Output is correct
188 Correct 70 ms 36044 KB Output is correct
189 Correct 68 ms 37136 KB Output is correct
190 Correct 77 ms 37516 KB Output is correct
191 Correct 71 ms 37948 KB Output is correct
192 Correct 55 ms 34812 KB Output is correct
193 Correct 51 ms 34876 KB Output is correct
194 Correct 38 ms 32040 KB Output is correct
195 Correct 1366 ms 290676 KB Output is correct
196 Correct 963 ms 231004 KB Output is correct
197 Correct 831 ms 220112 KB Output is correct
198 Correct 695 ms 186212 KB Output is correct
199 Correct 656 ms 189244 KB Output is correct
200 Correct 104 ms 45992 KB Output is correct
201 Correct 110 ms 46036 KB Output is correct
202 Correct 104 ms 45988 KB Output is correct
203 Correct 108 ms 45992 KB Output is correct
204 Correct 104 ms 46068 KB Output is correct
205 Correct 107 ms 46116 KB Output is correct
206 Correct 113 ms 45424 KB Output is correct
207 Correct 95 ms 45292 KB Output is correct
208 Correct 118 ms 45380 KB Output is correct
209 Correct 97 ms 45264 KB Output is correct
210 Correct 114 ms 45388 KB Output is correct
211 Correct 98 ms 45248 KB Output is correct
212 Correct 91 ms 45244 KB Output is correct
213 Correct 85 ms 41716 KB Output is correct
214 Correct 87 ms 41140 KB Output is correct
215 Correct 91 ms 40800 KB Output is correct