답안 #557294

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
557294 2022-05-05T05:46:37 Z Koosha_mv 벽 칠하기 (APIO20_paint) C++14
100 / 100
455 ms 16228 KB
#include <bits/stdc++.h>
using namespace std;
#define dbgv(v) cout<<#v<<" = "; f(i,0,v.size()) cout<<v[i]<<" "; cout<<endl
#define dbga(a,x,y) cout<<#a<<" = "; f(i,x,y) cout<<a[i]<<" "; cout<<endl
#define erorp(x) cout<<#x<<"={"<<x.F<<" , "<<x.S<<"}"<<endl
#define eror(x) cout<<#x<<'='<<(x)<<endl
#define f_(i,a,b) for(int i=a;i>=b;i--)
#define f(i,a,b) for(int i=a;i<b;i++)
#define nb(x) __builtin_popcount(x)
#define all(v) v.begin(),v.end()
#define bit(n,k) (((n)>>(k))&1)
#define Add(x,y) x=(x+y)%mod
#define maxm(a,b) a=max(a,b)
#define minm(a,b) a=min(a,b)
#define lst(x) x[x.size()-1]
#define sz(x) int(x.size())
#define mp make_pair
#define ll long long
#define pb push_back
#define S second
#define F first
#include "paint.h"

const int N=1e5+99;

int n,m,k,a[N],ps[N],last[N],col[N],pfx[N],sfx[N],fenwik[N];
vector<int> vec[N];

void add(int x, int val){ for(x++;x<N;x+=x&-x) minm(fenwik[x],val); }
int get(int x) { int res=N; for (x++;x>0;x-=x&-x) minm(res,fenwik[x]); return res; }

int minimumInstructions(int _n, int _m, int _k,vector<int> C,vector<int> B,vector<std::vector<int>> A) {
	n=_n,m=_m,k=_k;
	f(i,0,n) col[i]=C[i],vec[col[i]].pb(i);
	f(i,0,m){
		for(auto x : A[i]){
			for(auto indx : vec[x]){
				if(a[indx-1]==i || last[indx-1]==i){
					last[indx]=a[indx];
					a[indx]=i+1;
					pfx[indx-i]=i+1;
				}
			}	
		}
	}
	f(i,0,N) a[i]=last[i]=0;
	f(i,0,m){
		for(auto x : A[m-i-1]){
			for(auto indx : vec[x]){
				if(a[indx+1]==i || last[indx+1]==i){
					last[indx]=a[indx];
					a[indx]=i+1;
					sfx[indx+i]=i+1;
				}
			}
		}
	}
	//dbga(pfx,0,n);
	//dbga(sfx,0,n);
	f(i,0,n+1){
		int l,r=i+pfx[i];
		if(i==0) l=0;
		else l=i-sfx[i-1];
		r-=m;
		if(l<=r) ps[l]++,ps[r+1]--;
	}
	f(i,0,n) ps[i]+=ps[i-1];
	fill(fenwik,fenwik+N,N);
	add(n,0);
	f_(i,n-m,0){
		if(ps[i]){
			int res=get(i+m)+1;
			add(i,res);
		}
	}
	if(get(0)==N) return -1;
	return get(0);
}

