#include <bits/stdc++.h>
#ifndef SKY
#include "paint.h"
#endif // SKY
using namespace std;
#define N 200010
#define ll long long
#define fs first
#define sc second
#define ii pair<int,int>
#define pb push_back
unordered_map<int,int>mp[N];
int n,m,k,color[N],dp[N];
vector<int>lis[N];
int minimumInstructions(int NNN, int MMM, int KKK, vector<int> CCC,vector<int> AAA, vector<vector<int>> BBB)
{
n=NNN;
m=MMM;
k=KKK;
for(int i=0;i<n;i++)
color[i]=CCC[i];
for(int i=0;i<m;i++)
for(auto u:BBB[i])
lis[u].pb(i);
if(m==1)
{
for(int i=0;i<n;i++)
if(lis[color[i]].empty())
return -1;
return n;
}
for(int i=n-1;i>=0;i--)
{
for(auto u:lis[color[i]])
if(mp[i+1].find((u+1)%m)!=mp[i+1].end())
mp[i][u]=min(m,mp[i+1][(u+1)%m]+1);
else mp[i][u]=1;
for(auto u:lis[color[i]])
if(mp[i][u]==m)
dp[i]=1;
}
if(dp[0]==0)
return -1;
int vt=0,res=0,x=0;
while(vt<n)
{
if(x+m-1<vt)
return -1;
int new_vt=x+m;
for(int i=vt+1;i<=new_vt;i++)
if(dp[i]==1)
x=max(x,i);
vt=new_vt;
res++;
}
return res;
}
#ifdef SKY
int main()
{
freopen("A.inp","r",stdin);
freopen("A.out","w",stdout);
ios::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
int n,m,k;
cin>>n>>m>>k;
vector<int>C(n);
for(int i=0;i<n;i++)
cin>>C[i];
vector<int>A(m);
vector<vector<int>>B(m);
for(int i=0;i<m;i++)
{
cin>>A[i];
B[i].resize(A[i]);
}
for(int i=0;i<m;i++)
{
for(int j=0;j<A[i];j++)
cin>>B[i][j];
}
cout<<minimumInstructions(n,m,k,C,A,B);
return 0;
}
#endif
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
15972 KB |
Output is correct |
2 |
Correct |
10 ms |
15964 KB |
Output is correct |
3 |
Correct |
10 ms |
15928 KB |
Output is correct |
4 |
Correct |
9 ms |
15888 KB |
Output is correct |
5 |
Correct |
10 ms |
15980 KB |
Output is correct |
6 |
Correct |
11 ms |
15964 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
9 ms |
15968 KB |
Output is correct |
9 |
Correct |
9 ms |
16092 KB |
Output is correct |
10 |
Correct |
9 ms |
15956 KB |
Output is correct |
11 |
Correct |
9 ms |
15956 KB |
Output is correct |
12 |
Correct |
9 ms |
16040 KB |
Output is correct |
13 |
Correct |
10 ms |
16064 KB |
Output is correct |
14 |
Correct |
11 ms |
15968 KB |
Output is correct |
15 |
Correct |
9 ms |
16084 KB |
Output is correct |
16 |
Correct |
10 ms |
16084 KB |
Output is correct |
17 |
Correct |
10 ms |
15976 KB |
Output is correct |
18 |
Correct |
10 ms |
16084 KB |
Output is correct |
19 |
Correct |
8 ms |
15956 KB |
Output is correct |
20 |
Correct |
8 ms |
16044 KB |
Output is correct |
21 |
Correct |
10 ms |
16044 KB |
Output is correct |
22 |
Correct |
26 ms |
20632 KB |
Output is correct |
23 |
Correct |
33 ms |
20428 KB |
Output is correct |
24 |
Correct |
27 ms |
20436 KB |
Output is correct |
25 |
Correct |
12 ms |
16212 KB |
Output is correct |
26 |
Correct |
11 ms |
16212 KB |
Output is correct |
27 |
Correct |
15 ms |
19028 KB |
Output is correct |
28 |
Correct |
16 ms |
19052 KB |
Output is correct |
29 |
Correct |
15 ms |
19032 KB |
Output is correct |
30 |
Correct |
18 ms |
19156 KB |
Output is correct |
31 |
Correct |
22 ms |
20140 KB |
Output is correct |
32 |
Correct |
22 ms |
20208 KB |
Output is correct |
33 |
Correct |
24 ms |
20200 KB |
Output is correct |
34 |
Correct |
21 ms |
20244 KB |
Output is correct |
35 |
Correct |
22 ms |
20244 KB |
Output is correct |
36 |
Correct |
25 ms |
20220 KB |
Output is correct |
37 |
Correct |
41 ms |
23756 KB |
Output is correct |
38 |
Correct |
40 ms |
23732 KB |
Output is correct |
39 |
Correct |
40 ms |
23776 KB |
Output is correct |
40 |
Correct |
17 ms |
17208 KB |
Output is correct |
41 |
Correct |
15 ms |
16724 KB |
Output is correct |
42 |
Correct |
46 ms |
31444 KB |
Output is correct |
43 |
Correct |
33 ms |
26316 KB |
Output is correct |
44 |
Correct |
29 ms |
25324 KB |
Output is correct |
45 |
Correct |
38 ms |
31576 KB |
Output is correct |
46 |
Correct |
61 ms |
38732 KB |
Output is correct |
47 |
Correct |
43 ms |
29772 KB |
Output is correct |
48 |
Correct |
57 ms |
32376 KB |
Output is correct |
49 |
Correct |
61 ms |
33300 KB |
Output is correct |
50 |
Correct |
72 ms |
34336 KB |
Output is correct |
51 |
Correct |
63 ms |
32560 KB |
Output is correct |
52 |
Correct |
17 ms |
17336 KB |
Output is correct |
53 |
Correct |
18 ms |
17328 KB |
Output is correct |
54 |
Correct |
39 ms |
31716 KB |
Output is correct |
55 |
Correct |
40 ms |
31748 KB |
Output is correct |
56 |
Correct |
37 ms |
31712 KB |
Output is correct |
57 |
Correct |
39 ms |
31712 KB |
Output is correct |
58 |
Correct |
70 ms |
41568 KB |
Output is correct |
59 |
Correct |
86 ms |
41648 KB |
Output is correct |
60 |
Correct |
80 ms |
41636 KB |
Output is correct |
61 |
Correct |
77 ms |
41560 KB |
Output is correct |
62 |
Correct |
71 ms |
41676 KB |
Output is correct |
63 |
Correct |
69 ms |
41656 KB |
Output is correct |
64 |
Correct |
78 ms |
40652 KB |
Output is correct |
65 |
Correct |
77 ms |
40668 KB |
Output is correct |
66 |
Correct |
75 ms |
40792 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
15972 KB |
Output is correct |
2 |
Correct |
10 ms |
15964 KB |
Output is correct |
3 |
Correct |
10 ms |
15928 KB |
Output is correct |
4 |
Correct |
9 ms |
15888 KB |
Output is correct |
5 |
Correct |
10 ms |
15980 KB |
Output is correct |
6 |
Correct |
11 ms |
15964 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
9 ms |
15968 KB |
Output is correct |
9 |
Correct |
9 ms |
16092 KB |
Output is correct |
10 |
Correct |
9 ms |
15956 KB |
Output is correct |
11 |
Correct |
9 ms |
15956 KB |
Output is correct |
12 |
Correct |
9 ms |
16040 KB |
Output is correct |
13 |
Correct |
10 ms |
16064 KB |
Output is correct |
14 |
Correct |
11 ms |
15968 KB |
Output is correct |
15 |
Correct |
9 ms |
16084 KB |
Output is correct |
16 |
Correct |
10 ms |
16084 KB |
Output is correct |
17 |
Correct |
10 ms |
15976 KB |
Output is correct |
18 |
Correct |
10 ms |
16084 KB |
Output is correct |
19 |
Correct |
8 ms |
15956 KB |
Output is correct |
20 |
Correct |
8 ms |
16044 KB |
Output is correct |
21 |
Correct |
10 ms |
16044 KB |
Output is correct |
22 |
Correct |
9 ms |
15964 KB |
Output is correct |
23 |
Correct |
9 ms |
15956 KB |
Output is correct |
24 |
Correct |
9 ms |
15964 KB |
Output is correct |
25 |
Correct |
10 ms |
15932 KB |
Output is correct |
26 |
Correct |
10 ms |
15956 KB |
Output is correct |
27 |
Correct |
9 ms |
15964 KB |
Output is correct |
28 |
Correct |
10 ms |
16212 KB |
Output is correct |
29 |
Correct |
10 ms |
16084 KB |
Output is correct |
30 |
Correct |
9 ms |
16084 KB |
Output is correct |
31 |
Correct |
10 ms |
16056 KB |
Output is correct |
32 |
Correct |
9 ms |
16084 KB |
Output is correct |
33 |
Correct |
10 ms |
15956 KB |
Output is correct |
34 |
Correct |
9 ms |
15972 KB |
Output is correct |
35 |
Correct |
9 ms |
15952 KB |
Output is correct |
36 |
Correct |
9 ms |
15956 KB |
Output is correct |
37 |
Correct |
10 ms |
15968 KB |
Output is correct |
38 |
Correct |
10 ms |
15968 KB |
Output is correct |
39 |
Correct |
10 ms |
15956 KB |
Output is correct |
40 |
Correct |
10 ms |
15956 KB |
Output is correct |
41 |
Correct |
10 ms |
15956 KB |
Output is correct |
42 |
Correct |
10 ms |
15996 KB |
Output is correct |
43 |
Correct |
11 ms |
15972 KB |
Output is correct |
44 |
Correct |
10 ms |
15968 KB |
Output is correct |
45 |
Correct |
11 ms |
16628 KB |
Output is correct |
46 |
Correct |
10 ms |
16348 KB |
Output is correct |
47 |
Correct |
10 ms |
16340 KB |
Output is correct |
48 |
Correct |
10 ms |
16340 KB |
Output is correct |
49 |
Correct |
9 ms |
16220 KB |
Output is correct |
50 |
Correct |
9 ms |
16084 KB |
Output is correct |
51 |
Correct |
9 ms |
15972 KB |
Output is correct |
52 |
Correct |
11 ms |
16084 KB |
Output is correct |
53 |
Correct |
9 ms |
15972 KB |
Output is correct |
54 |
Correct |
12 ms |
16084 KB |
Output is correct |
55 |
Correct |
9 ms |
15972 KB |
Output is correct |
56 |
Correct |
11 ms |
15956 KB |
Output is correct |
57 |
Correct |
9 ms |
16084 KB |
Output is correct |
58 |
Correct |
9 ms |
16012 KB |
Output is correct |
59 |
Correct |
10 ms |
16100 KB |
Output is correct |
60 |
Correct |
10 ms |
15984 KB |
Output is correct |
61 |
Correct |
10 ms |
16084 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
15964 KB |
Output is correct |
2 |
Correct |
9 ms |
15956 KB |
Output is correct |
3 |
Correct |
10 ms |
15972 KB |
Output is correct |
4 |
Correct |
10 ms |
15964 KB |
Output is correct |
5 |
Correct |
10 ms |
15928 KB |
Output is correct |
6 |
Correct |
9 ms |
15888 KB |
Output is correct |
7 |
Correct |
10 ms |
15980 KB |
Output is correct |
8 |
Correct |
11 ms |
15964 KB |
Output is correct |
9 |
Correct |
9 ms |
15956 KB |
Output is correct |
10 |
Correct |
9 ms |
15968 KB |
Output is correct |
11 |
Correct |
9 ms |
16092 KB |
Output is correct |
12 |
Correct |
9 ms |
15956 KB |
Output is correct |
13 |
Correct |
9 ms |
15956 KB |
Output is correct |
14 |
Correct |
9 ms |
16040 KB |
Output is correct |
15 |
Correct |
10 ms |
16064 KB |
Output is correct |
16 |
Correct |
11 ms |
15968 KB |
Output is correct |
17 |
Correct |
9 ms |
16084 KB |
Output is correct |
18 |
Correct |
10 ms |
16084 KB |
Output is correct |
19 |
Correct |
10 ms |
15976 KB |
Output is correct |
20 |
Correct |
10 ms |
16084 KB |
Output is correct |
21 |
Correct |
8 ms |
15956 KB |
Output is correct |
22 |
Correct |
8 ms |
16044 KB |
Output is correct |
23 |
Correct |
10 ms |
16044 KB |
Output is correct |
24 |
Correct |
26 ms |
20632 KB |
Output is correct |
25 |
Correct |
33 ms |
20428 KB |
Output is correct |
26 |
Correct |
27 ms |
20436 KB |
Output is correct |
27 |
Correct |
9 ms |
15964 KB |
Output is correct |
28 |
Correct |
10 ms |
15932 KB |
Output is correct |
29 |
Correct |
10 ms |
15956 KB |
Output is correct |
30 |
Correct |
9 ms |
15964 KB |
Output is correct |
31 |
Correct |
10 ms |
16212 KB |
Output is correct |
32 |
Correct |
10 ms |
16084 KB |
Output is correct |
33 |
Correct |
9 ms |
16084 KB |
Output is correct |
34 |
Correct |
10 ms |
16056 KB |
Output is correct |
35 |
Correct |
9 ms |
16084 KB |
Output is correct |
36 |
Correct |
10 ms |
15956 KB |
Output is correct |
37 |
Correct |
9 ms |
15972 KB |
Output is correct |
38 |
Correct |
9 ms |
15952 KB |
Output is correct |
39 |
Correct |
9 ms |
15956 KB |
Output is correct |
40 |
Correct |
10 ms |
15968 KB |
Output is correct |
41 |
Correct |
10 ms |
15968 KB |
Output is correct |
42 |
Correct |
10 ms |
15956 KB |
Output is correct |
43 |
Correct |
10 ms |
15956 KB |
Output is correct |
44 |
Correct |
10 ms |
15956 KB |
Output is correct |
45 |
Correct |
10 ms |
15996 KB |
Output is correct |
46 |
Correct |
11 ms |
15972 KB |
Output is correct |
47 |
Correct |
10 ms |
15968 KB |
Output is correct |
48 |
Correct |
11 ms |
16628 KB |
Output is correct |
49 |
Correct |
10 ms |
16348 KB |
Output is correct |
50 |
Correct |
10 ms |
16340 KB |
Output is correct |
51 |
Correct |
10 ms |
16340 KB |
Output is correct |
52 |
Correct |
9 ms |
16220 KB |
Output is correct |
53 |
Correct |
9 ms |
16084 KB |
Output is correct |
54 |
Correct |
9 ms |
15972 KB |
Output is correct |
55 |
Correct |
11 ms |
16084 KB |
Output is correct |
56 |
Correct |
9 ms |
15972 KB |
Output is correct |
57 |
Correct |
12 ms |
16084 KB |
Output is correct |
58 |
Correct |
9 ms |
15972 KB |
Output is correct |
59 |
Correct |
11 ms |
15956 KB |
Output is correct |
60 |
Correct |
9 ms |
16084 KB |
Output is correct |
61 |
Correct |
9 ms |
16012 KB |
Output is correct |
62 |
Correct |
10 ms |
16100 KB |
Output is correct |
63 |
Correct |
10 ms |
15984 KB |
Output is correct |
64 |
Correct |
10 ms |
16084 KB |
Output is correct |
65 |
Correct |
15 ms |
17888 KB |
Output is correct |
66 |
Correct |
12 ms |
16724 KB |
Output is correct |
67 |
Correct |
19 ms |
18272 KB |
Output is correct |
68 |
Correct |
14 ms |
17492 KB |
Output is correct |
69 |
Correct |
15 ms |
18004 KB |
Output is correct |
70 |
Correct |
14 ms |
16596 KB |
Output is correct |
71 |
Correct |
12 ms |
16616 KB |
Output is correct |
72 |
Correct |
13 ms |
16620 KB |
Output is correct |
73 |
Correct |
11 ms |
16268 KB |
Output is correct |
74 |
Correct |
12 ms |
16596 KB |
Output is correct |
75 |
Correct |
12 ms |
16492 KB |
Output is correct |
76 |
Correct |
30 ms |
19280 KB |
Output is correct |
77 |
Correct |
27 ms |
19776 KB |
Output is correct |
78 |
Correct |
38 ms |
20284 KB |
Output is correct |
79 |
Correct |
19 ms |
20060 KB |
Output is correct |
80 |
Correct |
18 ms |
20052 KB |
Output is correct |
81 |
Correct |
17 ms |
20052 KB |
Output is correct |
82 |
Correct |
18 ms |
20112 KB |
Output is correct |
83 |
Correct |
19 ms |
20052 KB |
Output is correct |
84 |
Correct |
12 ms |
16724 KB |
Output is correct |
85 |
Correct |
13 ms |
16724 KB |
Output is correct |
86 |
Correct |
12 ms |
16724 KB |
Output is correct |
87 |
Correct |
12 ms |
16748 KB |
Output is correct |
88 |
Correct |
15 ms |
16696 KB |
Output is correct |
89 |
Correct |
13 ms |
16724 KB |
Output is correct |
90 |
Correct |
38 ms |
20592 KB |
Output is correct |
91 |
Correct |
37 ms |
20556 KB |
Output is correct |
92 |
Correct |
34 ms |
20676 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
15964 KB |
Output is correct |
2 |
Correct |
9 ms |
15956 KB |
Output is correct |
3 |
Correct |
10 ms |
15972 KB |
Output is correct |
4 |
Correct |
10 ms |
15964 KB |
Output is correct |
5 |
Correct |
10 ms |
15928 KB |
Output is correct |
6 |
Correct |
9 ms |
15888 KB |
Output is correct |
7 |
Correct |
10 ms |
15980 KB |
Output is correct |
8 |
Correct |
11 ms |
15964 KB |
Output is correct |
9 |
Correct |
9 ms |
15956 KB |
Output is correct |
10 |
Correct |
9 ms |
15968 KB |
Output is correct |
11 |
Correct |
9 ms |
16092 KB |
Output is correct |
12 |
Correct |
9 ms |
15956 KB |
Output is correct |
13 |
Correct |
9 ms |
15956 KB |
Output is correct |
14 |
Correct |
9 ms |
16040 KB |
Output is correct |
15 |
Correct |
10 ms |
16064 KB |
Output is correct |
16 |
Correct |
11 ms |
15968 KB |
Output is correct |
17 |
Correct |
9 ms |
16084 KB |
Output is correct |
18 |
Correct |
10 ms |
16084 KB |
Output is correct |
19 |
Correct |
10 ms |
15976 KB |
Output is correct |
20 |
Correct |
10 ms |
16084 KB |
Output is correct |
21 |
Correct |
8 ms |
15956 KB |
Output is correct |
22 |
Correct |
8 ms |
16044 KB |
Output is correct |
23 |
Correct |
10 ms |
16044 KB |
Output is correct |
24 |
Correct |
26 ms |
20632 KB |
Output is correct |
25 |
Correct |
33 ms |
20428 KB |
Output is correct |
26 |
Correct |
27 ms |
20436 KB |
Output is correct |
27 |
Correct |
12 ms |
16212 KB |
Output is correct |
28 |
Correct |
11 ms |
16212 KB |
Output is correct |
29 |
Correct |
15 ms |
19028 KB |
Output is correct |
30 |
Correct |
16 ms |
19052 KB |
Output is correct |
31 |
Correct |
15 ms |
19032 KB |
Output is correct |
32 |
Correct |
18 ms |
19156 KB |
Output is correct |
33 |
Correct |
22 ms |
20140 KB |
Output is correct |
34 |
Correct |
22 ms |
20208 KB |
Output is correct |
35 |
Correct |
24 ms |
20200 KB |
Output is correct |
36 |
Correct |
21 ms |
20244 KB |
Output is correct |
37 |
Correct |
22 ms |
20244 KB |
Output is correct |
38 |
Correct |
25 ms |
20220 KB |
Output is correct |
39 |
Correct |
41 ms |
23756 KB |
Output is correct |
40 |
Correct |
40 ms |
23732 KB |
Output is correct |
41 |
Correct |
40 ms |
23776 KB |
Output is correct |
42 |
Correct |
9 ms |
15964 KB |
Output is correct |
43 |
Correct |
10 ms |
15932 KB |
Output is correct |
44 |
Correct |
10 ms |
15956 KB |
Output is correct |
45 |
Correct |
9 ms |
15964 KB |
Output is correct |
46 |
Correct |
10 ms |
16212 KB |
Output is correct |
47 |
Correct |
10 ms |
16084 KB |
Output is correct |
48 |
Correct |
9 ms |
16084 KB |
Output is correct |
49 |
Correct |
10 ms |
16056 KB |
Output is correct |
50 |
Correct |
9 ms |
16084 KB |
Output is correct |
51 |
Correct |
10 ms |
15956 KB |
Output is correct |
52 |
Correct |
9 ms |
15972 KB |
Output is correct |
53 |
Correct |
9 ms |
15952 KB |
Output is correct |
54 |
Correct |
9 ms |
15956 KB |
Output is correct |
55 |
Correct |
10 ms |
15968 KB |
Output is correct |
56 |
Correct |
10 ms |
15968 KB |
Output is correct |
57 |
Correct |
10 ms |
15956 KB |
Output is correct |
58 |
Correct |
10 ms |
15956 KB |
Output is correct |
59 |
Correct |
10 ms |
15956 KB |
Output is correct |
60 |
Correct |
10 ms |
15996 KB |
Output is correct |
61 |
Correct |
11 ms |
15972 KB |
Output is correct |
62 |
Correct |
10 ms |
15968 KB |
Output is correct |
63 |
Correct |
11 ms |
16628 KB |
Output is correct |
64 |
Correct |
10 ms |
16348 KB |
Output is correct |
65 |
Correct |
10 ms |
16340 KB |
Output is correct |
66 |
Correct |
10 ms |
16340 KB |
Output is correct |
67 |
Correct |
9 ms |
16220 KB |
Output is correct |
68 |
Correct |
9 ms |
16084 KB |
Output is correct |
69 |
Correct |
9 ms |
15972 KB |
Output is correct |
70 |
Correct |
11 ms |
16084 KB |
Output is correct |
71 |
Correct |
9 ms |
15972 KB |
Output is correct |
72 |
Correct |
12 ms |
16084 KB |
Output is correct |
73 |
Correct |
9 ms |
15972 KB |
Output is correct |
74 |
Correct |
11 ms |
15956 KB |
Output is correct |
75 |
Correct |
9 ms |
16084 KB |
Output is correct |
76 |
Correct |
9 ms |
16012 KB |
Output is correct |
77 |
Correct |
10 ms |
16100 KB |
Output is correct |
78 |
Correct |
10 ms |
15984 KB |
Output is correct |
79 |
Correct |
10 ms |
16084 KB |
Output is correct |
80 |
Correct |
15 ms |
17888 KB |
Output is correct |
81 |
Correct |
12 ms |
16724 KB |
Output is correct |
82 |
Correct |
19 ms |
18272 KB |
Output is correct |
83 |
Correct |
14 ms |
17492 KB |
Output is correct |
84 |
Correct |
15 ms |
18004 KB |
Output is correct |
85 |
Correct |
14 ms |
16596 KB |
Output is correct |
86 |
Correct |
12 ms |
16616 KB |
Output is correct |
87 |
Correct |
13 ms |
16620 KB |
Output is correct |
88 |
Correct |
11 ms |
16268 KB |
Output is correct |
89 |
Correct |
12 ms |
16596 KB |
Output is correct |
90 |
Correct |
12 ms |
16492 KB |
Output is correct |
91 |
Correct |
30 ms |
19280 KB |
Output is correct |
92 |
Correct |
27 ms |
19776 KB |
Output is correct |
93 |
Correct |
38 ms |
20284 KB |
Output is correct |
94 |
Correct |
19 ms |
20060 KB |
Output is correct |
95 |
Correct |
18 ms |
20052 KB |
Output is correct |
96 |
Correct |
17 ms |
20052 KB |
Output is correct |
97 |
Correct |
18 ms |
20112 KB |
Output is correct |
98 |
Correct |
19 ms |
20052 KB |
Output is correct |
99 |
Correct |
12 ms |
16724 KB |
Output is correct |
100 |
Correct |
13 ms |
16724 KB |
Output is correct |
101 |
Correct |
12 ms |
16724 KB |
Output is correct |
102 |
Correct |
12 ms |
16748 KB |
Output is correct |
103 |
Correct |
15 ms |
16696 KB |
Output is correct |
104 |
Correct |
13 ms |
16724 KB |
Output is correct |
105 |
Correct |
38 ms |
20592 KB |
Output is correct |
106 |
Correct |
37 ms |
20556 KB |
Output is correct |
107 |
Correct |
34 ms |
20676 KB |
Output is correct |
108 |
Correct |
17 ms |
19688 KB |
Output is correct |
109 |
Correct |
1000 ms |
423448 KB |
Output is correct |
110 |
Correct |
558 ms |
220344 KB |
Output is correct |
111 |
Correct |
443 ms |
177480 KB |
Output is correct |
112 |
Correct |
517 ms |
211348 KB |
Output is correct |
113 |
Correct |
360 ms |
132868 KB |
Output is correct |
114 |
Correct |
33 ms |
20480 KB |
Output is correct |
115 |
Correct |
29 ms |
20388 KB |
Output is correct |
116 |
Correct |
43 ms |
22136 KB |
Output is correct |
117 |
Correct |
28 ms |
20384 KB |
Output is correct |
118 |
Correct |
30 ms |
21044 KB |
Output is correct |
119 |
Correct |
26 ms |
20300 KB |
Output is correct |
120 |
Correct |
33 ms |
20528 KB |
Output is correct |
121 |
Correct |
17 ms |
18644 KB |
Output is correct |
122 |
Correct |
47 ms |
21152 KB |
Output is correct |
123 |
Correct |
17 ms |
18644 KB |
Output is correct |
124 |
Correct |
42 ms |
22420 KB |
Output is correct |
125 |
Correct |
23 ms |
20092 KB |
Output is correct |
126 |
Correct |
21 ms |
19412 KB |
Output is correct |
127 |
Correct |
26 ms |
20308 KB |
Output is correct |
128 |
Correct |
19 ms |
19068 KB |
Output is correct |
129 |
Correct |
19 ms |
19156 KB |
Output is correct |
130 |
Correct |
17 ms |
19668 KB |
Output is correct |
131 |
Runtime error |
887 ms |
524288 KB |
Execution killed with signal 9 |
132 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
15964 KB |
Output is correct |
2 |
Correct |
9 ms |
15956 KB |
Output is correct |
3 |
Correct |
10 ms |
15972 KB |
Output is correct |
4 |
Correct |
10 ms |
15964 KB |
Output is correct |
5 |
Correct |
10 ms |
15928 KB |
Output is correct |
6 |
Correct |
9 ms |
15888 KB |
Output is correct |
7 |
Correct |
10 ms |
15980 KB |
Output is correct |
8 |
Correct |
11 ms |
15964 KB |
Output is correct |
9 |
Correct |
9 ms |
15956 KB |
Output is correct |
10 |
Correct |
9 ms |
15968 KB |
Output is correct |
11 |
Correct |
9 ms |
16092 KB |
Output is correct |
12 |
Correct |
9 ms |
15956 KB |
Output is correct |
13 |
Correct |
9 ms |
15956 KB |
Output is correct |
14 |
Correct |
9 ms |
16040 KB |
Output is correct |
15 |
Correct |
10 ms |
16064 KB |
Output is correct |
16 |
Correct |
11 ms |
15968 KB |
Output is correct |
17 |
Correct |
9 ms |
16084 KB |
Output is correct |
18 |
Correct |
10 ms |
16084 KB |
Output is correct |
19 |
Correct |
10 ms |
15976 KB |
Output is correct |
20 |
Correct |
10 ms |
16084 KB |
Output is correct |
21 |
Correct |
8 ms |
15956 KB |
Output is correct |
22 |
Correct |
8 ms |
16044 KB |
Output is correct |
23 |
Correct |
10 ms |
16044 KB |
Output is correct |
24 |
Correct |
26 ms |
20632 KB |
Output is correct |
25 |
Correct |
33 ms |
20428 KB |
Output is correct |
26 |
Correct |
27 ms |
20436 KB |
Output is correct |
27 |
Correct |
12 ms |
16212 KB |
Output is correct |
28 |
Correct |
11 ms |
16212 KB |
Output is correct |
29 |
Correct |
15 ms |
19028 KB |
Output is correct |
30 |
Correct |
16 ms |
19052 KB |
Output is correct |
31 |
Correct |
15 ms |
19032 KB |
Output is correct |
32 |
Correct |
18 ms |
19156 KB |
Output is correct |
33 |
Correct |
22 ms |
20140 KB |
Output is correct |
34 |
Correct |
22 ms |
20208 KB |
Output is correct |
35 |
Correct |
24 ms |
20200 KB |
Output is correct |
36 |
Correct |
21 ms |
20244 KB |
Output is correct |
37 |
Correct |
22 ms |
20244 KB |
Output is correct |
38 |
Correct |
25 ms |
20220 KB |
Output is correct |
39 |
Correct |
41 ms |
23756 KB |
Output is correct |
40 |
Correct |
40 ms |
23732 KB |
Output is correct |
41 |
Correct |
40 ms |
23776 KB |
Output is correct |
42 |
Correct |
17 ms |
17208 KB |
Output is correct |
43 |
Correct |
15 ms |
16724 KB |
Output is correct |
44 |
Correct |
46 ms |
31444 KB |
Output is correct |
45 |
Correct |
33 ms |
26316 KB |
Output is correct |
46 |
Correct |
29 ms |
25324 KB |
Output is correct |
47 |
Correct |
38 ms |
31576 KB |
Output is correct |
48 |
Correct |
61 ms |
38732 KB |
Output is correct |
49 |
Correct |
43 ms |
29772 KB |
Output is correct |
50 |
Correct |
57 ms |
32376 KB |
Output is correct |
51 |
Correct |
61 ms |
33300 KB |
Output is correct |
52 |
Correct |
72 ms |
34336 KB |
Output is correct |
53 |
Correct |
63 ms |
32560 KB |
Output is correct |
54 |
Correct |
17 ms |
17336 KB |
Output is correct |
55 |
Correct |
18 ms |
17328 KB |
Output is correct |
56 |
Correct |
39 ms |
31716 KB |
Output is correct |
57 |
Correct |
40 ms |
31748 KB |
Output is correct |
58 |
Correct |
37 ms |
31712 KB |
Output is correct |
59 |
Correct |
39 ms |
31712 KB |
Output is correct |
60 |
Correct |
70 ms |
41568 KB |
Output is correct |
61 |
Correct |
86 ms |
41648 KB |
Output is correct |
62 |
Correct |
80 ms |
41636 KB |
Output is correct |
63 |
Correct |
77 ms |
41560 KB |
Output is correct |
64 |
Correct |
71 ms |
41676 KB |
Output is correct |
65 |
Correct |
69 ms |
41656 KB |
Output is correct |
66 |
Correct |
78 ms |
40652 KB |
Output is correct |
67 |
Correct |
77 ms |
40668 KB |
Output is correct |
68 |
Correct |
75 ms |
40792 KB |
Output is correct |
69 |
Correct |
9 ms |
15964 KB |
Output is correct |
70 |
Correct |
10 ms |
15932 KB |
Output is correct |
71 |
Correct |
10 ms |
15956 KB |
Output is correct |
72 |
Correct |
9 ms |
15964 KB |
Output is correct |
73 |
Correct |
10 ms |
16212 KB |
Output is correct |
74 |
Correct |
10 ms |
16084 KB |
Output is correct |
75 |
Correct |
9 ms |
16084 KB |
Output is correct |
76 |
Correct |
10 ms |
16056 KB |
Output is correct |
77 |
Correct |
9 ms |
16084 KB |
Output is correct |
78 |
Correct |
10 ms |
15956 KB |
Output is correct |
79 |
Correct |
9 ms |
15972 KB |
Output is correct |
80 |
Correct |
9 ms |
15952 KB |
Output is correct |
81 |
Correct |
9 ms |
15956 KB |
Output is correct |
82 |
Correct |
10 ms |
15968 KB |
Output is correct |
83 |
Correct |
10 ms |
15968 KB |
Output is correct |
84 |
Correct |
10 ms |
15956 KB |
Output is correct |
85 |
Correct |
10 ms |
15956 KB |
Output is correct |
86 |
Correct |
10 ms |
15956 KB |
Output is correct |
87 |
Correct |
10 ms |
15996 KB |
Output is correct |
88 |
Correct |
11 ms |
15972 KB |
Output is correct |
89 |
Correct |
10 ms |
15968 KB |
Output is correct |
90 |
Correct |
11 ms |
16628 KB |
Output is correct |
91 |
Correct |
10 ms |
16348 KB |
Output is correct |
92 |
Correct |
10 ms |
16340 KB |
Output is correct |
93 |
Correct |
10 ms |
16340 KB |
Output is correct |
94 |
Correct |
9 ms |
16220 KB |
Output is correct |
95 |
Correct |
9 ms |
16084 KB |
Output is correct |
96 |
Correct |
9 ms |
15972 KB |
Output is correct |
97 |
Correct |
11 ms |
16084 KB |
Output is correct |
98 |
Correct |
9 ms |
15972 KB |
Output is correct |
99 |
Correct |
12 ms |
16084 KB |
Output is correct |
100 |
Correct |
9 ms |
15972 KB |
Output is correct |
101 |
Correct |
11 ms |
15956 KB |
Output is correct |
102 |
Correct |
9 ms |
16084 KB |
Output is correct |
103 |
Correct |
9 ms |
16012 KB |
Output is correct |
104 |
Correct |
10 ms |
16100 KB |
Output is correct |
105 |
Correct |
10 ms |
15984 KB |
Output is correct |
106 |
Correct |
10 ms |
16084 KB |
Output is correct |
107 |
Correct |
15 ms |
17888 KB |
Output is correct |
108 |
Correct |
12 ms |
16724 KB |
Output is correct |
109 |
Correct |
19 ms |
18272 KB |
Output is correct |
110 |
Correct |
14 ms |
17492 KB |
Output is correct |
111 |
Correct |
15 ms |
18004 KB |
Output is correct |
112 |
Correct |
14 ms |
16596 KB |
Output is correct |
113 |
Correct |
12 ms |
16616 KB |
Output is correct |
114 |
Correct |
13 ms |
16620 KB |
Output is correct |
115 |
Correct |
11 ms |
16268 KB |
Output is correct |
116 |
Correct |
12 ms |
16596 KB |
Output is correct |
117 |
Correct |
12 ms |
16492 KB |
Output is correct |
118 |
Correct |
30 ms |
19280 KB |
Output is correct |
119 |
Correct |
27 ms |
19776 KB |
Output is correct |
120 |
Correct |
38 ms |
20284 KB |
Output is correct |
121 |
Correct |
19 ms |
20060 KB |
Output is correct |
122 |
Correct |
18 ms |
20052 KB |
Output is correct |
123 |
Correct |
17 ms |
20052 KB |
Output is correct |
124 |
Correct |
18 ms |
20112 KB |
Output is correct |
125 |
Correct |
19 ms |
20052 KB |
Output is correct |
126 |
Correct |
12 ms |
16724 KB |
Output is correct |
127 |
Correct |
13 ms |
16724 KB |
Output is correct |
128 |
Correct |
12 ms |
16724 KB |
Output is correct |
129 |
Correct |
12 ms |
16748 KB |
Output is correct |
130 |
Correct |
15 ms |
16696 KB |
Output is correct |
131 |
Correct |
13 ms |
16724 KB |
Output is correct |
132 |
Correct |
38 ms |
20592 KB |
Output is correct |
133 |
Correct |
37 ms |
20556 KB |
Output is correct |
134 |
Correct |
34 ms |
20676 KB |
Output is correct |
135 |
Correct |
17 ms |
19688 KB |
Output is correct |
136 |
Correct |
1000 ms |
423448 KB |
Output is correct |
137 |
Correct |
558 ms |
220344 KB |
Output is correct |
138 |
Correct |
443 ms |
177480 KB |
Output is correct |
139 |
Correct |
517 ms |
211348 KB |
Output is correct |
140 |
Correct |
360 ms |
132868 KB |
Output is correct |
141 |
Correct |
33 ms |
20480 KB |
Output is correct |
142 |
Correct |
29 ms |
20388 KB |
Output is correct |
143 |
Correct |
43 ms |
22136 KB |
Output is correct |
144 |
Correct |
28 ms |
20384 KB |
Output is correct |
145 |
Correct |
30 ms |
21044 KB |
Output is correct |
146 |
Correct |
26 ms |
20300 KB |
Output is correct |
147 |
Correct |
33 ms |
20528 KB |
Output is correct |
148 |
Correct |
17 ms |
18644 KB |
Output is correct |
149 |
Correct |
47 ms |
21152 KB |
Output is correct |
150 |
Correct |
17 ms |
18644 KB |
Output is correct |
151 |
Correct |
42 ms |
22420 KB |
Output is correct |
152 |
Correct |
23 ms |
20092 KB |
Output is correct |
153 |
Correct |
21 ms |
19412 KB |
Output is correct |
154 |
Correct |
26 ms |
20308 KB |
Output is correct |
155 |
Correct |
19 ms |
19068 KB |
Output is correct |
156 |
Correct |
19 ms |
19156 KB |
Output is correct |
157 |
Correct |
17 ms |
19668 KB |
Output is correct |
158 |
Runtime error |
887 ms |
524288 KB |
Execution killed with signal 9 |
159 |
Halted |
0 ms |
0 KB |
- |