#ifndef memset0
#include"paint.h"
#endif
#include<bits/stdc++.h>
const int N=1e5+10;
int n,m,k,l[N],r[N],c[N],a[N],sum[N];
std::set<int> s[N];
std::vector<int> b[N];
struct node{
int mid,l,r,min;
}p[N<<2];
void build(int u,int l,int r){
p[u].l=l,p[u].r=r,p[u].mid=(l+r)>>1,p[u].min=1e9;
if(l==r){
return;
}
build(u<<1,l,p[u].mid);
build(u<<1|1,p[u].mid+1,r);
}
void modify(int u,int k,int w){
if(p[u].l==p[u].r){
p[u].min=w;
return;
}
modify(k<=p[u].mid?(u<<1):(u<<1|1),k,w);
p[u].min=std::min(p[u<<1].min,p[u<<1|1].min);
}
int query(int u,int l,int r){
if(p[u].l==l&&p[u].r==r){
return p[u].min;
}
if(r<=p[u].mid)return query(u<<1,l,r);
if(l>p[u].mid)return query(u<<1|1,l,r);
return std::min(query(u<<1,l,p[u].mid),query(u<<1|1,p[u].mid+1,r));
}
int minimumInstructions(int N,int M,int K,std::vector<int> C,std::vector<int> A,std::vector<std::vector<int>> B){
n=N,m=M,k=K;
for(int i=0;i<n;i++)c[i]=C[i];
for(int i=0;i<m;i++){
a[i]=A[i],b[i]=B[i];
for(int x:b[i])s[i].insert(x);
}
std::vector<int> p,q;
for(int i=0;i<n;i++)p.push_back(i);
for(int i=0;i<m;i++){
q=p,p.clear();
for(int x:q)if(s[i].count(c[x+i])&&x+i<n)r[x]++,p.push_back(x);
}
p.clear();
for(int i=0;i<n;i++)p.push_back(i);
for(int i=0;i<m;i++){
q=p,p.clear();
for(int x:q)if(s[m-1-i].count(c[x-i])&&x-i>=0)l[x]++,p.push_back(x);
}
const auto upd=[&](int l,int r){
l=std::max(l,0)+m-1;
r=std::min(r,n-1);
if(l<=r)sum[l]++,sum[r+1]--;
};
for(int i=0;i<n;i++)upd(i-l[i]+1,i);
for(int i=0;i<n;i++)upd(i,i+r[i]-1);
for(int i=0;i+1<n;i++)upd(i-l[i]+1,i+r[i+1]);
for(int i=1;i<n;i++)sum[i]=sum[i-1]+sum[i];
build(1,0,n);
modify(1,0,0);
for(int i=m;i<=n;i++)if(sum[i-1]){
modify(1,i,1+query(1,i-m,i-1));
}
int ans=query(1,n,n);
return ans<1e9?ans:-1;
}
#ifdef memset0
int main() {
freopen("../examples/01.in","r",stdin);
int N, M, K;
assert(3 == scanf("%d %d %d", &N, &M, &K));
std::vector<int> C(N);
for (int i = 0; i < N; ++i) {
assert(1 == scanf("%d", &C[i]));
}
std::vector<int> A(M);
std::vector<std::vector<int>> B(M);
for (int i = 0; i < M; ++i) {
assert(1 == scanf("%d", &A[i]));
B[i].resize(A[i]);
for (int j = 0; j < A[i]; ++j) {
assert(1 == scanf("%d", &B[i][j]));
}
}
int minimum_instructions = minimumInstructions(N, M, K, C, A, B);
printf("%d\n", minimum_instructions);
return 0;
}
#endif
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7252 KB |
Output is correct |
3 |
Correct |
4 ms |
7380 KB |
Output is correct |
4 |
Correct |
3 ms |
7380 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
5 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7380 KB |
Output is correct |
10 |
Correct |
4 ms |
7412 KB |
Output is correct |
11 |
Correct |
5 ms |
7408 KB |
Output is correct |
12 |
Correct |
4 ms |
7380 KB |
Output is correct |
13 |
Correct |
4 ms |
7368 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7368 KB |
Output is correct |
16 |
Correct |
4 ms |
7380 KB |
Output is correct |
17 |
Correct |
4 ms |
7360 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7372 KB |
Output is correct |
21 |
Correct |
4 ms |
7372 KB |
Output is correct |
22 |
Correct |
24 ms |
13860 KB |
Output is correct |
23 |
Correct |
23 ms |
13816 KB |
Output is correct |
24 |
Correct |
24 ms |
13860 KB |
Output is correct |
25 |
Correct |
8 ms |
9044 KB |
Output is correct |
26 |
Correct |
10 ms |
9036 KB |
Output is correct |
27 |
Correct |
8 ms |
9044 KB |
Output is correct |
28 |
Correct |
7 ms |
9044 KB |
Output is correct |
29 |
Correct |
7 ms |
9044 KB |
Output is correct |
30 |
Correct |
6 ms |
9044 KB |
Output is correct |
31 |
Correct |
16 ms |
10488 KB |
Output is correct |
32 |
Correct |
16 ms |
10572 KB |
Output is correct |
33 |
Correct |
16 ms |
10452 KB |
Output is correct |
34 |
Correct |
15 ms |
10484 KB |
Output is correct |
35 |
Correct |
16 ms |
10500 KB |
Output is correct |
36 |
Correct |
16 ms |
10576 KB |
Output is correct |
37 |
Correct |
26 ms |
15656 KB |
Output is correct |
38 |
Correct |
28 ms |
15744 KB |
Output is correct |
39 |
Correct |
25 ms |
15640 KB |
Output is correct |
40 |
Correct |
30 ms |
14536 KB |
Output is correct |
41 |
Correct |
20 ms |
11344 KB |
Output is correct |
42 |
Correct |
33 ms |
14856 KB |
Output is correct |
43 |
Correct |
15 ms |
11724 KB |
Output is correct |
44 |
Correct |
14 ms |
11528 KB |
Output is correct |
45 |
Correct |
18 ms |
14924 KB |
Output is correct |
46 |
Correct |
62 ms |
26108 KB |
Output is correct |
47 |
Correct |
35 ms |
17880 KB |
Output is correct |
48 |
Correct |
34 ms |
21160 KB |
Output is correct |
49 |
Correct |
38 ms |
21756 KB |
Output is correct |
50 |
Correct |
39 ms |
23436 KB |
Output is correct |
51 |
Correct |
38 ms |
20588 KB |
Output is correct |
52 |
Correct |
35 ms |
14984 KB |
Output is correct |
53 |
Correct |
32 ms |
14912 KB |
Output is correct |
54 |
Correct |
28 ms |
14908 KB |
Output is correct |
55 |
Correct |
20 ms |
14872 KB |
Output is correct |
56 |
Correct |
18 ms |
14868 KB |
Output is correct |
57 |
Correct |
17 ms |
14792 KB |
Output is correct |
58 |
Correct |
62 ms |
27460 KB |
Output is correct |
59 |
Correct |
62 ms |
27444 KB |
Output is correct |
60 |
Correct |
66 ms |
27588 KB |
Output is correct |
61 |
Correct |
63 ms |
27476 KB |
Output is correct |
62 |
Correct |
62 ms |
27476 KB |
Output is correct |
63 |
Correct |
81 ms |
27464 KB |
Output is correct |
64 |
Correct |
59 ms |
26484 KB |
Output is correct |
65 |
Correct |
46 ms |
26424 KB |
Output is correct |
66 |
Correct |
46 ms |
26512 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7252 KB |
Output is correct |
3 |
Correct |
4 ms |
7380 KB |
Output is correct |
4 |
Correct |
3 ms |
7380 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
5 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7380 KB |
Output is correct |
10 |
Correct |
4 ms |
7412 KB |
Output is correct |
11 |
Correct |
5 ms |
7408 KB |
Output is correct |
12 |
Correct |
4 ms |
7380 KB |
Output is correct |
13 |
Correct |
4 ms |
7368 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7368 KB |
Output is correct |
16 |
Correct |
4 ms |
7380 KB |
Output is correct |
17 |
Correct |
4 ms |
7360 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7372 KB |
Output is correct |
21 |
Correct |
4 ms |
7372 KB |
Output is correct |
22 |
Correct |
3 ms |
7380 KB |
Output is correct |
23 |
Correct |
4 ms |
7380 KB |
Output is correct |
24 |
Correct |
5 ms |
7368 KB |
Output is correct |
25 |
Correct |
3 ms |
7380 KB |
Output is correct |
26 |
Correct |
4 ms |
7380 KB |
Output is correct |
27 |
Correct |
4 ms |
7364 KB |
Output is correct |
28 |
Correct |
4 ms |
7356 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
3 ms |
7392 KB |
Output is correct |
31 |
Correct |
4 ms |
7380 KB |
Output is correct |
32 |
Correct |
4 ms |
7360 KB |
Output is correct |
33 |
Correct |
4 ms |
7364 KB |
Output is correct |
34 |
Correct |
4 ms |
7380 KB |
Output is correct |
35 |
Correct |
4 ms |
7380 KB |
Output is correct |
36 |
Correct |
6 ms |
7368 KB |
Output is correct |
37 |
Correct |
4 ms |
7364 KB |
Output is correct |
38 |
Correct |
4 ms |
7452 KB |
Output is correct |
39 |
Correct |
7 ms |
7380 KB |
Output is correct |
40 |
Correct |
6 ms |
7380 KB |
Output is correct |
41 |
Correct |
4 ms |
7364 KB |
Output is correct |
42 |
Correct |
6 ms |
7380 KB |
Output is correct |
43 |
Correct |
4 ms |
7380 KB |
Output is correct |
44 |
Correct |
4 ms |
7380 KB |
Output is correct |
45 |
Correct |
4 ms |
7364 KB |
Output is correct |
46 |
Correct |
6 ms |
7364 KB |
Output is correct |
47 |
Correct |
5 ms |
7380 KB |
Output is correct |
48 |
Correct |
4 ms |
7380 KB |
Output is correct |
49 |
Correct |
5 ms |
7380 KB |
Output is correct |
50 |
Correct |
6 ms |
7380 KB |
Output is correct |
51 |
Correct |
5 ms |
7368 KB |
Output is correct |
52 |
Correct |
4 ms |
7368 KB |
Output is correct |
53 |
Correct |
6 ms |
7380 KB |
Output is correct |
54 |
Correct |
4 ms |
7380 KB |
Output is correct |
55 |
Correct |
4 ms |
7380 KB |
Output is correct |
56 |
Correct |
4 ms |
7380 KB |
Output is correct |
57 |
Correct |
6 ms |
7380 KB |
Output is correct |
58 |
Correct |
6 ms |
7368 KB |
Output is correct |
59 |
Correct |
5 ms |
7380 KB |
Output is correct |
60 |
Correct |
6 ms |
7472 KB |
Output is correct |
61 |
Correct |
4 ms |
7404 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
3 ms |
7380 KB |
Output is correct |
4 |
Correct |
4 ms |
7252 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
3 ms |
7380 KB |
Output is correct |
7 |
Correct |
4 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
5 ms |
7380 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
4 ms |
7412 KB |
Output is correct |
13 |
Correct |
5 ms |
7408 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7368 KB |
Output is correct |
16 |
Correct |
4 ms |
7380 KB |
Output is correct |
17 |
Correct |
4 ms |
7368 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7360 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
4 ms |
7372 KB |
Output is correct |
23 |
Correct |
4 ms |
7372 KB |
Output is correct |
24 |
Correct |
24 ms |
13860 KB |
Output is correct |
25 |
Correct |
23 ms |
13816 KB |
Output is correct |
26 |
Correct |
24 ms |
13860 KB |
Output is correct |
27 |
Correct |
5 ms |
7368 KB |
Output is correct |
28 |
Correct |
3 ms |
7380 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7364 KB |
Output is correct |
31 |
Correct |
4 ms |
7356 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
3 ms |
7392 KB |
Output is correct |
34 |
Correct |
4 ms |
7380 KB |
Output is correct |
35 |
Correct |
4 ms |
7360 KB |
Output is correct |
36 |
Correct |
4 ms |
7364 KB |
Output is correct |
37 |
Correct |
4 ms |
7380 KB |
Output is correct |
38 |
Correct |
4 ms |
7380 KB |
Output is correct |
39 |
Correct |
6 ms |
7368 KB |
Output is correct |
40 |
Correct |
4 ms |
7364 KB |
Output is correct |
41 |
Correct |
4 ms |
7452 KB |
Output is correct |
42 |
Correct |
7 ms |
7380 KB |
Output is correct |
43 |
Correct |
6 ms |
7380 KB |
Output is correct |
44 |
Correct |
4 ms |
7364 KB |
Output is correct |
45 |
Correct |
6 ms |
7380 KB |
Output is correct |
46 |
Correct |
4 ms |
7380 KB |
Output is correct |
47 |
Correct |
4 ms |
7380 KB |
Output is correct |
48 |
Correct |
4 ms |
7364 KB |
Output is correct |
49 |
Correct |
6 ms |
7364 KB |
Output is correct |
50 |
Correct |
5 ms |
7380 KB |
Output is correct |
51 |
Correct |
4 ms |
7380 KB |
Output is correct |
52 |
Correct |
5 ms |
7380 KB |
Output is correct |
53 |
Correct |
6 ms |
7380 KB |
Output is correct |
54 |
Correct |
5 ms |
7368 KB |
Output is correct |
55 |
Correct |
4 ms |
7368 KB |
Output is correct |
56 |
Correct |
6 ms |
7380 KB |
Output is correct |
57 |
Correct |
4 ms |
7380 KB |
Output is correct |
58 |
Correct |
4 ms |
7380 KB |
Output is correct |
59 |
Correct |
4 ms |
7380 KB |
Output is correct |
60 |
Correct |
6 ms |
7380 KB |
Output is correct |
61 |
Correct |
6 ms |
7368 KB |
Output is correct |
62 |
Correct |
5 ms |
7380 KB |
Output is correct |
63 |
Correct |
6 ms |
7472 KB |
Output is correct |
64 |
Correct |
4 ms |
7404 KB |
Output is correct |
65 |
Correct |
4 ms |
7348 KB |
Output is correct |
66 |
Correct |
5 ms |
7380 KB |
Output is correct |
67 |
Correct |
7 ms |
7380 KB |
Output is correct |
68 |
Correct |
7 ms |
7380 KB |
Output is correct |
69 |
Correct |
8 ms |
7380 KB |
Output is correct |
70 |
Correct |
6 ms |
8008 KB |
Output is correct |
71 |
Correct |
7 ms |
8144 KB |
Output is correct |
72 |
Correct |
6 ms |
8020 KB |
Output is correct |
73 |
Correct |
6 ms |
7760 KB |
Output is correct |
74 |
Correct |
7 ms |
8020 KB |
Output is correct |
75 |
Correct |
7 ms |
7888 KB |
Output is correct |
76 |
Correct |
37 ms |
14540 KB |
Output is correct |
77 |
Correct |
41 ms |
15256 KB |
Output is correct |
78 |
Correct |
38 ms |
16684 KB |
Output is correct |
79 |
Correct |
5 ms |
7360 KB |
Output is correct |
80 |
Correct |
6 ms |
7364 KB |
Output is correct |
81 |
Correct |
6 ms |
7360 KB |
Output is correct |
82 |
Correct |
6 ms |
7380 KB |
Output is correct |
83 |
Correct |
6 ms |
7360 KB |
Output is correct |
84 |
Correct |
8 ms |
8276 KB |
Output is correct |
85 |
Correct |
8 ms |
8316 KB |
Output is correct |
86 |
Correct |
8 ms |
8276 KB |
Output is correct |
87 |
Correct |
10 ms |
8276 KB |
Output is correct |
88 |
Correct |
11 ms |
8276 KB |
Output is correct |
89 |
Correct |
8 ms |
8272 KB |
Output is correct |
90 |
Correct |
43 ms |
17452 KB |
Output is correct |
91 |
Correct |
38 ms |
17356 KB |
Output is correct |
92 |
Correct |
41 ms |
17460 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
3 ms |
7380 KB |
Output is correct |
4 |
Correct |
4 ms |
7252 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
3 ms |
7380 KB |
Output is correct |
7 |
Correct |
4 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
5 ms |
7380 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
4 ms |
7412 KB |
Output is correct |
13 |
Correct |
5 ms |
7408 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7368 KB |
Output is correct |
16 |
Correct |
4 ms |
7380 KB |
Output is correct |
17 |
Correct |
4 ms |
7368 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7360 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
4 ms |
7372 KB |
Output is correct |
23 |
Correct |
4 ms |
7372 KB |
Output is correct |
24 |
Correct |
24 ms |
13860 KB |
Output is correct |
25 |
Correct |
23 ms |
13816 KB |
Output is correct |
26 |
Correct |
24 ms |
13860 KB |
Output is correct |
27 |
Correct |
8 ms |
9044 KB |
Output is correct |
28 |
Correct |
10 ms |
9036 KB |
Output is correct |
29 |
Correct |
8 ms |
9044 KB |
Output is correct |
30 |
Correct |
7 ms |
9044 KB |
Output is correct |
31 |
Correct |
7 ms |
9044 KB |
Output is correct |
32 |
Correct |
6 ms |
9044 KB |
Output is correct |
33 |
Correct |
16 ms |
10488 KB |
Output is correct |
34 |
Correct |
16 ms |
10572 KB |
Output is correct |
35 |
Correct |
16 ms |
10452 KB |
Output is correct |
36 |
Correct |
15 ms |
10484 KB |
Output is correct |
37 |
Correct |
16 ms |
10500 KB |
Output is correct |
38 |
Correct |
16 ms |
10576 KB |
Output is correct |
39 |
Correct |
26 ms |
15656 KB |
Output is correct |
40 |
Correct |
28 ms |
15744 KB |
Output is correct |
41 |
Correct |
25 ms |
15640 KB |
Output is correct |
42 |
Correct |
5 ms |
7368 KB |
Output is correct |
43 |
Correct |
3 ms |
7380 KB |
Output is correct |
44 |
Correct |
4 ms |
7380 KB |
Output is correct |
45 |
Correct |
4 ms |
7364 KB |
Output is correct |
46 |
Correct |
4 ms |
7356 KB |
Output is correct |
47 |
Correct |
4 ms |
7380 KB |
Output is correct |
48 |
Correct |
3 ms |
7392 KB |
Output is correct |
49 |
Correct |
4 ms |
7380 KB |
Output is correct |
50 |
Correct |
4 ms |
7360 KB |
Output is correct |
51 |
Correct |
4 ms |
7364 KB |
Output is correct |
52 |
Correct |
4 ms |
7380 KB |
Output is correct |
53 |
Correct |
4 ms |
7380 KB |
Output is correct |
54 |
Correct |
6 ms |
7368 KB |
Output is correct |
55 |
Correct |
4 ms |
7364 KB |
Output is correct |
56 |
Correct |
4 ms |
7452 KB |
Output is correct |
57 |
Correct |
7 ms |
7380 KB |
Output is correct |
58 |
Correct |
6 ms |
7380 KB |
Output is correct |
59 |
Correct |
4 ms |
7364 KB |
Output is correct |
60 |
Correct |
6 ms |
7380 KB |
Output is correct |
61 |
Correct |
4 ms |
7380 KB |
Output is correct |
62 |
Correct |
4 ms |
7380 KB |
Output is correct |
63 |
Correct |
4 ms |
7364 KB |
Output is correct |
64 |
Correct |
6 ms |
7364 KB |
Output is correct |
65 |
Correct |
5 ms |
7380 KB |
Output is correct |
66 |
Correct |
4 ms |
7380 KB |
Output is correct |
67 |
Correct |
5 ms |
7380 KB |
Output is correct |
68 |
Correct |
6 ms |
7380 KB |
Output is correct |
69 |
Correct |
5 ms |
7368 KB |
Output is correct |
70 |
Correct |
4 ms |
7368 KB |
Output is correct |
71 |
Correct |
6 ms |
7380 KB |
Output is correct |
72 |
Correct |
4 ms |
7380 KB |
Output is correct |
73 |
Correct |
4 ms |
7380 KB |
Output is correct |
74 |
Correct |
4 ms |
7380 KB |
Output is correct |
75 |
Correct |
6 ms |
7380 KB |
Output is correct |
76 |
Correct |
6 ms |
7368 KB |
Output is correct |
77 |
Correct |
5 ms |
7380 KB |
Output is correct |
78 |
Correct |
6 ms |
7472 KB |
Output is correct |
79 |
Correct |
4 ms |
7404 KB |
Output is correct |
80 |
Correct |
4 ms |
7348 KB |
Output is correct |
81 |
Correct |
5 ms |
7380 KB |
Output is correct |
82 |
Correct |
7 ms |
7380 KB |
Output is correct |
83 |
Correct |
7 ms |
7380 KB |
Output is correct |
84 |
Correct |
8 ms |
7380 KB |
Output is correct |
85 |
Correct |
6 ms |
8008 KB |
Output is correct |
86 |
Correct |
7 ms |
8144 KB |
Output is correct |
87 |
Correct |
6 ms |
8020 KB |
Output is correct |
88 |
Correct |
6 ms |
7760 KB |
Output is correct |
89 |
Correct |
7 ms |
8020 KB |
Output is correct |
90 |
Correct |
7 ms |
7888 KB |
Output is correct |
91 |
Correct |
37 ms |
14540 KB |
Output is correct |
92 |
Correct |
41 ms |
15256 KB |
Output is correct |
93 |
Correct |
38 ms |
16684 KB |
Output is correct |
94 |
Correct |
5 ms |
7360 KB |
Output is correct |
95 |
Correct |
6 ms |
7364 KB |
Output is correct |
96 |
Correct |
6 ms |
7360 KB |
Output is correct |
97 |
Correct |
6 ms |
7380 KB |
Output is correct |
98 |
Correct |
6 ms |
7360 KB |
Output is correct |
99 |
Correct |
8 ms |
8276 KB |
Output is correct |
100 |
Correct |
8 ms |
8316 KB |
Output is correct |
101 |
Correct |
8 ms |
8276 KB |
Output is correct |
102 |
Correct |
10 ms |
8276 KB |
Output is correct |
103 |
Correct |
11 ms |
8276 KB |
Output is correct |
104 |
Correct |
8 ms |
8272 KB |
Output is correct |
105 |
Correct |
43 ms |
17452 KB |
Output is correct |
106 |
Correct |
38 ms |
17356 KB |
Output is correct |
107 |
Correct |
41 ms |
17460 KB |
Output is correct |
108 |
Correct |
12 ms |
9044 KB |
Output is correct |
109 |
Correct |
89 ms |
8384 KB |
Output is correct |
110 |
Correct |
7 ms |
8404 KB |
Output is correct |
111 |
Correct |
6 ms |
8324 KB |
Output is correct |
112 |
Correct |
6 ms |
8532 KB |
Output is correct |
113 |
Correct |
8 ms |
8400 KB |
Output is correct |
114 |
Correct |
22 ms |
12016 KB |
Output is correct |
115 |
Correct |
27 ms |
12092 KB |
Output is correct |
116 |
Correct |
32 ms |
13776 KB |
Output is correct |
117 |
Correct |
26 ms |
11744 KB |
Output is correct |
118 |
Correct |
33 ms |
12428 KB |
Output is correct |
119 |
Correct |
21 ms |
11320 KB |
Output is correct |
120 |
Correct |
26 ms |
14276 KB |
Output is correct |
121 |
Correct |
13 ms |
9172 KB |
Output is correct |
122 |
Correct |
38 ms |
15888 KB |
Output is correct |
123 |
Correct |
11 ms |
9136 KB |
Output is correct |
124 |
Correct |
36 ms |
17192 KB |
Output is correct |
125 |
Correct |
18 ms |
10320 KB |
Output is correct |
126 |
Correct |
16 ms |
9792 KB |
Output is correct |
127 |
Correct |
17 ms |
10936 KB |
Output is correct |
128 |
Correct |
18 ms |
9712 KB |
Output is correct |
129 |
Correct |
13 ms |
9792 KB |
Output is correct |
130 |
Correct |
12 ms |
9048 KB |
Output is correct |
131 |
Correct |
116 ms |
9208 KB |
Output is correct |
132 |
Correct |
9 ms |
9168 KB |
Output is correct |
133 |
Correct |
8 ms |
9292 KB |
Output is correct |
134 |
Correct |
9 ms |
9356 KB |
Output is correct |
135 |
Correct |
9 ms |
9272 KB |
Output is correct |
136 |
Correct |
36 ms |
14536 KB |
Output is correct |
137 |
Correct |
35 ms |
14436 KB |
Output is correct |
138 |
Correct |
35 ms |
14520 KB |
Output is correct |
139 |
Correct |
43 ms |
14460 KB |
Output is correct |
140 |
Correct |
40 ms |
14480 KB |
Output is correct |
141 |
Correct |
41 ms |
14532 KB |
Output is correct |
142 |
Correct |
46 ms |
19304 KB |
Output is correct |
143 |
Correct |
18 ms |
10532 KB |
Output is correct |
144 |
Correct |
50 ms |
19244 KB |
Output is correct |
145 |
Correct |
20 ms |
10444 KB |
Output is correct |
146 |
Correct |
58 ms |
19300 KB |
Output is correct |
147 |
Correct |
19 ms |
10580 KB |
Output is correct |
148 |
Correct |
18 ms |
11296 KB |
Output is correct |
149 |
Correct |
19 ms |
11196 KB |
Output is correct |
150 |
Correct |
16 ms |
11144 KB |
Output is correct |
151 |
Correct |
25 ms |
11016 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
3 ms |
7380 KB |
Output is correct |
4 |
Correct |
4 ms |
7252 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
3 ms |
7380 KB |
Output is correct |
7 |
Correct |
4 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
5 ms |
7380 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
4 ms |
7412 KB |
Output is correct |
13 |
Correct |
5 ms |
7408 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7368 KB |
Output is correct |
16 |
Correct |
4 ms |
7380 KB |
Output is correct |
17 |
Correct |
4 ms |
7368 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7360 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
4 ms |
7372 KB |
Output is correct |
23 |
Correct |
4 ms |
7372 KB |
Output is correct |
24 |
Correct |
24 ms |
13860 KB |
Output is correct |
25 |
Correct |
23 ms |
13816 KB |
Output is correct |
26 |
Correct |
24 ms |
13860 KB |
Output is correct |
27 |
Correct |
8 ms |
9044 KB |
Output is correct |
28 |
Correct |
10 ms |
9036 KB |
Output is correct |
29 |
Correct |
8 ms |
9044 KB |
Output is correct |
30 |
Correct |
7 ms |
9044 KB |
Output is correct |
31 |
Correct |
7 ms |
9044 KB |
Output is correct |
32 |
Correct |
6 ms |
9044 KB |
Output is correct |
33 |
Correct |
16 ms |
10488 KB |
Output is correct |
34 |
Correct |
16 ms |
10572 KB |
Output is correct |
35 |
Correct |
16 ms |
10452 KB |
Output is correct |
36 |
Correct |
15 ms |
10484 KB |
Output is correct |
37 |
Correct |
16 ms |
10500 KB |
Output is correct |
38 |
Correct |
16 ms |
10576 KB |
Output is correct |
39 |
Correct |
26 ms |
15656 KB |
Output is correct |
40 |
Correct |
28 ms |
15744 KB |
Output is correct |
41 |
Correct |
25 ms |
15640 KB |
Output is correct |
42 |
Correct |
30 ms |
14536 KB |
Output is correct |
43 |
Correct |
20 ms |
11344 KB |
Output is correct |
44 |
Correct |
33 ms |
14856 KB |
Output is correct |
45 |
Correct |
15 ms |
11724 KB |
Output is correct |
46 |
Correct |
14 ms |
11528 KB |
Output is correct |
47 |
Correct |
18 ms |
14924 KB |
Output is correct |
48 |
Correct |
62 ms |
26108 KB |
Output is correct |
49 |
Correct |
35 ms |
17880 KB |
Output is correct |
50 |
Correct |
34 ms |
21160 KB |
Output is correct |
51 |
Correct |
38 ms |
21756 KB |
Output is correct |
52 |
Correct |
39 ms |
23436 KB |
Output is correct |
53 |
Correct |
38 ms |
20588 KB |
Output is correct |
54 |
Correct |
35 ms |
14984 KB |
Output is correct |
55 |
Correct |
32 ms |
14912 KB |
Output is correct |
56 |
Correct |
28 ms |
14908 KB |
Output is correct |
57 |
Correct |
20 ms |
14872 KB |
Output is correct |
58 |
Correct |
18 ms |
14868 KB |
Output is correct |
59 |
Correct |
17 ms |
14792 KB |
Output is correct |
60 |
Correct |
62 ms |
27460 KB |
Output is correct |
61 |
Correct |
62 ms |
27444 KB |
Output is correct |
62 |
Correct |
66 ms |
27588 KB |
Output is correct |
63 |
Correct |
63 ms |
27476 KB |
Output is correct |
64 |
Correct |
62 ms |
27476 KB |
Output is correct |
65 |
Correct |
81 ms |
27464 KB |
Output is correct |
66 |
Correct |
59 ms |
26484 KB |
Output is correct |
67 |
Correct |
46 ms |
26424 KB |
Output is correct |
68 |
Correct |
46 ms |
26512 KB |
Output is correct |
69 |
Correct |
5 ms |
7368 KB |
Output is correct |
70 |
Correct |
3 ms |
7380 KB |
Output is correct |
71 |
Correct |
4 ms |
7380 KB |
Output is correct |
72 |
Correct |
4 ms |
7364 KB |
Output is correct |
73 |
Correct |
4 ms |
7356 KB |
Output is correct |
74 |
Correct |
4 ms |
7380 KB |
Output is correct |
75 |
Correct |
3 ms |
7392 KB |
Output is correct |
76 |
Correct |
4 ms |
7380 KB |
Output is correct |
77 |
Correct |
4 ms |
7360 KB |
Output is correct |
78 |
Correct |
4 ms |
7364 KB |
Output is correct |
79 |
Correct |
4 ms |
7380 KB |
Output is correct |
80 |
Correct |
4 ms |
7380 KB |
Output is correct |
81 |
Correct |
6 ms |
7368 KB |
Output is correct |
82 |
Correct |
4 ms |
7364 KB |
Output is correct |
83 |
Correct |
4 ms |
7452 KB |
Output is correct |
84 |
Correct |
7 ms |
7380 KB |
Output is correct |
85 |
Correct |
6 ms |
7380 KB |
Output is correct |
86 |
Correct |
4 ms |
7364 KB |
Output is correct |
87 |
Correct |
6 ms |
7380 KB |
Output is correct |
88 |
Correct |
4 ms |
7380 KB |
Output is correct |
89 |
Correct |
4 ms |
7380 KB |
Output is correct |
90 |
Correct |
4 ms |
7364 KB |
Output is correct |
91 |
Correct |
6 ms |
7364 KB |
Output is correct |
92 |
Correct |
5 ms |
7380 KB |
Output is correct |
93 |
Correct |
4 ms |
7380 KB |
Output is correct |
94 |
Correct |
5 ms |
7380 KB |
Output is correct |
95 |
Correct |
6 ms |
7380 KB |
Output is correct |
96 |
Correct |
5 ms |
7368 KB |
Output is correct |
97 |
Correct |
4 ms |
7368 KB |
Output is correct |
98 |
Correct |
6 ms |
7380 KB |
Output is correct |
99 |
Correct |
4 ms |
7380 KB |
Output is correct |
100 |
Correct |
4 ms |
7380 KB |
Output is correct |
101 |
Correct |
4 ms |
7380 KB |
Output is correct |
102 |
Correct |
6 ms |
7380 KB |
Output is correct |
103 |
Correct |
6 ms |
7368 KB |
Output is correct |
104 |
Correct |
5 ms |
7380 KB |
Output is correct |
105 |
Correct |
6 ms |
7472 KB |
Output is correct |
106 |
Correct |
4 ms |
7404 KB |
Output is correct |
107 |
Correct |
4 ms |
7348 KB |
Output is correct |
108 |
Correct |
5 ms |
7380 KB |
Output is correct |
109 |
Correct |
7 ms |
7380 KB |
Output is correct |
110 |
Correct |
7 ms |
7380 KB |
Output is correct |
111 |
Correct |
8 ms |
7380 KB |
Output is correct |
112 |
Correct |
6 ms |
8008 KB |
Output is correct |
113 |
Correct |
7 ms |
8144 KB |
Output is correct |
114 |
Correct |
6 ms |
8020 KB |
Output is correct |
115 |
Correct |
6 ms |
7760 KB |
Output is correct |
116 |
Correct |
7 ms |
8020 KB |
Output is correct |
117 |
Correct |
7 ms |
7888 KB |
Output is correct |
118 |
Correct |
37 ms |
14540 KB |
Output is correct |
119 |
Correct |
41 ms |
15256 KB |
Output is correct |
120 |
Correct |
38 ms |
16684 KB |
Output is correct |
121 |
Correct |
5 ms |
7360 KB |
Output is correct |
122 |
Correct |
6 ms |
7364 KB |
Output is correct |
123 |
Correct |
6 ms |
7360 KB |
Output is correct |
124 |
Correct |
6 ms |
7380 KB |
Output is correct |
125 |
Correct |
6 ms |
7360 KB |
Output is correct |
126 |
Correct |
8 ms |
8276 KB |
Output is correct |
127 |
Correct |
8 ms |
8316 KB |
Output is correct |
128 |
Correct |
8 ms |
8276 KB |
Output is correct |
129 |
Correct |
10 ms |
8276 KB |
Output is correct |
130 |
Correct |
11 ms |
8276 KB |
Output is correct |
131 |
Correct |
8 ms |
8272 KB |
Output is correct |
132 |
Correct |
43 ms |
17452 KB |
Output is correct |
133 |
Correct |
38 ms |
17356 KB |
Output is correct |
134 |
Correct |
41 ms |
17460 KB |
Output is correct |
135 |
Correct |
12 ms |
9044 KB |
Output is correct |
136 |
Correct |
89 ms |
8384 KB |
Output is correct |
137 |
Correct |
7 ms |
8404 KB |
Output is correct |
138 |
Correct |
6 ms |
8324 KB |
Output is correct |
139 |
Correct |
6 ms |
8532 KB |
Output is correct |
140 |
Correct |
8 ms |
8400 KB |
Output is correct |
141 |
Correct |
22 ms |
12016 KB |
Output is correct |
142 |
Correct |
27 ms |
12092 KB |
Output is correct |
143 |
Correct |
32 ms |
13776 KB |
Output is correct |
144 |
Correct |
26 ms |
11744 KB |
Output is correct |
145 |
Correct |
33 ms |
12428 KB |
Output is correct |
146 |
Correct |
21 ms |
11320 KB |
Output is correct |
147 |
Correct |
26 ms |
14276 KB |
Output is correct |
148 |
Correct |
13 ms |
9172 KB |
Output is correct |
149 |
Correct |
38 ms |
15888 KB |
Output is correct |
150 |
Correct |
11 ms |
9136 KB |
Output is correct |
151 |
Correct |
36 ms |
17192 KB |
Output is correct |
152 |
Correct |
18 ms |
10320 KB |
Output is correct |
153 |
Correct |
16 ms |
9792 KB |
Output is correct |
154 |
Correct |
17 ms |
10936 KB |
Output is correct |
155 |
Correct |
18 ms |
9712 KB |
Output is correct |
156 |
Correct |
13 ms |
9792 KB |
Output is correct |
157 |
Correct |
12 ms |
9048 KB |
Output is correct |
158 |
Correct |
116 ms |
9208 KB |
Output is correct |
159 |
Correct |
9 ms |
9168 KB |
Output is correct |
160 |
Correct |
8 ms |
9292 KB |
Output is correct |
161 |
Correct |
9 ms |
9356 KB |
Output is correct |
162 |
Correct |
9 ms |
9272 KB |
Output is correct |
163 |
Correct |
36 ms |
14536 KB |
Output is correct |
164 |
Correct |
35 ms |
14436 KB |
Output is correct |
165 |
Correct |
35 ms |
14520 KB |
Output is correct |
166 |
Correct |
43 ms |
14460 KB |
Output is correct |
167 |
Correct |
40 ms |
14480 KB |
Output is correct |
168 |
Correct |
41 ms |
14532 KB |
Output is correct |
169 |
Correct |
46 ms |
19304 KB |
Output is correct |
170 |
Correct |
18 ms |
10532 KB |
Output is correct |
171 |
Correct |
50 ms |
19244 KB |
Output is correct |
172 |
Correct |
20 ms |
10444 KB |
Output is correct |
173 |
Correct |
58 ms |
19300 KB |
Output is correct |
174 |
Correct |
19 ms |
10580 KB |
Output is correct |
175 |
Correct |
18 ms |
11296 KB |
Output is correct |
176 |
Correct |
19 ms |
11196 KB |
Output is correct |
177 |
Correct |
16 ms |
11144 KB |
Output is correct |
178 |
Correct |
25 ms |
11016 KB |
Output is correct |
179 |
Correct |
31 ms |
11520 KB |
Output is correct |
180 |
Correct |
278 ms |
11352 KB |
Output is correct |
181 |
Correct |
21 ms |
14208 KB |
Output is correct |
182 |
Correct |
26 ms |
14996 KB |
Output is correct |
183 |
Correct |
15 ms |
11824 KB |
Output is correct |
184 |
Correct |
15 ms |
11828 KB |
Output is correct |
185 |
Correct |
83 ms |
18388 KB |
Output is correct |
186 |
Correct |
45 ms |
17916 KB |
Output is correct |
187 |
Correct |
61 ms |
20020 KB |
Output is correct |
188 |
Correct |
54 ms |
21192 KB |
Output is correct |
189 |
Correct |
79 ms |
20364 KB |
Output is correct |
190 |
Correct |
59 ms |
23092 KB |
Output is correct |
191 |
Correct |
62 ms |
20752 KB |
Output is correct |
192 |
Correct |
38 ms |
19700 KB |
Output is correct |
193 |
Correct |
96 ms |
18228 KB |
Output is correct |
194 |
Correct |
39 ms |
14908 KB |
Output is correct |
195 |
Correct |
645 ms |
15032 KB |
Output is correct |
196 |
Correct |
29 ms |
15080 KB |
Output is correct |
197 |
Correct |
23 ms |
15012 KB |
Output is correct |
198 |
Correct |
21 ms |
15064 KB |
Output is correct |
199 |
Correct |
28 ms |
15116 KB |
Output is correct |
200 |
Correct |
92 ms |
32816 KB |
Output is correct |
201 |
Correct |
91 ms |
32804 KB |
Output is correct |
202 |
Correct |
89 ms |
32832 KB |
Output is correct |
203 |
Correct |
106 ms |
32768 KB |
Output is correct |
204 |
Correct |
87 ms |
32816 KB |
Output is correct |
205 |
Correct |
91 ms |
32812 KB |
Output is correct |
206 |
Correct |
69 ms |
30140 KB |
Output is correct |
207 |
Correct |
83 ms |
27564 KB |
Output is correct |
208 |
Correct |
83 ms |
30288 KB |
Output is correct |
209 |
Correct |
95 ms |
27468 KB |
Output is correct |
210 |
Correct |
84 ms |
30164 KB |
Output is correct |
211 |
Correct |
87 ms |
27420 KB |
Output is correct |
212 |
Correct |
68 ms |
30064 KB |
Output is correct |
213 |
Correct |
65 ms |
26316 KB |
Output is correct |
214 |
Correct |
60 ms |
25820 KB |
Output is correct |
215 |
Correct |
62 ms |
26256 KB |
Output is correct |