/*
int32_t main(){
	ios:: sync_with_stdio(0), cin.tie(0), cout.tie(0);
	int n,m,k;
	vector<int> C,A;
	vector<vector<int>> B;
	cin>>n>>m>>k;
	f(i,0,n){
		int x;
		cin>>x;
		C.pb(x);
	}
	f(i,0,m){
		int x;
		cin>>x;
		A.pb(x);
	}
	f(i,0,m){
		vector<int> v;
		B.pb(v);
		f(j,0,A[i]){
			int x;
			cin>>x;
			B[i].pb(x);
		}
	}
	cout<<minimumInstructions(n,m,k,C,A,B);
}*/
/*
8 3 5
3 3 1 3 4 4 2 2
3 2 2
0 1 2
2 3
3 4
*/
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 3796 KB Output is correct
2 Correct 3 ms 3796 KB Output is correct
3 Correct 2 ms 3796 KB Output is correct
4 Correct 3 ms 3796 KB Output is correct
5 Correct 2 ms 3796 KB Output is correct
6 Correct 3 ms 3796 KB Output is correct
7 Correct 3 ms 3768 KB Output is correct
8 Correct 3 ms 3816 KB Output is correct
9 Correct 3 ms 3796 KB Output is correct
10 Correct 3 ms 3796 KB Output is correct
11 Correct 3 ms 3796 KB Output is correct
12 Correct 3 ms 3808 KB Output is correct
13 Correct 3 ms 3816 KB Output is correct
14 Correct 3 ms 3796 KB Output is correct
15 Correct 5 ms 3808 KB Output is correct
16 Correct 3 ms 3796 KB Output is correct
17 Correct 3 ms 3796 KB Output is correct
18 Correct 3 ms 3796 KB Output is correct
19 Correct 3 ms 3796 KB Output is correct
20 Correct 2 ms 3796 KB Output is correct
21 Correct 3 ms 3796 KB Output is correct
22 Correct 15 ms 5144 KB Output is correct
23 Correct 15 ms 5140 KB Output is correct
24 Correct 13 ms 5204 KB Output is correct
25 Correct 6 ms 4572 KB Output is correct
26 Correct 6 ms 4468 KB Output is correct
27 Correct 5 ms 4440 KB Output is correct
28 Correct 4 ms 4468 KB Output is correct
29 Correct 6 ms 4436 KB Output is correct
30 Correct 5 ms 4424 KB Output is correct
31 Correct 11 ms 5276 KB Output is correct
32 Correct 13 ms 5332 KB Output is correct
33 Correct 10 ms 5332 KB Output is correct
34 Correct 11 ms 5276 KB Output is correct
35 Correct 10 ms 5280 KB Output is correct
36 Correct 11 ms 5332 KB Output is correct
37 Correct 21 ms 6384 KB Output is correct
38 Correct 19 ms 6356 KB Output is correct
39 Correct 19 ms 6356 KB Output is correct
40 Correct 13 ms 6584 KB Output is correct
41 Correct 10 ms 5584 KB Output is correct
42 Correct 15 ms 6864 KB Output is correct
43 Correct 10 ms 5872 KB Output is correct
44 Correct 9 ms 5716 KB Output is correct
45 Correct 12 ms 7012 KB Output is correct
46 Correct 53 ms 14744 KB Output is correct
47 Correct 35 ms 9964 KB Output is correct
48 Correct 32 ms 12456 KB Output is correct
49 Correct 45 ms 11580 KB Output is correct
50 Correct 38 ms 11384 KB Output is correct
51 Correct 39 ms 9676 KB Output is correct
52 Correct 17 ms 6908 KB Output is correct
53 Correct 21 ms 6884 KB Output is correct
54 Correct 17 ms 6972 KB Output is correct
55 Correct 17 ms 6796 KB Output is correct
56 Correct 14 ms 6880 KB Output is correct
57 Correct 17 ms 6964 KB Output is correct
58 Correct 55 ms 15572 KB Output is correct
59 Correct 52 ms 15632 KB Output is correct
60 Correct 51 ms 15568 KB Output is correct
61 Correct 54 ms 15600 KB Output is correct
62 Correct 47 ms 15608 KB Output is correct
63 Correct 47 ms 15580 KB Output is correct
64 Correct 50 ms 13688 KB Output is correct
65 Correct 63 ms 13696 KB Output is correct
66 Correct 51 ms 13704 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 3796 KB Output is correct
2 Correct 3 ms 3796 KB Output is correct
3 Correct 2 ms 3796 KB Output is correct
4 Correct 3 ms 3796 KB Output is correct
5 Correct 2 ms 3796 KB Output is correct
6 Correct 3 ms 3796 KB Output is correct
7 Correct 3 ms 3768 KB Output is correct
8 Correct 3 ms 3816 KB Output is correct
9 Correct 3 ms 3796 KB Output is correct
10 Correct 3 ms 3796 KB Output is correct
11 Correct 3 ms 3796 KB Output is correct
12 Correct 3 ms 3808 KB Output is correct
13 Correct 3 ms 3816 KB Output is correct
14 Correct 3 ms 3796 KB Output is correct
15 Correct 5 ms 3808 KB Output is correct
16 Correct 3 ms 3796 KB Output is correct
17 Correct 3 ms 3796 KB Output is correct
18 Correct 3 ms 3796 KB Output is correct
19 Correct 3 ms 3796 KB Output is correct
20 Correct 2 ms 3796 KB Output is correct
21 Correct 3 ms 3796 KB Output is correct
22 Correct 2 ms 3796 KB Output is correct
23 Correct 2 ms 3796 KB Output is correct
24 Correct 2 ms 3816 KB Output is correct
25 Correct 2 ms 3812 KB Output is correct
26 Correct 2 ms 3812 KB Output is correct
27 Correct 2 ms 3812 KB Output is correct
28 Correct 2 ms 3800 KB Output is correct
29 Correct 2 ms 3796 KB Output is correct
30 Correct 3 ms 3812 KB Output is correct
31 Correct 3 ms 3796 KB Output is correct
32 Correct 3 ms 3812 KB Output is correct
33 Correct 2 ms 3812 KB Output is correct
34 Correct 2 ms 3796 KB Output is correct
35 Correct 2 ms 3796 KB Output is correct
36 Correct 3 ms 3796 KB Output is correct
37 Correct 2 ms 3816 KB Output is correct
38 Correct 3 ms 3796 KB Output is correct
39 Correct 3 ms 3796 KB Output is correct
40 Correct 2 ms 3796 KB Output is correct
41 Correct 3 ms 3796 KB Output is correct
42 Correct 3 ms 3876 KB Output is correct
43 Correct 3 ms 3796 KB Output is correct
44 Correct 2 ms 3796 KB Output is correct
45 Correct 3 ms 3796 KB Output is correct
46 Correct 2 ms 3796 KB Output is correct
47 Correct 2 ms 3796 KB Output is correct
48 Correct 2 ms 3804 KB Output is correct
49 Correct 2 ms 3796 KB Output is correct
50 Correct 3 ms 3796 KB Output is correct
51 Correct 3 ms 3816 KB Output is correct
52 Correct 2 ms 3796 KB Output is correct
53 Correct 3 ms 3796 KB Output is correct
54 Correct 3 ms 3896 KB Output is correct
55 Correct 4 ms 3796 KB Output is correct
56 Correct 3 ms 3796 KB Output is correct
57 Correct 3 ms 3820 KB Output is correct
58 Correct 3 ms 3796 KB Output is correct
59 Correct 3 ms 3796 KB Output is correct
60 Correct 3 ms 3816 KB Output is correct
61 Correct 3 ms 3796 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 3796 KB Output is correct
2 Correct 2 ms 3796 KB Output is correct
3 Correct 2 ms 3796 KB Output is correct
4 Correct 3 ms 3796 KB Output is correct
5 Correct 2 ms 3796 KB Output is correct
6 Correct 3 ms 3796 KB Output is correct
7 Correct 2 ms 3796 KB Output is correct
8 Correct 3 ms 3796 KB Output is correct
9 Correct 3 ms 3768 KB Output is correct
10 Correct 3 ms 3816 KB Output is correct
11 Correct 3 ms 3796 KB Output is correct
12 Correct 3 ms 3796 KB Output is correct
13 Correct 3 ms 3796 KB Output is correct
14 Correct 3 ms 3808 KB Output is correct
15 Correct 3 ms 3816 KB Output is correct
16 Correct 3 ms 3796 KB Output is correct
17 Correct 5 ms 3808 KB Output is correct
18 Correct 3 ms 3796 KB Output is correct
19 Correct 3 ms 3796 KB Output is correct
20 Correct 3 ms 3796 KB Output is correct
21 Correct 3 ms 3796 KB Output is correct
22 Correct 2 ms 3796 KB Output is correct
23 Correct 3 ms 3796 KB Output is correct
24 Correct 15 ms 5144 KB Output is correct
25 Correct 15 ms 5140 KB Output is correct
26 Correct 13 ms 5204 KB Output is correct
27 Correct 2 ms 3816 KB Output is correct
28 Correct 2 ms 3812 KB Output is correct
29 Correct 2 ms 3812 KB Output is correct
30 Correct 2 ms 3812 KB Output is correct
31 Correct 2 ms 3800 KB Output is correct
32 Correct 2 ms 3796 KB Output is correct
33 Correct 3 ms 3812 KB Output is correct
34 Correct 3 ms 3796 KB Output is correct
35 Correct 3 ms 3812 KB Output is correct
36 Correct 2 ms 3812 KB Output is correct
37 Correct 2 ms 3796 KB Output is correct
38 Correct 2 ms 3796 KB Output is correct
39 Correct 3 ms 3796 KB Output is correct
40 Correct 2 ms 3816 KB Output is correct
41 Correct 3 ms 3796 KB Output is correct
42 Correct 3 ms 3796 KB Output is correct
43 Correct 2 ms 3796 KB Output is correct
44 Correct 3 ms 3796 KB Output is correct
45 Correct 3 ms 3876 KB Output is correct
46 Correct 3 ms 3796 KB Output is correct
47 Correct 2 ms 3796 KB Output is correct
48 Correct 3 ms 3796 KB Output is correct
49 Correct 2 ms 3796 KB Output is correct
50 Correct 2 ms 3796 KB Output is correct
51 Correct 2 ms 3804 KB Output is correct
52 Correct 2 ms 3796 KB Output is correct
53 Correct 3 ms 3796 KB Output is correct
54 Correct 3 ms 3816 KB Output is correct
55 Correct 2 ms 3796 KB Output is correct
56 Correct 3 ms 3796 KB Output is correct
57 Correct 3 ms 3896 KB Output is correct
58 Correct 4 ms 3796 KB Output is correct
59 Correct 3 ms 3796 KB Output is correct
60 Correct 3 ms 3820 KB Output is correct
61 Correct 3 ms 3796 KB Output is correct
62 Correct 3 ms 3796 KB Output is correct
63 Correct 3 ms 3816 KB Output is correct
64 Correct 3 ms 3796 KB Output is correct
65 Correct 2 ms 3796 KB Output is correct
66 Correct 3 ms 3812 KB Output is correct
67 Correct 3 ms 3796 KB Output is correct
68 Correct 3 ms 3796 KB Output is correct
69 Correct 3 ms 3796 KB Output is correct
70 Correct 5 ms 3948 KB Output is correct
71 Correct 4 ms 3924 KB Output is correct
72 Correct 5 ms 3952 KB Output is correct
73 Correct 3 ms 3944 KB Output is correct
74 Correct 4 ms 3952 KB Output is correct
75 Correct 4 ms 3956 KB Output is correct
76 Correct 20 ms 5324 KB Output is correct
77 Correct 19 ms 5496 KB Output is correct
78 Correct 23 ms 5708 KB Output is correct
79 Correct 3 ms 3796 KB Output is correct
80 Correct 3 ms 3796 KB Output is correct
81 Correct 3 ms 3812 KB Output is correct
82 Correct 3 ms 3796 KB Output is correct
83 Correct 3 ms 3796 KB Output is correct
84 Correct 4 ms 4052 KB Output is correct
85 Correct 4 ms 4052 KB Output is correct
86 Correct 4 ms 4052 KB Output is correct
87 Correct 4 ms 4052 KB Output is correct
88 Correct 5 ms 4052 KB Output is correct
89 Correct 5 ms 4056 KB Output is correct
90 Correct 23 ms 5896 KB Output is correct
91 Correct 20 ms 5996 KB Output is correct
92 Correct 25 ms 5964 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 3796 KB Output is correct
2 Correct 2 ms 3796 KB Output is correct
3 Correct 2 ms 3796 KB Output is correct
4 Correct 3 ms 3796 KB Output is correct
5 Correct 2 ms 3796 KB Output is correct
6 Correct 3 ms 3796 KB Output is correct
7 Correct 2 ms 3796 KB Output is correct
8 Correct 3 ms 3796 KB Output is correct
9 Correct 3 ms 3768 KB Output is correct
10 Correct 3 ms 3816 KB Output is correct
11 Correct 3 ms 3796 KB Output is correct
12 Correct 3 ms 3796 KB Output is correct
13 Correct 3 ms 3796 KB Output is correct
14 Correct 3 ms 3808 KB Output is correct
15 Correct 3 ms 3816 KB Output is correct
16 Correct 3 ms 3796 KB Output is correct
17 Correct 5 ms 3808 KB Output is correct
18 Correct 3 ms 3796 KB Output is correct
19 Correct 3 ms 3796 KB Output is correct
20 Correct 3 ms 3796 KB Output is correct
21 Correct 3 ms 3796 KB Output is correct
22 Correct 2 ms 3796 KB Output is correct
23 Correct 3 ms 3796 KB Output is correct
24 Correct 15 ms 5144 KB Output is correct
25 Correct 15 ms 5140 KB Output is correct
26 Correct 13 ms 5204 KB Output is correct
27 Correct 6 ms 4572 KB Output is correct
28 Correct 6 ms 4468 KB Output is correct
29 Correct 5 ms 4440 KB Output is correct
30 Correct 4 ms 4468 KB Output is correct
31 Correct 6 ms 4436 KB Output is correct
32 Correct 5 ms 4424 KB Output is correct
33 Correct 11 ms 5276 KB Output is correct
34 Correct 13 ms 5332 KB Output is correct
35 Correct 10 ms 5332 KB Output is correct
36 Correct 11 ms 5276 KB Output is correct
37 Correct 10 ms 5280 KB Output is correct
38 Correct 11 ms 5332 KB Output is correct
39 Correct 21 ms 6384 KB Output is correct
40 Correct 19 ms 6356 KB Output is correct
41 Correct 19 ms 6356 KB Output is correct
42 Correct 2 ms 3816 KB Output is correct
43 Correct 2 ms 3812 KB Output is correct
44 Correct 2 ms 3812 KB Output is correct
45 Correct 2 ms 3812 KB Output is correct
46 Correct 2 ms 3800 KB Output is correct
47 Correct 2 ms 3796 KB Output is correct
48 Correct 3 ms 3812 KB Output is correct
49 Correct 3 ms 3796 KB Output is correct
50 Correct 3 ms 3812 KB Output is correct
51 Correct 2 ms 3812 KB Output is correct
52 Correct 2 ms 3796 KB Output is correct
53 Correct 2 ms 3796 KB Output is correct
54 Correct 3 ms 3796 KB Output is correct
55 Correct 2 ms 3816 KB Output is correct
56 Correct 3 ms 3796 KB Output is correct
57 Correct 3 ms 3796 KB Output is correct
58 Correct 2 ms 3796 KB Output is correct
59 Correct 3 ms 3796 KB Output is correct
60 Correct 3 ms 3876 KB Output is correct
61 Correct 3 ms 3796 KB Output is correct
62 Correct 2 ms 3796 KB Output is correct
63 Correct 3 ms 3796 KB Output is correct
64 Correct 2 ms 3796 KB Output is correct
65 Correct 2 ms 3796 KB Output is correct
66 Correct 2 ms 3804 KB Output is correct
67 Correct 2 ms 3796 KB Output is correct
68 Correct 3 ms 3796 KB Output is correct
69 Correct 3 ms 3816 KB Output is correct
70 Correct 2 ms 3796 KB Output is correct
71 Correct 3 ms 3796 KB Output is correct
72 Correct 3 ms 3896 KB Output is correct
73 Correct 4 ms 3796 KB Output is correct
74 Correct 3 ms 3796 KB Output is correct
75 Correct 3 ms 3820 KB Output is correct
76 Correct 3 ms 3796 KB Output is correct
77 Correct 3 ms 3796 KB Output is correct
78 Correct 3 ms 3816 KB Output is correct
79 Correct 3 ms 3796 KB Output is correct
80 Correct 2 ms 3796 KB Output is correct
81 Correct 3 ms 3812 KB Output is correct
82 Correct 3 ms 3796 KB Output is correct
83 Correct 3 ms 3796 KB Output is correct
84 Correct 3 ms 3796 KB Output is correct
85 Correct 5 ms 3948 KB Output is correct
86 Correct 4 ms 3924 KB Output is correct
87 Correct 5 ms 3952 KB Output is correct
88 Correct 3 ms 3944 KB Output is correct
89 Correct 4 ms 3952 KB Output is correct
90 Correct 4 ms 3956 KB Output is correct
91 Correct 20 ms 5324 KB Output is correct
92 Correct 19 ms 5496 KB Output is correct
93 Correct 23 ms 5708 KB Output is correct
94 Correct 3 ms 3796 KB Output is correct
95 Correct 3 ms 3796 KB Output is correct
96 Correct 3 ms 3812 KB Output is correct
97 Correct 3 ms 3796 KB Output is correct
98 Correct 3 ms 3796 KB Output is correct
99 Correct 4 ms 4052 KB Output is correct
100 Correct 4 ms 4052 KB Output is correct
101 Correct 4 ms 4052 KB Output is correct
102 Correct 4 ms 4052 KB Output is correct
103 Correct 5 ms 4052 KB Output is correct
104 Correct 5 ms 4056 KB Output is correct
105 Correct 23 ms 5896 KB Output is correct
106 Correct 20 ms 5996 KB Output is correct
107 Correct 25 ms 5964 KB Output is correct
108 Correct 8 ms 4564 KB Output is correct
109 Correct 67 ms 4384 KB Output is correct
110 Correct 13 ms 4268 KB Output is correct
111 Correct 9 ms 4208 KB Output is correct
112 Correct 11 ms 4388 KB Output is correct
113 Correct 9 ms 4304 KB Output is correct
114 Correct 14 ms 5260 KB Output is correct
115 Correct 14 ms 5224 KB Output is correct
116 Correct 21 ms 6016 KB Output is correct
117 Correct 15 ms 5236 KB Output is correct
118 Correct 16 ms 5400 KB Output is correct
119 Correct 14 ms 5304 KB Output is correct
120 Correct 15 ms 5828 KB Output is correct
121 Correct 7 ms 4608 KB Output is correct
122 Correct 27 ms 6052 KB Output is correct
123 Correct 6 ms 4592 KB Output is correct
124 Correct 19 ms 6548 KB Output is correct
125 Correct 10 ms 4980 KB Output is correct
126 Correct 9 ms 5076 KB Output is correct
127 Correct 13 ms 5332 KB Output is correct
128 Correct 8 ms 4948 KB Output is correct
129 Correct 11 ms 4952 KB Output is correct
130 Correct 5 ms 4572 KB Output is correct
131 Correct 86 ms 4548 KB Output is correct
132 Correct 20 ms 4556 KB Output is correct
133 Correct 15 ms 4564 KB Output is correct
134 Correct 19 ms 4576 KB Output is correct
135 Correct 14 ms 4564 KB Output is correct
136 Correct 19 ms 6228 KB Output is correct
137 Correct 21 ms 6280 KB Output is correct
138 Correct 20 ms 6356 KB Output is correct
139 Correct 22 ms 6292 KB Output is correct
140 Correct 28 ms 6200 KB Output is correct
141 Correct 21 ms 6220 KB Output is correct
142 Correct 24 ms 7156 KB Output is correct
143 Correct 10 ms 5136 KB Output is correct
144 Correct 23 ms 7116 KB Output is correct
145 Correct 10 ms 5076 KB Output is correct
146 Correct 24 ms 7172 KB Output is correct
147 Correct 11 ms 5076 KB Output is correct
148 Correct 11 ms 5588 KB Output is correct
149 Correct 15 ms 5496 KB Output is correct
150 Correct 11 ms 5452 KB Output is correct
151 Correct 11 ms 5388 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 3796 KB Output is correct
2 Correct 2 ms 3796 KB Output is correct
3 Correct 2 ms 3796 KB Output is correct
4 Correct 3 ms 3796 KB Output is correct
5 Correct 2 ms 3796 KB Output is correct
6 Correct 3 ms 3796 KB Output is correct
7 Correct 2 ms 3796 KB Output is correct
8 Correct 3 ms 3796 KB Output is correct
9 Correct 3 ms 3768 KB Output is correct
10 Correct 3 ms 3816 KB Output is correct
11 Correct 3 ms 3796 KB Output is correct
12 Correct 3 ms 3796 KB Output is correct
13 Correct 3 ms 3796 KB Output is correct
14 Correct 3 ms 3808 KB Output is correct
15 Correct 3 ms 3816 KB Output is correct
16 Correct 3 ms 3796 KB Output is correct
17 Correct 5 ms 3808 KB Output is correct
18 Correct 3 ms 3796 KB Output is correct
19 Correct 3 ms 3796 KB Output is correct
20 Correct 3 ms 3796 KB Output is correct
21 Correct 3 ms 3796 KB Output is correct
22 Correct 2 ms 3796 KB Output is correct
23 Correct 3 ms 3796 KB Output is correct
24 Correct 15 ms 5144 KB Output is correct
25 Correct 15 ms 5140 KB Output is correct
26 Correct 13 ms 5204 KB Output is correct
27 Correct 6 ms 4572 KB Output is correct
28 Correct 6 ms 4468 KB Output is correct
29 Correct 5 ms 4440 KB Output is correct
30 Correct 4 ms 4468 KB Output is correct
31 Correct 6 ms 4436 KB Output is correct
32 Correct 5 ms 4424 KB Output is correct
33 Correct 11 ms 5276 KB Output is correct
34 Correct 13 ms 5332 KB Output is correct
35 Correct 10 ms 5332 KB Output is correct
36 Correct 11 ms 5276 KB Output is correct
37 Correct 10 ms 5280 KB Output is correct
38 Correct 11 ms 5332 KB Output is correct
39 Correct 21 ms 6384 KB Output is correct
40 Correct 19 ms 6356 KB Output is correct
41 Correct 19 ms 6356 KB Output is correct
42 Correct 13 ms 6584 KB Output is correct
43 Correct 10 ms 5584 KB Output is correct
44 Correct 15 ms 6864 KB Output is correct
45 Correct 10 ms 5872 KB Output is correct
46 Correct 9 ms 5716 KB Output is correct
47 Correct 12 ms 7012 KB Output is correct
48 Correct 53 ms 14744 KB Output is correct
49 Correct 35 ms 9964 KB Output is correct
50 Correct 32 ms 12456 KB Output is correct
51 Correct 45 ms 11580 KB Output is correct
52 Correct 38 ms 11384 KB Output is correct
53 Correct 39 ms 9676 KB Output is correct
54 Correct 17 ms 6908 KB Output is correct
55 Correct 21 ms 6884 KB Output is correct
56 Correct 17 ms 6972 KB Output is correct
57 Correct 17 ms 6796 KB Output is correct
58 Correct 14 ms 6880 KB Output is correct
59 Correct 17 ms 6964 KB Output is correct
60 Correct 55 ms 15572 KB Output is correct
61 Correct 52 ms 15632 KB Output is correct
62 Correct 51 ms 15568 KB Output is correct
63 Correct 54 ms 15600 KB Output is correct
64 Correct 47 ms 15608 KB Output is correct
65 Correct 47 ms 15580 KB Output is correct
66 Correct 50 ms 13688 KB Output is correct
67 Correct 63 ms 13696 KB Output is correct
68 Correct 51 ms 13704 KB Output is correct
69 Correct 2 ms 3816 KB Output is correct
70 Correct 2 ms 3812 KB Output is correct
71 Correct 2 ms 3812 KB Output is correct
72 Correct 2 ms 3812 KB Output is correct
73 Correct 2 ms 3800 KB Output is correct
74 Correct 2 ms 3796 KB Output is correct
75 Correct 3 ms 3812 KB Output is correct
76 Correct 3 ms 3796 KB Output is correct
77 Correct 3 ms 3812 KB Output is correct
78 Correct 2 ms 3812 KB Output is correct
79 Correct 2 ms 3796 KB Output is correct
80 Correct 2 ms 3796 KB Output is correct
81 Correct 3 ms 3796 KB Output is correct
82 Correct 2 ms 3816 KB Output is correct
83 Correct 3 ms 3796 KB Output is correct
84 Correct 3 ms 3796 KB Output is correct
85 Correct 2 ms 3796 KB Output is correct
86 Correct 3 ms 3796 KB Output is correct
87 Correct 3 ms 3876 KB Output is correct
88 Correct 3 ms 3796 KB Output is correct
89 Correct 2 ms 3796 KB Output is correct
90 Correct 3 ms 3796 KB Output is correct
91 Correct 2 ms 3796 KB Output is correct
92 Correct 2 ms 3796 KB Output is correct
93 Correct 2 ms 3804 KB Output is correct
94 Correct 2 ms 3796 KB Output is correct
95 Correct 3 ms 3796 KB Output is correct
96 Correct 3 ms 3816 KB Output is correct
97 Correct 2 ms 3796 KB Output is correct
98 Correct 3 ms 3796 KB Output is correct
99 Correct 3 ms 3896 KB Output is correct
100 Correct 4 ms 3796 KB Output is correct
101 Correct 3 ms 3796 KB Output is correct
102 Correct 3 ms 3820 KB Output is correct
103 Correct 3 ms 3796 KB Output is correct
104 Correct 3 ms 3796 KB Output is correct
105 Correct 3 ms 3816 KB Output is correct
106 Correct 3 ms 3796 KB Output is correct
107 Correct 2 ms 3796 KB Output is correct
108 Correct 3 ms 3812 KB Output is correct
109 Correct 3 ms 3796 KB Output is correct
110 Correct 3 ms 3796 KB Output is correct
111 Correct 3 ms 3796 KB Output is correct
112 Correct 5 ms 3948 KB Output is correct
113 Correct 4 ms 3924 KB Output is correct
114 Correct 5 ms 3952 KB Output is correct
115 Correct 3 ms 3944 KB Output is correct
116 Correct 4 ms 3952 KB Output is correct
117 Correct 4 ms 3956 KB Output is correct
118 Correct 20 ms 5324 KB Output is correct
119 Correct 19 ms 5496 KB Output is correct
120 Correct 23 ms 5708 KB Output is correct
121 Correct 3 ms 3796 KB Output is correct
122 Correct 3 ms 3796 KB Output is correct
123 Correct 3 ms 3812 KB Output is correct
124 Correct 3 ms 3796 KB Output is correct
125 Correct 3 ms 3796 KB Output is correct
126 Correct 4 ms 4052 KB Output is correct
127 Correct 4 ms 4052 KB Output is correct
128 Correct 4 ms 4052 KB Output is correct
129 Correct 4 ms 4052 KB Output is correct
130 Correct 5 ms 4052 KB Output is correct
131 Correct 5 ms 4056 KB Output is correct
132 Correct 23 ms 5896 KB Output is correct
133 Correct 20 ms 5996 KB Output is correct
134 Correct 25 ms 5964 KB Output is correct
135 Correct 8 ms 4564 KB Output is correct
136 Correct 67 ms 4384 KB Output is correct
137 Correct 13 ms 4268 KB Output is correct
138 Correct 9 ms 4208 KB Output is correct
139 Correct 11 ms 4388 KB Output is correct
140 Correct 9 ms 4304 KB Output is correct
141 Correct 14 ms 5260 KB Output is correct
142 Correct 14 ms 5224 KB Output is correct
143 Correct 21 ms 6016 KB Output is correct
144 Correct 15 ms 5236 KB Output is correct
145 Correct 16 ms 5400 KB Output is correct
146 Correct 14 ms 5304 KB Output is correct
147 Correct 15 ms 5828 KB Output is correct
148 Correct 7 ms 4608 KB Output is correct
149 Correct 27 ms 6052 KB Output is correct
150 Correct 6 ms 4592 KB Output is correct
151 Correct 19 ms 6548 KB Output is correct
152 Correct 10 ms 4980 KB Output is correct
153 Correct 9 ms 5076 KB Output is correct
154 Correct 13 ms 5332 KB Output is correct
155 Correct 8 ms 4948 KB Output is correct
156 Correct 11 ms 4952 KB Output is correct
157 Correct 5 ms 4572 KB Output is correct
158 Correct 86 ms 4548 KB Output is correct
159 Correct 20 ms 4556 KB Output is correct
160 Correct 15 ms 4564 KB Output is correct
161 Correct 19 ms 4576 KB Output is correct
162 Correct 14 ms 4564 KB Output is correct
163 Correct 19 ms 6228 KB Output is correct
164 Correct 21 ms 6280 KB Output is correct
165 Correct 20 ms 6356 KB Output is correct
166 Correct 22 ms 6292 KB Output is correct
167 Correct 28 ms 6200 KB Output is correct
168 Correct 21 ms 6220 KB Output is correct
169 Correct 24 ms 7156 KB Output is correct
170 Correct 10 ms 5136 KB Output is correct
171 Correct 23 ms 7116 KB Output is correct
172 Correct 10 ms 5076 KB Output is correct
173 Correct 24 ms 7172 KB Output is correct
174 Correct 11 ms 5076 KB Output is correct
175 Correct 11 ms 5588 KB Output is correct
176 Correct 15 ms 5496 KB Output is correct
177 Correct 11 ms 5452 KB Output is correct
178 Correct 11 ms 5388 KB Output is correct
179 Correct 11 ms 5712 KB Output is correct
180 Correct 180 ms 5468 KB Output is correct
181 Correct 61 ms 6316 KB Output is correct
182 Correct 71 ms 6984 KB Output is correct
183 Correct 40 ms 6076 KB Output is correct
184 Correct 40 ms 5920 KB Output is correct
185 Correct 33 ms 8448 KB Output is correct
186 Correct 29 ms 9872 KB Output is correct
187 Correct 36 ms 9316 KB Output is correct
188 Correct 38 ms 9244 KB Output is correct
189 Correct 43 ms 9204 KB Output is correct
190 Correct 36 ms 9816 KB Output is correct
191 Correct 47 ms 9596 KB Output is correct
192 Correct 25 ms 8264 KB Output is correct
193 Correct 28 ms 7956 KB Output is correct
194 Correct 15 ms 6860 KB Output is correct
195 Correct 455 ms 6964 KB Output is correct
196 Correct 98 ms 6988 KB Output is correct
197 Correct 68 ms 7008 KB Output is correct
198 Correct 61 ms 7136 KB Output is correct
199 Correct 60 ms 7216 KB Output is correct
200 Correct 67 ms 16204 KB Output is correct
201 Correct 82 ms 16224 KB Output is correct
202 Correct 65 ms 16136 KB Output is correct
203 Correct 60 ms 16228 KB Output is correct
204 Correct 63 ms 16184 KB Output is correct
205 Correct 62 ms 16216 KB Output is correct
206 Correct 85 ms 14604 KB Output is correct
207 Correct 74 ms 14452 KB Output is correct
208 Correct 55 ms 14556 KB Output is correct
209 Correct 63 ms 14432 KB Output is correct
210 Correct 57 ms 14548 KB Output is correct
211 Correct 72 ms 14520 KB Output is correct
212 Correct 67 ms 15896 KB Output is correct
213 Correct 60 ms 12916 KB Output is correct
214 Correct 55 ms 12472 KB Output is correct
215 Correct 54 ms 12356 KB Output is correct