#include <bits/stdc++.h>
#ifndef SKY
#include "paint.h"
#endif // SKY
using namespace std;
#define N 100010
#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];
int minimumInstructions(int NNN, int MMM, int KKK, vector<int> CCC,vector<int> AAA, vector<vector<int>> BBB)
{
vector<int>lis[N];
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 |
4 ms |
8020 KB |
Output is correct |
2 |
Correct |
5 ms |
8020 KB |
Output is correct |
3 |
Correct |
5 ms |
8020 KB |
Output is correct |
4 |
Correct |
5 ms |
8132 KB |
Output is correct |
5 |
Correct |
5 ms |
8020 KB |
Output is correct |
6 |
Correct |
4 ms |
8020 KB |
Output is correct |
7 |
Correct |
4 ms |
8028 KB |
Output is correct |
8 |
Correct |
4 ms |
8020 KB |
Output is correct |
9 |
Correct |
6 ms |
8148 KB |
Output is correct |
10 |
Correct |
5 ms |
8148 KB |
Output is correct |
11 |
Correct |
6 ms |
8148 KB |
Output is correct |
12 |
Correct |
4 ms |
8148 KB |
Output is correct |
13 |
Correct |
5 ms |
8148 KB |
Output is correct |
14 |
Correct |
5 ms |
8188 KB |
Output is correct |
15 |
Correct |
5 ms |
8220 KB |
Output is correct |
16 |
Correct |
5 ms |
8148 KB |
Output is correct |
17 |
Correct |
5 ms |
8148 KB |
Output is correct |
18 |
Correct |
5 ms |
8148 KB |
Output is correct |
19 |
Correct |
5 ms |
8148 KB |
Output is correct |
20 |
Correct |
5 ms |
8148 KB |
Output is correct |
21 |
Correct |
5 ms |
8148 KB |
Output is correct |
22 |
Correct |
21 ms |
12080 KB |
Output is correct |
23 |
Correct |
21 ms |
12116 KB |
Output is correct |
24 |
Correct |
20 ms |
12124 KB |
Output is correct |
25 |
Correct |
6 ms |
8296 KB |
Output is correct |
26 |
Correct |
5 ms |
8276 KB |
Output is correct |
27 |
Correct |
12 ms |
11220 KB |
Output is correct |
28 |
Correct |
12 ms |
11220 KB |
Output is correct |
29 |
Correct |
13 ms |
11244 KB |
Output is correct |
30 |
Correct |
12 ms |
11204 KB |
Output is correct |
31 |
Correct |
20 ms |
12132 KB |
Output is correct |
32 |
Correct |
16 ms |
12144 KB |
Output is correct |
33 |
Correct |
16 ms |
12088 KB |
Output is correct |
34 |
Correct |
17 ms |
12140 KB |
Output is correct |
35 |
Correct |
16 ms |
12116 KB |
Output is correct |
36 |
Correct |
17 ms |
12176 KB |
Output is correct |
37 |
Correct |
32 ms |
15196 KB |
Output is correct |
38 |
Correct |
32 ms |
15216 KB |
Output is correct |
39 |
Correct |
32 ms |
15136 KB |
Output is correct |
40 |
Correct |
10 ms |
9112 KB |
Output is correct |
41 |
Correct |
8 ms |
8708 KB |
Output is correct |
42 |
Correct |
45 ms |
23464 KB |
Output is correct |
43 |
Correct |
31 ms |
18260 KB |
Output is correct |
44 |
Correct |
31 ms |
17376 KB |
Output is correct |
45 |
Correct |
42 ms |
23572 KB |
Output is correct |
46 |
Correct |
90 ms |
29856 KB |
Output is correct |
47 |
Correct |
46 ms |
21924 KB |
Output is correct |
48 |
Correct |
49 ms |
24404 KB |
Output is correct |
49 |
Correct |
78 ms |
25472 KB |
Output is correct |
50 |
Correct |
68 ms |
26404 KB |
Output is correct |
51 |
Correct |
65 ms |
24748 KB |
Output is correct |
52 |
Correct |
16 ms |
9508 KB |
Output is correct |
53 |
Correct |
12 ms |
9456 KB |
Output is correct |
54 |
Correct |
43 ms |
23964 KB |
Output is correct |
55 |
Correct |
44 ms |
23968 KB |
Output is correct |
56 |
Correct |
42 ms |
23908 KB |
Output is correct |
57 |
Correct |
47 ms |
23784 KB |
Output is correct |
58 |
Correct |
80 ms |
33820 KB |
Output is correct |
59 |
Correct |
84 ms |
33784 KB |
Output is correct |
60 |
Correct |
87 ms |
33748 KB |
Output is correct |
61 |
Correct |
91 ms |
33828 KB |
Output is correct |
62 |
Correct |
82 ms |
33800 KB |
Output is correct |
63 |
Correct |
81 ms |
33832 KB |
Output is correct |
64 |
Correct |
92 ms |
32820 KB |
Output is correct |
65 |
Correct |
94 ms |
32768 KB |
Output is correct |
66 |
Correct |
96 ms |
32772 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
8020 KB |
Output is correct |
2 |
Correct |
5 ms |
8020 KB |
Output is correct |
3 |
Correct |
5 ms |
8020 KB |
Output is correct |
4 |
Correct |
5 ms |
8132 KB |
Output is correct |
5 |
Correct |
5 ms |
8020 KB |
Output is correct |
6 |
Correct |
4 ms |
8020 KB |
Output is correct |
7 |
Correct |
4 ms |
8028 KB |
Output is correct |
8 |
Correct |
4 ms |
8020 KB |
Output is correct |
9 |
Correct |
6 ms |
8148 KB |
Output is correct |
10 |
Correct |
5 ms |
8148 KB |
Output is correct |
11 |
Correct |
6 ms |
8148 KB |
Output is correct |
12 |
Correct |
4 ms |
8148 KB |
Output is correct |
13 |
Correct |
5 ms |
8148 KB |
Output is correct |
14 |
Correct |
5 ms |
8188 KB |
Output is correct |
15 |
Correct |
5 ms |
8220 KB |
Output is correct |
16 |
Correct |
5 ms |
8148 KB |
Output is correct |
17 |
Correct |
5 ms |
8148 KB |
Output is correct |
18 |
Correct |
5 ms |
8148 KB |
Output is correct |
19 |
Correct |
5 ms |
8148 KB |
Output is correct |
20 |
Correct |
5 ms |
8148 KB |
Output is correct |
21 |
Correct |
5 ms |
8148 KB |
Output is correct |
22 |
Correct |
5 ms |
8112 KB |
Output is correct |
23 |
Correct |
4 ms |
8020 KB |
Output is correct |
24 |
Correct |
4 ms |
8020 KB |
Output is correct |
25 |
Correct |
6 ms |
8132 KB |
Output is correct |
26 |
Correct |
5 ms |
8020 KB |
Output is correct |
27 |
Correct |
5 ms |
8148 KB |
Output is correct |
28 |
Correct |
5 ms |
8404 KB |
Output is correct |
29 |
Correct |
5 ms |
8276 KB |
Output is correct |
30 |
Correct |
5 ms |
8276 KB |
Output is correct |
31 |
Correct |
6 ms |
8276 KB |
Output is correct |
32 |
Correct |
6 ms |
8276 KB |
Output is correct |
33 |
Correct |
5 ms |
8148 KB |
Output is correct |
34 |
Correct |
5 ms |
8148 KB |
Output is correct |
35 |
Correct |
5 ms |
8148 KB |
Output is correct |
36 |
Correct |
5 ms |
8148 KB |
Output is correct |
37 |
Correct |
5 ms |
8148 KB |
Output is correct |
38 |
Correct |
5 ms |
8148 KB |
Output is correct |
39 |
Correct |
4 ms |
8148 KB |
Output is correct |
40 |
Correct |
5 ms |
8148 KB |
Output is correct |
41 |
Correct |
5 ms |
8148 KB |
Output is correct |
42 |
Correct |
5 ms |
8148 KB |
Output is correct |
43 |
Correct |
5 ms |
8148 KB |
Output is correct |
44 |
Correct |
5 ms |
8148 KB |
Output is correct |
45 |
Correct |
6 ms |
8772 KB |
Output is correct |
46 |
Correct |
6 ms |
8532 KB |
Output is correct |
47 |
Correct |
8 ms |
8532 KB |
Output is correct |
48 |
Correct |
6 ms |
8404 KB |
Output is correct |
49 |
Correct |
6 ms |
8328 KB |
Output is correct |
50 |
Correct |
5 ms |
8148 KB |
Output is correct |
51 |
Correct |
5 ms |
8148 KB |
Output is correct |
52 |
Correct |
5 ms |
8148 KB |
Output is correct |
53 |
Correct |
4 ms |
8148 KB |
Output is correct |
54 |
Correct |
4 ms |
8148 KB |
Output is correct |
55 |
Correct |
5 ms |
8148 KB |
Output is correct |
56 |
Correct |
6 ms |
8148 KB |
Output is correct |
57 |
Correct |
5 ms |
8148 KB |
Output is correct |
58 |
Correct |
5 ms |
8088 KB |
Output is correct |
59 |
Correct |
6 ms |
8148 KB |
Output is correct |
60 |
Correct |
5 ms |
8148 KB |
Output is correct |
61 |
Correct |
5 ms |
8148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8112 KB |
Output is correct |
2 |
Correct |
4 ms |
8020 KB |
Output is correct |
3 |
Correct |
4 ms |
8020 KB |
Output is correct |
4 |
Correct |
5 ms |
8020 KB |
Output is correct |
5 |
Correct |
5 ms |
8020 KB |
Output is correct |
6 |
Correct |
5 ms |
8132 KB |
Output is correct |
7 |
Correct |
5 ms |
8020 KB |
Output is correct |
8 |
Correct |
4 ms |
8020 KB |
Output is correct |
9 |
Correct |
4 ms |
8028 KB |
Output is correct |
10 |
Correct |
4 ms |
8020 KB |
Output is correct |
11 |
Correct |
6 ms |
8148 KB |
Output is correct |
12 |
Correct |
5 ms |
8148 KB |
Output is correct |
13 |
Correct |
6 ms |
8148 KB |
Output is correct |
14 |
Correct |
4 ms |
8148 KB |
Output is correct |
15 |
Correct |
5 ms |
8148 KB |
Output is correct |
16 |
Correct |
5 ms |
8188 KB |
Output is correct |
17 |
Correct |
5 ms |
8220 KB |
Output is correct |
18 |
Correct |
5 ms |
8148 KB |
Output is correct |
19 |
Correct |
5 ms |
8148 KB |
Output is correct |
20 |
Correct |
5 ms |
8148 KB |
Output is correct |
21 |
Correct |
5 ms |
8148 KB |
Output is correct |
22 |
Correct |
5 ms |
8148 KB |
Output is correct |
23 |
Correct |
5 ms |
8148 KB |
Output is correct |
24 |
Correct |
21 ms |
12080 KB |
Output is correct |
25 |
Correct |
21 ms |
12116 KB |
Output is correct |
26 |
Correct |
20 ms |
12124 KB |
Output is correct |
27 |
Correct |
4 ms |
8020 KB |
Output is correct |
28 |
Correct |
6 ms |
8132 KB |
Output is correct |
29 |
Correct |
5 ms |
8020 KB |
Output is correct |
30 |
Correct |
5 ms |
8148 KB |
Output is correct |
31 |
Correct |
5 ms |
8404 KB |
Output is correct |
32 |
Correct |
5 ms |
8276 KB |
Output is correct |
33 |
Correct |
5 ms |
8276 KB |
Output is correct |
34 |
Correct |
6 ms |
8276 KB |
Output is correct |
35 |
Correct |
6 ms |
8276 KB |
Output is correct |
36 |
Correct |
5 ms |
8148 KB |
Output is correct |
37 |
Correct |
5 ms |
8148 KB |
Output is correct |
38 |
Correct |
5 ms |
8148 KB |
Output is correct |
39 |
Correct |
5 ms |
8148 KB |
Output is correct |
40 |
Correct |
5 ms |
8148 KB |
Output is correct |
41 |
Correct |
5 ms |
8148 KB |
Output is correct |
42 |
Correct |
4 ms |
8148 KB |
Output is correct |
43 |
Correct |
5 ms |
8148 KB |
Output is correct |
44 |
Correct |
5 ms |
8148 KB |
Output is correct |
45 |
Correct |
5 ms |
8148 KB |
Output is correct |
46 |
Correct |
5 ms |
8148 KB |
Output is correct |
47 |
Correct |
5 ms |
8148 KB |
Output is correct |
48 |
Correct |
6 ms |
8772 KB |
Output is correct |
49 |
Correct |
6 ms |
8532 KB |
Output is correct |
50 |
Correct |
8 ms |
8532 KB |
Output is correct |
51 |
Correct |
6 ms |
8404 KB |
Output is correct |
52 |
Correct |
6 ms |
8328 KB |
Output is correct |
53 |
Correct |
5 ms |
8148 KB |
Output is correct |
54 |
Correct |
5 ms |
8148 KB |
Output is correct |
55 |
Correct |
5 ms |
8148 KB |
Output is correct |
56 |
Correct |
4 ms |
8148 KB |
Output is correct |
57 |
Correct |
4 ms |
8148 KB |
Output is correct |
58 |
Correct |
5 ms |
8148 KB |
Output is correct |
59 |
Correct |
6 ms |
8148 KB |
Output is correct |
60 |
Correct |
5 ms |
8148 KB |
Output is correct |
61 |
Correct |
5 ms |
8088 KB |
Output is correct |
62 |
Correct |
6 ms |
8148 KB |
Output is correct |
63 |
Correct |
5 ms |
8148 KB |
Output is correct |
64 |
Correct |
5 ms |
8148 KB |
Output is correct |
65 |
Correct |
9 ms |
10068 KB |
Output is correct |
66 |
Correct |
7 ms |
8944 KB |
Output is correct |
67 |
Correct |
11 ms |
10452 KB |
Output is correct |
68 |
Correct |
9 ms |
9752 KB |
Output is correct |
69 |
Correct |
10 ms |
10204 KB |
Output is correct |
70 |
Correct |
7 ms |
8660 KB |
Output is correct |
71 |
Correct |
7 ms |
8660 KB |
Output is correct |
72 |
Correct |
7 ms |
8660 KB |
Output is correct |
73 |
Correct |
6 ms |
8404 KB |
Output is correct |
74 |
Correct |
7 ms |
8660 KB |
Output is correct |
75 |
Correct |
6 ms |
8532 KB |
Output is correct |
76 |
Correct |
25 ms |
10816 KB |
Output is correct |
77 |
Correct |
27 ms |
11224 KB |
Output is correct |
78 |
Correct |
37 ms |
11560 KB |
Output is correct |
79 |
Correct |
15 ms |
12252 KB |
Output is correct |
80 |
Correct |
15 ms |
12312 KB |
Output is correct |
81 |
Correct |
14 ms |
12188 KB |
Output is correct |
82 |
Correct |
14 ms |
12244 KB |
Output is correct |
83 |
Correct |
15 ms |
12244 KB |
Output is correct |
84 |
Correct |
9 ms |
8916 KB |
Output is correct |
85 |
Correct |
10 ms |
8896 KB |
Output is correct |
86 |
Correct |
11 ms |
8892 KB |
Output is correct |
87 |
Correct |
8 ms |
8780 KB |
Output is correct |
88 |
Correct |
8 ms |
8788 KB |
Output is correct |
89 |
Correct |
7 ms |
8896 KB |
Output is correct |
90 |
Correct |
28 ms |
11920 KB |
Output is correct |
91 |
Correct |
28 ms |
11944 KB |
Output is correct |
92 |
Correct |
27 ms |
11888 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8112 KB |
Output is correct |
2 |
Correct |
4 ms |
8020 KB |
Output is correct |
3 |
Correct |
4 ms |
8020 KB |
Output is correct |
4 |
Correct |
5 ms |
8020 KB |
Output is correct |
5 |
Correct |
5 ms |
8020 KB |
Output is correct |
6 |
Correct |
5 ms |
8132 KB |
Output is correct |
7 |
Correct |
5 ms |
8020 KB |
Output is correct |
8 |
Correct |
4 ms |
8020 KB |
Output is correct |
9 |
Correct |
4 ms |
8028 KB |
Output is correct |
10 |
Correct |
4 ms |
8020 KB |
Output is correct |
11 |
Correct |
6 ms |
8148 KB |
Output is correct |
12 |
Correct |
5 ms |
8148 KB |
Output is correct |
13 |
Correct |
6 ms |
8148 KB |
Output is correct |
14 |
Correct |
4 ms |
8148 KB |
Output is correct |
15 |
Correct |
5 ms |
8148 KB |
Output is correct |
16 |
Correct |
5 ms |
8188 KB |
Output is correct |
17 |
Correct |
5 ms |
8220 KB |
Output is correct |
18 |
Correct |
5 ms |
8148 KB |
Output is correct |
19 |
Correct |
5 ms |
8148 KB |
Output is correct |
20 |
Correct |
5 ms |
8148 KB |
Output is correct |
21 |
Correct |
5 ms |
8148 KB |
Output is correct |
22 |
Correct |
5 ms |
8148 KB |
Output is correct |
23 |
Correct |
5 ms |
8148 KB |
Output is correct |
24 |
Correct |
21 ms |
12080 KB |
Output is correct |
25 |
Correct |
21 ms |
12116 KB |
Output is correct |
26 |
Correct |
20 ms |
12124 KB |
Output is correct |
27 |
Correct |
6 ms |
8296 KB |
Output is correct |
28 |
Correct |
5 ms |
8276 KB |
Output is correct |
29 |
Correct |
12 ms |
11220 KB |
Output is correct |
30 |
Correct |
12 ms |
11220 KB |
Output is correct |
31 |
Correct |
13 ms |
11244 KB |
Output is correct |
32 |
Correct |
12 ms |
11204 KB |
Output is correct |
33 |
Correct |
20 ms |
12132 KB |
Output is correct |
34 |
Correct |
16 ms |
12144 KB |
Output is correct |
35 |
Correct |
16 ms |
12088 KB |
Output is correct |
36 |
Correct |
17 ms |
12140 KB |
Output is correct |
37 |
Correct |
16 ms |
12116 KB |
Output is correct |
38 |
Correct |
17 ms |
12176 KB |
Output is correct |
39 |
Correct |
32 ms |
15196 KB |
Output is correct |
40 |
Correct |
32 ms |
15216 KB |
Output is correct |
41 |
Correct |
32 ms |
15136 KB |
Output is correct |
42 |
Correct |
4 ms |
8020 KB |
Output is correct |
43 |
Correct |
6 ms |
8132 KB |
Output is correct |
44 |
Correct |
5 ms |
8020 KB |
Output is correct |
45 |
Correct |
5 ms |
8148 KB |
Output is correct |
46 |
Correct |
5 ms |
8404 KB |
Output is correct |
47 |
Correct |
5 ms |
8276 KB |
Output is correct |
48 |
Correct |
5 ms |
8276 KB |
Output is correct |
49 |
Correct |
6 ms |
8276 KB |
Output is correct |
50 |
Correct |
6 ms |
8276 KB |
Output is correct |
51 |
Correct |
5 ms |
8148 KB |
Output is correct |
52 |
Correct |
5 ms |
8148 KB |
Output is correct |
53 |
Correct |
5 ms |
8148 KB |
Output is correct |
54 |
Correct |
5 ms |
8148 KB |
Output is correct |
55 |
Correct |
5 ms |
8148 KB |
Output is correct |
56 |
Correct |
5 ms |
8148 KB |
Output is correct |
57 |
Correct |
4 ms |
8148 KB |
Output is correct |
58 |
Correct |
5 ms |
8148 KB |
Output is correct |
59 |
Correct |
5 ms |
8148 KB |
Output is correct |
60 |
Correct |
5 ms |
8148 KB |
Output is correct |
61 |
Correct |
5 ms |
8148 KB |
Output is correct |
62 |
Correct |
5 ms |
8148 KB |
Output is correct |
63 |
Correct |
6 ms |
8772 KB |
Output is correct |
64 |
Correct |
6 ms |
8532 KB |
Output is correct |
65 |
Correct |
8 ms |
8532 KB |
Output is correct |
66 |
Correct |
6 ms |
8404 KB |
Output is correct |
67 |
Correct |
6 ms |
8328 KB |
Output is correct |
68 |
Correct |
5 ms |
8148 KB |
Output is correct |
69 |
Correct |
5 ms |
8148 KB |
Output is correct |
70 |
Correct |
5 ms |
8148 KB |
Output is correct |
71 |
Correct |
4 ms |
8148 KB |
Output is correct |
72 |
Correct |
4 ms |
8148 KB |
Output is correct |
73 |
Correct |
5 ms |
8148 KB |
Output is correct |
74 |
Correct |
6 ms |
8148 KB |
Output is correct |
75 |
Correct |
5 ms |
8148 KB |
Output is correct |
76 |
Correct |
5 ms |
8088 KB |
Output is correct |
77 |
Correct |
6 ms |
8148 KB |
Output is correct |
78 |
Correct |
5 ms |
8148 KB |
Output is correct |
79 |
Correct |
5 ms |
8148 KB |
Output is correct |
80 |
Correct |
9 ms |
10068 KB |
Output is correct |
81 |
Correct |
7 ms |
8944 KB |
Output is correct |
82 |
Correct |
11 ms |
10452 KB |
Output is correct |
83 |
Correct |
9 ms |
9752 KB |
Output is correct |
84 |
Correct |
10 ms |
10204 KB |
Output is correct |
85 |
Correct |
7 ms |
8660 KB |
Output is correct |
86 |
Correct |
7 ms |
8660 KB |
Output is correct |
87 |
Correct |
7 ms |
8660 KB |
Output is correct |
88 |
Correct |
6 ms |
8404 KB |
Output is correct |
89 |
Correct |
7 ms |
8660 KB |
Output is correct |
90 |
Correct |
6 ms |
8532 KB |
Output is correct |
91 |
Correct |
25 ms |
10816 KB |
Output is correct |
92 |
Correct |
27 ms |
11224 KB |
Output is correct |
93 |
Correct |
37 ms |
11560 KB |
Output is correct |
94 |
Correct |
15 ms |
12252 KB |
Output is correct |
95 |
Correct |
15 ms |
12312 KB |
Output is correct |
96 |
Correct |
14 ms |
12188 KB |
Output is correct |
97 |
Correct |
14 ms |
12244 KB |
Output is correct |
98 |
Correct |
15 ms |
12244 KB |
Output is correct |
99 |
Correct |
9 ms |
8916 KB |
Output is correct |
100 |
Correct |
10 ms |
8896 KB |
Output is correct |
101 |
Correct |
11 ms |
8892 KB |
Output is correct |
102 |
Correct |
8 ms |
8780 KB |
Output is correct |
103 |
Correct |
8 ms |
8788 KB |
Output is correct |
104 |
Correct |
7 ms |
8896 KB |
Output is correct |
105 |
Correct |
28 ms |
11920 KB |
Output is correct |
106 |
Correct |
28 ms |
11944 KB |
Output is correct |
107 |
Correct |
27 ms |
11888 KB |
Output is correct |
108 |
Correct |
15 ms |
11860 KB |
Output is correct |
109 |
Correct |
954 ms |
415616 KB |
Output is correct |
110 |
Correct |
497 ms |
212544 KB |
Output is correct |
111 |
Correct |
449 ms |
169656 KB |
Output is correct |
112 |
Correct |
510 ms |
203332 KB |
Output is correct |
113 |
Correct |
356 ms |
125072 KB |
Output is correct |
114 |
Correct |
22 ms |
12296 KB |
Output is correct |
115 |
Correct |
22 ms |
12260 KB |
Output is correct |
116 |
Correct |
26 ms |
13856 KB |
Output is correct |
117 |
Correct |
21 ms |
12096 KB |
Output is correct |
118 |
Correct |
23 ms |
12784 KB |
Output is correct |
119 |
Correct |
24 ms |
12116 KB |
Output is correct |
120 |
Correct |
25 ms |
12116 KB |
Output is correct |
121 |
Correct |
15 ms |
10708 KB |
Output is correct |
122 |
Correct |
28 ms |
12628 KB |
Output is correct |
123 |
Correct |
13 ms |
10580 KB |
Output is correct |
124 |
Correct |
37 ms |
13816 KB |
Output is correct |
125 |
Correct |
17 ms |
12116 KB |
Output is correct |
126 |
Correct |
15 ms |
11348 KB |
Output is correct |
127 |
Correct |
23 ms |
12116 KB |
Output is correct |
128 |
Correct |
14 ms |
10964 KB |
Output is correct |
129 |
Correct |
16 ms |
11112 KB |
Output is correct |
130 |
Correct |
13 ms |
11860 KB |
Output is correct |
131 |
Runtime error |
890 ms |
524288 KB |
Execution killed with signal 9 |
132 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8112 KB |
Output is correct |
2 |
Correct |
4 ms |
8020 KB |
Output is correct |
3 |
Correct |
4 ms |
8020 KB |
Output is correct |
4 |
Correct |
5 ms |
8020 KB |
Output is correct |
5 |
Correct |
5 ms |
8020 KB |
Output is correct |
6 |
Correct |
5 ms |
8132 KB |
Output is correct |
7 |
Correct |
5 ms |
8020 KB |
Output is correct |
8 |
Correct |
4 ms |
8020 KB |
Output is correct |
9 |
Correct |
4 ms |
8028 KB |
Output is correct |
10 |
Correct |
4 ms |
8020 KB |
Output is correct |
11 |
Correct |
6 ms |
8148 KB |
Output is correct |
12 |
Correct |
5 ms |
8148 KB |
Output is correct |
13 |
Correct |
6 ms |
8148 KB |
Output is correct |
14 |
Correct |
4 ms |
8148 KB |
Output is correct |
15 |
Correct |
5 ms |
8148 KB |
Output is correct |
16 |
Correct |
5 ms |
8188 KB |
Output is correct |
17 |
Correct |
5 ms |
8220 KB |
Output is correct |
18 |
Correct |
5 ms |
8148 KB |
Output is correct |
19 |
Correct |
5 ms |
8148 KB |
Output is correct |
20 |
Correct |
5 ms |
8148 KB |
Output is correct |
21 |
Correct |
5 ms |
8148 KB |
Output is correct |
22 |
Correct |
5 ms |
8148 KB |
Output is correct |
23 |
Correct |
5 ms |
8148 KB |
Output is correct |
24 |
Correct |
21 ms |
12080 KB |
Output is correct |
25 |
Correct |
21 ms |
12116 KB |
Output is correct |
26 |
Correct |
20 ms |
12124 KB |
Output is correct |
27 |
Correct |
6 ms |
8296 KB |
Output is correct |
28 |
Correct |
5 ms |
8276 KB |
Output is correct |
29 |
Correct |
12 ms |
11220 KB |
Output is correct |
30 |
Correct |
12 ms |
11220 KB |
Output is correct |
31 |
Correct |
13 ms |
11244 KB |
Output is correct |
32 |
Correct |
12 ms |
11204 KB |
Output is correct |
33 |
Correct |
20 ms |
12132 KB |
Output is correct |
34 |
Correct |
16 ms |
12144 KB |
Output is correct |
35 |
Correct |
16 ms |
12088 KB |
Output is correct |
36 |
Correct |
17 ms |
12140 KB |
Output is correct |
37 |
Correct |
16 ms |
12116 KB |
Output is correct |
38 |
Correct |
17 ms |
12176 KB |
Output is correct |
39 |
Correct |
32 ms |
15196 KB |
Output is correct |
40 |
Correct |
32 ms |
15216 KB |
Output is correct |
41 |
Correct |
32 ms |
15136 KB |
Output is correct |
42 |
Correct |
10 ms |
9112 KB |
Output is correct |
43 |
Correct |
8 ms |
8708 KB |
Output is correct |
44 |
Correct |
45 ms |
23464 KB |
Output is correct |
45 |
Correct |
31 ms |
18260 KB |
Output is correct |
46 |
Correct |
31 ms |
17376 KB |
Output is correct |
47 |
Correct |
42 ms |
23572 KB |
Output is correct |
48 |
Correct |
90 ms |
29856 KB |
Output is correct |
49 |
Correct |
46 ms |
21924 KB |
Output is correct |
50 |
Correct |
49 ms |
24404 KB |
Output is correct |
51 |
Correct |
78 ms |
25472 KB |
Output is correct |
52 |
Correct |
68 ms |
26404 KB |
Output is correct |
53 |
Correct |
65 ms |
24748 KB |
Output is correct |
54 |
Correct |
16 ms |
9508 KB |
Output is correct |
55 |
Correct |
12 ms |
9456 KB |
Output is correct |
56 |
Correct |
43 ms |
23964 KB |
Output is correct |
57 |
Correct |
44 ms |
23968 KB |
Output is correct |
58 |
Correct |
42 ms |
23908 KB |
Output is correct |
59 |
Correct |
47 ms |
23784 KB |
Output is correct |
60 |
Correct |
80 ms |
33820 KB |
Output is correct |
61 |
Correct |
84 ms |
33784 KB |
Output is correct |
62 |
Correct |
87 ms |
33748 KB |
Output is correct |
63 |
Correct |
91 ms |
33828 KB |
Output is correct |
64 |
Correct |
82 ms |
33800 KB |
Output is correct |
65 |
Correct |
81 ms |
33832 KB |
Output is correct |
66 |
Correct |
92 ms |
32820 KB |
Output is correct |
67 |
Correct |
94 ms |
32768 KB |
Output is correct |
68 |
Correct |
96 ms |
32772 KB |
Output is correct |
69 |
Correct |
4 ms |
8020 KB |
Output is correct |
70 |
Correct |
6 ms |
8132 KB |
Output is correct |
71 |
Correct |
5 ms |
8020 KB |
Output is correct |
72 |
Correct |
5 ms |
8148 KB |
Output is correct |
73 |
Correct |
5 ms |
8404 KB |
Output is correct |
74 |
Correct |
5 ms |
8276 KB |
Output is correct |
75 |
Correct |
5 ms |
8276 KB |
Output is correct |
76 |
Correct |
6 ms |
8276 KB |
Output is correct |
77 |
Correct |
6 ms |
8276 KB |
Output is correct |
78 |
Correct |
5 ms |
8148 KB |
Output is correct |
79 |
Correct |
5 ms |
8148 KB |
Output is correct |
80 |
Correct |
5 ms |
8148 KB |
Output is correct |
81 |
Correct |
5 ms |
8148 KB |
Output is correct |
82 |
Correct |
5 ms |
8148 KB |
Output is correct |
83 |
Correct |
5 ms |
8148 KB |
Output is correct |
84 |
Correct |
4 ms |
8148 KB |
Output is correct |
85 |
Correct |
5 ms |
8148 KB |
Output is correct |
86 |
Correct |
5 ms |
8148 KB |
Output is correct |
87 |
Correct |
5 ms |
8148 KB |
Output is correct |
88 |
Correct |
5 ms |
8148 KB |
Output is correct |
89 |
Correct |
5 ms |
8148 KB |
Output is correct |
90 |
Correct |
6 ms |
8772 KB |
Output is correct |
91 |
Correct |
6 ms |
8532 KB |
Output is correct |
92 |
Correct |
8 ms |
8532 KB |
Output is correct |
93 |
Correct |
6 ms |
8404 KB |
Output is correct |
94 |
Correct |
6 ms |
8328 KB |
Output is correct |
95 |
Correct |
5 ms |
8148 KB |
Output is correct |
96 |
Correct |
5 ms |
8148 KB |
Output is correct |
97 |
Correct |
5 ms |
8148 KB |
Output is correct |
98 |
Correct |
4 ms |
8148 KB |
Output is correct |
99 |
Correct |
4 ms |
8148 KB |
Output is correct |
100 |
Correct |
5 ms |
8148 KB |
Output is correct |
101 |
Correct |
6 ms |
8148 KB |
Output is correct |
102 |
Correct |
5 ms |
8148 KB |
Output is correct |
103 |
Correct |
5 ms |
8088 KB |
Output is correct |
104 |
Correct |
6 ms |
8148 KB |
Output is correct |
105 |
Correct |
5 ms |
8148 KB |
Output is correct |
106 |
Correct |
5 ms |
8148 KB |
Output is correct |
107 |
Correct |
9 ms |
10068 KB |
Output is correct |
108 |
Correct |
7 ms |
8944 KB |
Output is correct |
109 |
Correct |
11 ms |
10452 KB |
Output is correct |
110 |
Correct |
9 ms |
9752 KB |
Output is correct |
111 |
Correct |
10 ms |
10204 KB |
Output is correct |
112 |
Correct |
7 ms |
8660 KB |
Output is correct |
113 |
Correct |
7 ms |
8660 KB |
Output is correct |
114 |
Correct |
7 ms |
8660 KB |
Output is correct |
115 |
Correct |
6 ms |
8404 KB |
Output is correct |
116 |
Correct |
7 ms |
8660 KB |
Output is correct |
117 |
Correct |
6 ms |
8532 KB |
Output is correct |
118 |
Correct |
25 ms |
10816 KB |
Output is correct |
119 |
Correct |
27 ms |
11224 KB |
Output is correct |
120 |
Correct |
37 ms |
11560 KB |
Output is correct |
121 |
Correct |
15 ms |
12252 KB |
Output is correct |
122 |
Correct |
15 ms |
12312 KB |
Output is correct |
123 |
Correct |
14 ms |
12188 KB |
Output is correct |
124 |
Correct |
14 ms |
12244 KB |
Output is correct |
125 |
Correct |
15 ms |
12244 KB |
Output is correct |
126 |
Correct |
9 ms |
8916 KB |
Output is correct |
127 |
Correct |
10 ms |
8896 KB |
Output is correct |
128 |
Correct |
11 ms |
8892 KB |
Output is correct |
129 |
Correct |
8 ms |
8780 KB |
Output is correct |
130 |
Correct |
8 ms |
8788 KB |
Output is correct |
131 |
Correct |
7 ms |
8896 KB |
Output is correct |
132 |
Correct |
28 ms |
11920 KB |
Output is correct |
133 |
Correct |
28 ms |
11944 KB |
Output is correct |
134 |
Correct |
27 ms |
11888 KB |
Output is correct |
135 |
Correct |
15 ms |
11860 KB |
Output is correct |
136 |
Correct |
954 ms |
415616 KB |
Output is correct |
137 |
Correct |
497 ms |
212544 KB |
Output is correct |
138 |
Correct |
449 ms |
169656 KB |
Output is correct |
139 |
Correct |
510 ms |
203332 KB |
Output is correct |
140 |
Correct |
356 ms |
125072 KB |
Output is correct |
141 |
Correct |
22 ms |
12296 KB |
Output is correct |
142 |
Correct |
22 ms |
12260 KB |
Output is correct |
143 |
Correct |
26 ms |
13856 KB |
Output is correct |
144 |
Correct |
21 ms |
12096 KB |
Output is correct |
145 |
Correct |
23 ms |
12784 KB |
Output is correct |
146 |
Correct |
24 ms |
12116 KB |
Output is correct |
147 |
Correct |
25 ms |
12116 KB |
Output is correct |
148 |
Correct |
15 ms |
10708 KB |
Output is correct |
149 |
Correct |
28 ms |
12628 KB |
Output is correct |
150 |
Correct |
13 ms |
10580 KB |
Output is correct |
151 |
Correct |
37 ms |
13816 KB |
Output is correct |
152 |
Correct |
17 ms |
12116 KB |
Output is correct |
153 |
Correct |
15 ms |
11348 KB |
Output is correct |
154 |
Correct |
23 ms |
12116 KB |
Output is correct |
155 |
Correct |
14 ms |
10964 KB |
Output is correct |
156 |
Correct |
16 ms |
11112 KB |
Output is correct |
157 |
Correct |
13 ms |
11860 KB |
Output is correct |
158 |
Runtime error |
890 ms |
524288 KB |
Execution killed with signal 9 |
159 |
Halted |
0 ms |
0 KB |
- |