#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;
int cnt=0;
for(int i=0;i<m;i++)
cnt+=AAA[i];
// cout<<cnt<<endl;
if(cnt>1e7)
{
while(1);
}
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
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
15956 KB |
Output is correct |
2 |
Correct |
10 ms |
15956 KB |
Output is correct |
3 |
Correct |
10 ms |
15956 KB |
Output is correct |
4 |
Correct |
9 ms |
15972 KB |
Output is correct |
5 |
Correct |
9 ms |
15956 KB |
Output is correct |
6 |
Correct |
8 ms |
15976 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
9 ms |
15976 KB |
Output is correct |
9 |
Correct |
9 ms |
15972 KB |
Output is correct |
10 |
Correct |
9 ms |
15956 KB |
Output is correct |
11 |
Correct |
11 ms |
16060 KB |
Output is correct |
12 |
Correct |
10 ms |
15956 KB |
Output is correct |
13 |
Correct |
9 ms |
16080 KB |
Output is correct |
14 |
Correct |
9 ms |
16084 KB |
Output is correct |
15 |
Correct |
9 ms |
16076 KB |
Output is correct |
16 |
Correct |
9 ms |
16084 KB |
Output is correct |
17 |
Correct |
9 ms |
16084 KB |
Output is correct |
18 |
Correct |
9 ms |
16008 KB |
Output is correct |
19 |
Correct |
9 ms |
16032 KB |
Output is correct |
20 |
Correct |
9 ms |
15956 KB |
Output is correct |
21 |
Correct |
9 ms |
15956 KB |
Output is correct |
22 |
Correct |
25 ms |
19848 KB |
Output is correct |
23 |
Correct |
25 ms |
19900 KB |
Output is correct |
24 |
Correct |
35 ms |
19932 KB |
Output is correct |
25 |
Correct |
10 ms |
16084 KB |
Output is correct |
26 |
Correct |
10 ms |
16084 KB |
Output is correct |
27 |
Correct |
14 ms |
18988 KB |
Output is correct |
28 |
Correct |
14 ms |
19028 KB |
Output is correct |
29 |
Correct |
14 ms |
19028 KB |
Output is correct |
30 |
Correct |
14 ms |
18956 KB |
Output is correct |
31 |
Correct |
18 ms |
19924 KB |
Output is correct |
32 |
Correct |
19 ms |
20008 KB |
Output is correct |
33 |
Correct |
19 ms |
19944 KB |
Output is correct |
34 |
Correct |
25 ms |
19924 KB |
Output is correct |
35 |
Correct |
20 ms |
20008 KB |
Output is correct |
36 |
Correct |
19 ms |
20016 KB |
Output is correct |
37 |
Correct |
34 ms |
23072 KB |
Output is correct |
38 |
Correct |
34 ms |
23116 KB |
Output is correct |
39 |
Correct |
34 ms |
23080 KB |
Output is correct |
40 |
Correct |
16 ms |
16980 KB |
Output is correct |
41 |
Correct |
13 ms |
16596 KB |
Output is correct |
42 |
Correct |
33 ms |
31344 KB |
Output is correct |
43 |
Correct |
27 ms |
26220 KB |
Output is correct |
44 |
Correct |
24 ms |
25164 KB |
Output is correct |
45 |
Correct |
32 ms |
31452 KB |
Output is correct |
46 |
Correct |
62 ms |
37648 KB |
Output is correct |
47 |
Correct |
47 ms |
29104 KB |
Output is correct |
48 |
Correct |
45 ms |
31608 KB |
Output is correct |
49 |
Correct |
55 ms |
32420 KB |
Output is correct |
50 |
Correct |
62 ms |
33356 KB |
Output is correct |
51 |
Correct |
49 ms |
31692 KB |
Output is correct |
52 |
Correct |
15 ms |
17136 KB |
Output is correct |
53 |
Correct |
15 ms |
17040 KB |
Output is correct |
54 |
Correct |
33 ms |
31568 KB |
Output is correct |
55 |
Correct |
34 ms |
31612 KB |
Output is correct |
56 |
Correct |
40 ms |
31632 KB |
Output is correct |
57 |
Correct |
37 ms |
31440 KB |
Output is correct |
58 |
Correct |
68 ms |
40304 KB |
Output is correct |
59 |
Correct |
69 ms |
40416 KB |
Output is correct |
60 |
Correct |
67 ms |
40300 KB |
Output is correct |
61 |
Correct |
72 ms |
40396 KB |
Output is correct |
62 |
Correct |
70 ms |
40388 KB |
Output is correct |
63 |
Correct |
75 ms |
40360 KB |
Output is correct |
64 |
Correct |
74 ms |
39372 KB |
Output is correct |
65 |
Correct |
72 ms |
39412 KB |
Output is correct |
66 |
Correct |
72 ms |
39404 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
15956 KB |
Output is correct |
2 |
Correct |
10 ms |
15956 KB |
Output is correct |
3 |
Correct |
10 ms |
15956 KB |
Output is correct |
4 |
Correct |
9 ms |
15972 KB |
Output is correct |
5 |
Correct |
9 ms |
15956 KB |
Output is correct |
6 |
Correct |
8 ms |
15976 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
9 ms |
15976 KB |
Output is correct |
9 |
Correct |
9 ms |
15972 KB |
Output is correct |
10 |
Correct |
9 ms |
15956 KB |
Output is correct |
11 |
Correct |
11 ms |
16060 KB |
Output is correct |
12 |
Correct |
10 ms |
15956 KB |
Output is correct |
13 |
Correct |
9 ms |
16080 KB |
Output is correct |
14 |
Correct |
9 ms |
16084 KB |
Output is correct |
15 |
Correct |
9 ms |
16076 KB |
Output is correct |
16 |
Correct |
9 ms |
16084 KB |
Output is correct |
17 |
Correct |
9 ms |
16084 KB |
Output is correct |
18 |
Correct |
9 ms |
16008 KB |
Output is correct |
19 |
Correct |
9 ms |
16032 KB |
Output is correct |
20 |
Correct |
9 ms |
15956 KB |
Output is correct |
21 |
Correct |
9 ms |
15956 KB |
Output is correct |
22 |
Correct |
10 ms |
15956 KB |
Output is correct |
23 |
Correct |
9 ms |
15956 KB |
Output is correct |
24 |
Correct |
10 ms |
15956 KB |
Output is correct |
25 |
Correct |
9 ms |
15956 KB |
Output is correct |
26 |
Correct |
11 ms |
15888 KB |
Output is correct |
27 |
Correct |
9 ms |
15956 KB |
Output is correct |
28 |
Correct |
10 ms |
16212 KB |
Output is correct |
29 |
Correct |
11 ms |
16168 KB |
Output is correct |
30 |
Correct |
9 ms |
16108 KB |
Output is correct |
31 |
Correct |
10 ms |
16084 KB |
Output is correct |
32 |
Correct |
10 ms |
16140 KB |
Output is correct |
33 |
Correct |
10 ms |
15996 KB |
Output is correct |
34 |
Correct |
10 ms |
16072 KB |
Output is correct |
35 |
Correct |
9 ms |
15956 KB |
Output is correct |
36 |
Correct |
10 ms |
15956 KB |
Output is correct |
37 |
Correct |
9 ms |
15956 KB |
Output is correct |
38 |
Correct |
9 ms |
15956 KB |
Output is correct |
39 |
Correct |
9 ms |
15956 KB |
Output is correct |
40 |
Correct |
9 ms |
15952 KB |
Output is correct |
41 |
Correct |
9 ms |
15956 KB |
Output is correct |
42 |
Correct |
9 ms |
15956 KB |
Output is correct |
43 |
Correct |
9 ms |
15956 KB |
Output is correct |
44 |
Correct |
10 ms |
16072 KB |
Output is correct |
45 |
Correct |
12 ms |
16684 KB |
Output is correct |
46 |
Correct |
10 ms |
16340 KB |
Output is correct |
47 |
Correct |
10 ms |
16388 KB |
Output is correct |
48 |
Correct |
10 ms |
16248 KB |
Output is correct |
49 |
Correct |
11 ms |
16212 KB |
Output is correct |
50 |
Correct |
10 ms |
16084 KB |
Output is correct |
51 |
Correct |
9 ms |
16000 KB |
Output is correct |
52 |
Correct |
10 ms |
16080 KB |
Output is correct |
53 |
Correct |
9 ms |
16084 KB |
Output is correct |
54 |
Correct |
9 ms |
16084 KB |
Output is correct |
55 |
Correct |
11 ms |
16044 KB |
Output is correct |
56 |
Correct |
9 ms |
16032 KB |
Output is correct |
57 |
Correct |
9 ms |
16084 KB |
Output is correct |
58 |
Correct |
14 ms |
15984 KB |
Output is correct |
59 |
Correct |
10 ms |
16084 KB |
Output is correct |
60 |
Correct |
9 ms |
15988 KB |
Output is correct |
61 |
Correct |
9 ms |
16084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
15956 KB |
Output is correct |
2 |
Correct |
9 ms |
15956 KB |
Output is correct |
3 |
Correct |
9 ms |
15956 KB |
Output is correct |
4 |
Correct |
10 ms |
15956 KB |
Output is correct |
5 |
Correct |
10 ms |
15956 KB |
Output is correct |
6 |
Correct |
9 ms |
15972 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
8 ms |
15976 KB |
Output is correct |
9 |
Correct |
9 ms |
15956 KB |
Output is correct |
10 |
Correct |
9 ms |
15976 KB |
Output is correct |
11 |
Correct |
9 ms |
15972 KB |
Output is correct |
12 |
Correct |
9 ms |
15956 KB |
Output is correct |
13 |
Correct |
11 ms |
16060 KB |
Output is correct |
14 |
Correct |
10 ms |
15956 KB |
Output is correct |
15 |
Correct |
9 ms |
16080 KB |
Output is correct |
16 |
Correct |
9 ms |
16084 KB |
Output is correct |
17 |
Correct |
9 ms |
16076 KB |
Output is correct |
18 |
Correct |
9 ms |
16084 KB |
Output is correct |
19 |
Correct |
9 ms |
16084 KB |
Output is correct |
20 |
Correct |
9 ms |
16008 KB |
Output is correct |
21 |
Correct |
9 ms |
16032 KB |
Output is correct |
22 |
Correct |
9 ms |
15956 KB |
Output is correct |
23 |
Correct |
9 ms |
15956 KB |
Output is correct |
24 |
Correct |
25 ms |
19848 KB |
Output is correct |
25 |
Correct |
25 ms |
19900 KB |
Output is correct |
26 |
Correct |
35 ms |
19932 KB |
Output is correct |
27 |
Correct |
10 ms |
15956 KB |
Output is correct |
28 |
Correct |
9 ms |
15956 KB |
Output is correct |
29 |
Correct |
11 ms |
15888 KB |
Output is correct |
30 |
Correct |
9 ms |
15956 KB |
Output is correct |
31 |
Correct |
10 ms |
16212 KB |
Output is correct |
32 |
Correct |
11 ms |
16168 KB |
Output is correct |
33 |
Correct |
9 ms |
16108 KB |
Output is correct |
34 |
Correct |
10 ms |
16084 KB |
Output is correct |
35 |
Correct |
10 ms |
16140 KB |
Output is correct |
36 |
Correct |
10 ms |
15996 KB |
Output is correct |
37 |
Correct |
10 ms |
16072 KB |
Output is correct |
38 |
Correct |
9 ms |
15956 KB |
Output is correct |
39 |
Correct |
10 ms |
15956 KB |
Output is correct |
40 |
Correct |
9 ms |
15956 KB |
Output is correct |
41 |
Correct |
9 ms |
15956 KB |
Output is correct |
42 |
Correct |
9 ms |
15956 KB |
Output is correct |
43 |
Correct |
9 ms |
15952 KB |
Output is correct |
44 |
Correct |
9 ms |
15956 KB |
Output is correct |
45 |
Correct |
9 ms |
15956 KB |
Output is correct |
46 |
Correct |
9 ms |
15956 KB |
Output is correct |
47 |
Correct |
10 ms |
16072 KB |
Output is correct |
48 |
Correct |
12 ms |
16684 KB |
Output is correct |
49 |
Correct |
10 ms |
16340 KB |
Output is correct |
50 |
Correct |
10 ms |
16388 KB |
Output is correct |
51 |
Correct |
10 ms |
16248 KB |
Output is correct |
52 |
Correct |
11 ms |
16212 KB |
Output is correct |
53 |
Correct |
10 ms |
16084 KB |
Output is correct |
54 |
Correct |
9 ms |
16000 KB |
Output is correct |
55 |
Correct |
10 ms |
16080 KB |
Output is correct |
56 |
Correct |
9 ms |
16084 KB |
Output is correct |
57 |
Correct |
9 ms |
16084 KB |
Output is correct |
58 |
Correct |
11 ms |
16044 KB |
Output is correct |
59 |
Correct |
9 ms |
16032 KB |
Output is correct |
60 |
Correct |
9 ms |
16084 KB |
Output is correct |
61 |
Correct |
14 ms |
15984 KB |
Output is correct |
62 |
Correct |
10 ms |
16084 KB |
Output is correct |
63 |
Correct |
9 ms |
15988 KB |
Output is correct |
64 |
Correct |
9 ms |
16084 KB |
Output is correct |
65 |
Correct |
14 ms |
17900 KB |
Output is correct |
66 |
Correct |
12 ms |
16768 KB |
Output is correct |
67 |
Correct |
15 ms |
18388 KB |
Output is correct |
68 |
Correct |
14 ms |
17516 KB |
Output is correct |
69 |
Correct |
18 ms |
17996 KB |
Output is correct |
70 |
Correct |
12 ms |
16508 KB |
Output is correct |
71 |
Correct |
12 ms |
16576 KB |
Output is correct |
72 |
Correct |
16 ms |
16468 KB |
Output is correct |
73 |
Correct |
10 ms |
16280 KB |
Output is correct |
74 |
Correct |
12 ms |
16492 KB |
Output is correct |
75 |
Correct |
11 ms |
16340 KB |
Output is correct |
76 |
Correct |
29 ms |
18644 KB |
Output is correct |
77 |
Correct |
24 ms |
19028 KB |
Output is correct |
78 |
Correct |
28 ms |
19404 KB |
Output is correct |
79 |
Correct |
18 ms |
20052 KB |
Output is correct |
80 |
Correct |
17 ms |
20052 KB |
Output is correct |
81 |
Correct |
23 ms |
20080 KB |
Output is correct |
82 |
Correct |
20 ms |
20052 KB |
Output is correct |
83 |
Correct |
17 ms |
20068 KB |
Output is correct |
84 |
Correct |
13 ms |
16724 KB |
Output is correct |
85 |
Correct |
12 ms |
16712 KB |
Output is correct |
86 |
Correct |
13 ms |
16724 KB |
Output is correct |
87 |
Correct |
12 ms |
16724 KB |
Output is correct |
88 |
Correct |
13 ms |
16732 KB |
Output is correct |
89 |
Correct |
17 ms |
16808 KB |
Output is correct |
90 |
Correct |
32 ms |
19664 KB |
Output is correct |
91 |
Correct |
34 ms |
19696 KB |
Output is correct |
92 |
Correct |
37 ms |
19704 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
15956 KB |
Output is correct |
2 |
Correct |
9 ms |
15956 KB |
Output is correct |
3 |
Correct |
9 ms |
15956 KB |
Output is correct |
4 |
Correct |
10 ms |
15956 KB |
Output is correct |
5 |
Correct |
10 ms |
15956 KB |
Output is correct |
6 |
Correct |
9 ms |
15972 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
8 ms |
15976 KB |
Output is correct |
9 |
Correct |
9 ms |
15956 KB |
Output is correct |
10 |
Correct |
9 ms |
15976 KB |
Output is correct |
11 |
Correct |
9 ms |
15972 KB |
Output is correct |
12 |
Correct |
9 ms |
15956 KB |
Output is correct |
13 |
Correct |
11 ms |
16060 KB |
Output is correct |
14 |
Correct |
10 ms |
15956 KB |
Output is correct |
15 |
Correct |
9 ms |
16080 KB |
Output is correct |
16 |
Correct |
9 ms |
16084 KB |
Output is correct |
17 |
Correct |
9 ms |
16076 KB |
Output is correct |
18 |
Correct |
9 ms |
16084 KB |
Output is correct |
19 |
Correct |
9 ms |
16084 KB |
Output is correct |
20 |
Correct |
9 ms |
16008 KB |
Output is correct |
21 |
Correct |
9 ms |
16032 KB |
Output is correct |
22 |
Correct |
9 ms |
15956 KB |
Output is correct |
23 |
Correct |
9 ms |
15956 KB |
Output is correct |
24 |
Correct |
25 ms |
19848 KB |
Output is correct |
25 |
Correct |
25 ms |
19900 KB |
Output is correct |
26 |
Correct |
35 ms |
19932 KB |
Output is correct |
27 |
Correct |
10 ms |
16084 KB |
Output is correct |
28 |
Correct |
10 ms |
16084 KB |
Output is correct |
29 |
Correct |
14 ms |
18988 KB |
Output is correct |
30 |
Correct |
14 ms |
19028 KB |
Output is correct |
31 |
Correct |
14 ms |
19028 KB |
Output is correct |
32 |
Correct |
14 ms |
18956 KB |
Output is correct |
33 |
Correct |
18 ms |
19924 KB |
Output is correct |
34 |
Correct |
19 ms |
20008 KB |
Output is correct |
35 |
Correct |
19 ms |
19944 KB |
Output is correct |
36 |
Correct |
25 ms |
19924 KB |
Output is correct |
37 |
Correct |
20 ms |
20008 KB |
Output is correct |
38 |
Correct |
19 ms |
20016 KB |
Output is correct |
39 |
Correct |
34 ms |
23072 KB |
Output is correct |
40 |
Correct |
34 ms |
23116 KB |
Output is correct |
41 |
Correct |
34 ms |
23080 KB |
Output is correct |
42 |
Correct |
10 ms |
15956 KB |
Output is correct |
43 |
Correct |
9 ms |
15956 KB |
Output is correct |
44 |
Correct |
11 ms |
15888 KB |
Output is correct |
45 |
Correct |
9 ms |
15956 KB |
Output is correct |
46 |
Correct |
10 ms |
16212 KB |
Output is correct |
47 |
Correct |
11 ms |
16168 KB |
Output is correct |
48 |
Correct |
9 ms |
16108 KB |
Output is correct |
49 |
Correct |
10 ms |
16084 KB |
Output is correct |
50 |
Correct |
10 ms |
16140 KB |
Output is correct |
51 |
Correct |
10 ms |
15996 KB |
Output is correct |
52 |
Correct |
10 ms |
16072 KB |
Output is correct |
53 |
Correct |
9 ms |
15956 KB |
Output is correct |
54 |
Correct |
10 ms |
15956 KB |
Output is correct |
55 |
Correct |
9 ms |
15956 KB |
Output is correct |
56 |
Correct |
9 ms |
15956 KB |
Output is correct |
57 |
Correct |
9 ms |
15956 KB |
Output is correct |
58 |
Correct |
9 ms |
15952 KB |
Output is correct |
59 |
Correct |
9 ms |
15956 KB |
Output is correct |
60 |
Correct |
9 ms |
15956 KB |
Output is correct |
61 |
Correct |
9 ms |
15956 KB |
Output is correct |
62 |
Correct |
10 ms |
16072 KB |
Output is correct |
63 |
Correct |
12 ms |
16684 KB |
Output is correct |
64 |
Correct |
10 ms |
16340 KB |
Output is correct |
65 |
Correct |
10 ms |
16388 KB |
Output is correct |
66 |
Correct |
10 ms |
16248 KB |
Output is correct |
67 |
Correct |
11 ms |
16212 KB |
Output is correct |
68 |
Correct |
10 ms |
16084 KB |
Output is correct |
69 |
Correct |
9 ms |
16000 KB |
Output is correct |
70 |
Correct |
10 ms |
16080 KB |
Output is correct |
71 |
Correct |
9 ms |
16084 KB |
Output is correct |
72 |
Correct |
9 ms |
16084 KB |
Output is correct |
73 |
Correct |
11 ms |
16044 KB |
Output is correct |
74 |
Correct |
9 ms |
16032 KB |
Output is correct |
75 |
Correct |
9 ms |
16084 KB |
Output is correct |
76 |
Correct |
14 ms |
15984 KB |
Output is correct |
77 |
Correct |
10 ms |
16084 KB |
Output is correct |
78 |
Correct |
9 ms |
15988 KB |
Output is correct |
79 |
Correct |
9 ms |
16084 KB |
Output is correct |
80 |
Correct |
14 ms |
17900 KB |
Output is correct |
81 |
Correct |
12 ms |
16768 KB |
Output is correct |
82 |
Correct |
15 ms |
18388 KB |
Output is correct |
83 |
Correct |
14 ms |
17516 KB |
Output is correct |
84 |
Correct |
18 ms |
17996 KB |
Output is correct |
85 |
Correct |
12 ms |
16508 KB |
Output is correct |
86 |
Correct |
12 ms |
16576 KB |
Output is correct |
87 |
Correct |
16 ms |
16468 KB |
Output is correct |
88 |
Correct |
10 ms |
16280 KB |
Output is correct |
89 |
Correct |
12 ms |
16492 KB |
Output is correct |
90 |
Correct |
11 ms |
16340 KB |
Output is correct |
91 |
Correct |
29 ms |
18644 KB |
Output is correct |
92 |
Correct |
24 ms |
19028 KB |
Output is correct |
93 |
Correct |
28 ms |
19404 KB |
Output is correct |
94 |
Correct |
18 ms |
20052 KB |
Output is correct |
95 |
Correct |
17 ms |
20052 KB |
Output is correct |
96 |
Correct |
23 ms |
20080 KB |
Output is correct |
97 |
Correct |
20 ms |
20052 KB |
Output is correct |
98 |
Correct |
17 ms |
20068 KB |
Output is correct |
99 |
Correct |
13 ms |
16724 KB |
Output is correct |
100 |
Correct |
12 ms |
16712 KB |
Output is correct |
101 |
Correct |
13 ms |
16724 KB |
Output is correct |
102 |
Correct |
12 ms |
16724 KB |
Output is correct |
103 |
Correct |
13 ms |
16732 KB |
Output is correct |
104 |
Correct |
17 ms |
16808 KB |
Output is correct |
105 |
Correct |
32 ms |
19664 KB |
Output is correct |
106 |
Correct |
34 ms |
19696 KB |
Output is correct |
107 |
Correct |
37 ms |
19704 KB |
Output is correct |
108 |
Correct |
16 ms |
19680 KB |
Output is correct |
109 |
Correct |
921 ms |
423392 KB |
Output is correct |
110 |
Correct |
525 ms |
220304 KB |
Output is correct |
111 |
Correct |
419 ms |
177664 KB |
Output is correct |
112 |
Correct |
520 ms |
211272 KB |
Output is correct |
113 |
Correct |
344 ms |
132780 KB |
Output is correct |
114 |
Correct |
24 ms |
20052 KB |
Output is correct |
115 |
Correct |
25 ms |
20052 KB |
Output is correct |
116 |
Correct |
37 ms |
21588 KB |
Output is correct |
117 |
Correct |
30 ms |
20020 KB |
Output is correct |
118 |
Correct |
26 ms |
20652 KB |
Output is correct |
119 |
Correct |
23 ms |
19956 KB |
Output is correct |
120 |
Correct |
31 ms |
19976 KB |
Output is correct |
121 |
Correct |
21 ms |
18516 KB |
Output is correct |
122 |
Correct |
32 ms |
20452 KB |
Output is correct |
123 |
Correct |
16 ms |
18460 KB |
Output is correct |
124 |
Correct |
38 ms |
21708 KB |
Output is correct |
125 |
Correct |
19 ms |
19996 KB |
Output is correct |
126 |
Correct |
17 ms |
19156 KB |
Output is correct |
127 |
Correct |
20 ms |
20032 KB |
Output is correct |
128 |
Correct |
16 ms |
18772 KB |
Output is correct |
129 |
Correct |
17 ms |
18916 KB |
Output is correct |
130 |
Correct |
15 ms |
19636 KB |
Output is correct |
131 |
Runtime error |
826 ms |
524288 KB |
Execution killed with signal 9 |
132 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
15956 KB |
Output is correct |
2 |
Correct |
9 ms |
15956 KB |
Output is correct |
3 |
Correct |
9 ms |
15956 KB |
Output is correct |
4 |
Correct |
10 ms |
15956 KB |
Output is correct |
5 |
Correct |
10 ms |
15956 KB |
Output is correct |
6 |
Correct |
9 ms |
15972 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
8 ms |
15976 KB |
Output is correct |
9 |
Correct |
9 ms |
15956 KB |
Output is correct |
10 |
Correct |
9 ms |
15976 KB |
Output is correct |
11 |
Correct |
9 ms |
15972 KB |
Output is correct |
12 |
Correct |
9 ms |
15956 KB |
Output is correct |
13 |
Correct |
11 ms |
16060 KB |
Output is correct |
14 |
Correct |
10 ms |
15956 KB |
Output is correct |
15 |
Correct |
9 ms |
16080 KB |
Output is correct |
16 |
Correct |
9 ms |
16084 KB |
Output is correct |
17 |
Correct |
9 ms |
16076 KB |
Output is correct |
18 |
Correct |
9 ms |
16084 KB |
Output is correct |
19 |
Correct |
9 ms |
16084 KB |
Output is correct |
20 |
Correct |
9 ms |
16008 KB |
Output is correct |
21 |
Correct |
9 ms |
16032 KB |
Output is correct |
22 |
Correct |
9 ms |
15956 KB |
Output is correct |
23 |
Correct |
9 ms |
15956 KB |
Output is correct |
24 |
Correct |
25 ms |
19848 KB |
Output is correct |
25 |
Correct |
25 ms |
19900 KB |
Output is correct |
26 |
Correct |
35 ms |
19932 KB |
Output is correct |
27 |
Correct |
10 ms |
16084 KB |
Output is correct |
28 |
Correct |
10 ms |
16084 KB |
Output is correct |
29 |
Correct |
14 ms |
18988 KB |
Output is correct |
30 |
Correct |
14 ms |
19028 KB |
Output is correct |
31 |
Correct |
14 ms |
19028 KB |
Output is correct |
32 |
Correct |
14 ms |
18956 KB |
Output is correct |
33 |
Correct |
18 ms |
19924 KB |
Output is correct |
34 |
Correct |
19 ms |
20008 KB |
Output is correct |
35 |
Correct |
19 ms |
19944 KB |
Output is correct |
36 |
Correct |
25 ms |
19924 KB |
Output is correct |
37 |
Correct |
20 ms |
20008 KB |
Output is correct |
38 |
Correct |
19 ms |
20016 KB |
Output is correct |
39 |
Correct |
34 ms |
23072 KB |
Output is correct |
40 |
Correct |
34 ms |
23116 KB |
Output is correct |
41 |
Correct |
34 ms |
23080 KB |
Output is correct |
42 |
Correct |
16 ms |
16980 KB |
Output is correct |
43 |
Correct |
13 ms |
16596 KB |
Output is correct |
44 |
Correct |
33 ms |
31344 KB |
Output is correct |
45 |
Correct |
27 ms |
26220 KB |
Output is correct |
46 |
Correct |
24 ms |
25164 KB |
Output is correct |
47 |
Correct |
32 ms |
31452 KB |
Output is correct |
48 |
Correct |
62 ms |
37648 KB |
Output is correct |
49 |
Correct |
47 ms |
29104 KB |
Output is correct |
50 |
Correct |
45 ms |
31608 KB |
Output is correct |
51 |
Correct |
55 ms |
32420 KB |
Output is correct |
52 |
Correct |
62 ms |
33356 KB |
Output is correct |
53 |
Correct |
49 ms |
31692 KB |
Output is correct |
54 |
Correct |
15 ms |
17136 KB |
Output is correct |
55 |
Correct |
15 ms |
17040 KB |
Output is correct |
56 |
Correct |
33 ms |
31568 KB |
Output is correct |
57 |
Correct |
34 ms |
31612 KB |
Output is correct |
58 |
Correct |
40 ms |
31632 KB |
Output is correct |
59 |
Correct |
37 ms |
31440 KB |
Output is correct |
60 |
Correct |
68 ms |
40304 KB |
Output is correct |
61 |
Correct |
69 ms |
40416 KB |
Output is correct |
62 |
Correct |
67 ms |
40300 KB |
Output is correct |
63 |
Correct |
72 ms |
40396 KB |
Output is correct |
64 |
Correct |
70 ms |
40388 KB |
Output is correct |
65 |
Correct |
75 ms |
40360 KB |
Output is correct |
66 |
Correct |
74 ms |
39372 KB |
Output is correct |
67 |
Correct |
72 ms |
39412 KB |
Output is correct |
68 |
Correct |
72 ms |
39404 KB |
Output is correct |
69 |
Correct |
10 ms |
15956 KB |
Output is correct |
70 |
Correct |
9 ms |
15956 KB |
Output is correct |
71 |
Correct |
11 ms |
15888 KB |
Output is correct |
72 |
Correct |
9 ms |
15956 KB |
Output is correct |
73 |
Correct |
10 ms |
16212 KB |
Output is correct |
74 |
Correct |
11 ms |
16168 KB |
Output is correct |
75 |
Correct |
9 ms |
16108 KB |
Output is correct |
76 |
Correct |
10 ms |
16084 KB |
Output is correct |
77 |
Correct |
10 ms |
16140 KB |
Output is correct |
78 |
Correct |
10 ms |
15996 KB |
Output is correct |
79 |
Correct |
10 ms |
16072 KB |
Output is correct |
80 |
Correct |
9 ms |
15956 KB |
Output is correct |
81 |
Correct |
10 ms |
15956 KB |
Output is correct |
82 |
Correct |
9 ms |
15956 KB |
Output is correct |
83 |
Correct |
9 ms |
15956 KB |
Output is correct |
84 |
Correct |
9 ms |
15956 KB |
Output is correct |
85 |
Correct |
9 ms |
15952 KB |
Output is correct |
86 |
Correct |
9 ms |
15956 KB |
Output is correct |
87 |
Correct |
9 ms |
15956 KB |
Output is correct |
88 |
Correct |
9 ms |
15956 KB |
Output is correct |
89 |
Correct |
10 ms |
16072 KB |
Output is correct |
90 |
Correct |
12 ms |
16684 KB |
Output is correct |
91 |
Correct |
10 ms |
16340 KB |
Output is correct |
92 |
Correct |
10 ms |
16388 KB |
Output is correct |
93 |
Correct |
10 ms |
16248 KB |
Output is correct |
94 |
Correct |
11 ms |
16212 KB |
Output is correct |
95 |
Correct |
10 ms |
16084 KB |
Output is correct |
96 |
Correct |
9 ms |
16000 KB |
Output is correct |
97 |
Correct |
10 ms |
16080 KB |
Output is correct |
98 |
Correct |
9 ms |
16084 KB |
Output is correct |
99 |
Correct |
9 ms |
16084 KB |
Output is correct |
100 |
Correct |
11 ms |
16044 KB |
Output is correct |
101 |
Correct |
9 ms |
16032 KB |
Output is correct |
102 |
Correct |
9 ms |
16084 KB |
Output is correct |
103 |
Correct |
14 ms |
15984 KB |
Output is correct |
104 |
Correct |
10 ms |
16084 KB |
Output is correct |
105 |
Correct |
9 ms |
15988 KB |
Output is correct |
106 |
Correct |
9 ms |
16084 KB |
Output is correct |
107 |
Correct |
14 ms |
17900 KB |
Output is correct |
108 |
Correct |
12 ms |
16768 KB |
Output is correct |
109 |
Correct |
15 ms |
18388 KB |
Output is correct |
110 |
Correct |
14 ms |
17516 KB |
Output is correct |
111 |
Correct |
18 ms |
17996 KB |
Output is correct |
112 |
Correct |
12 ms |
16508 KB |
Output is correct |
113 |
Correct |
12 ms |
16576 KB |
Output is correct |
114 |
Correct |
16 ms |
16468 KB |
Output is correct |
115 |
Correct |
10 ms |
16280 KB |
Output is correct |
116 |
Correct |
12 ms |
16492 KB |
Output is correct |
117 |
Correct |
11 ms |
16340 KB |
Output is correct |
118 |
Correct |
29 ms |
18644 KB |
Output is correct |
119 |
Correct |
24 ms |
19028 KB |
Output is correct |
120 |
Correct |
28 ms |
19404 KB |
Output is correct |
121 |
Correct |
18 ms |
20052 KB |
Output is correct |
122 |
Correct |
17 ms |
20052 KB |
Output is correct |
123 |
Correct |
23 ms |
20080 KB |
Output is correct |
124 |
Correct |
20 ms |
20052 KB |
Output is correct |
125 |
Correct |
17 ms |
20068 KB |
Output is correct |
126 |
Correct |
13 ms |
16724 KB |
Output is correct |
127 |
Correct |
12 ms |
16712 KB |
Output is correct |
128 |
Correct |
13 ms |
16724 KB |
Output is correct |
129 |
Correct |
12 ms |
16724 KB |
Output is correct |
130 |
Correct |
13 ms |
16732 KB |
Output is correct |
131 |
Correct |
17 ms |
16808 KB |
Output is correct |
132 |
Correct |
32 ms |
19664 KB |
Output is correct |
133 |
Correct |
34 ms |
19696 KB |
Output is correct |
134 |
Correct |
37 ms |
19704 KB |
Output is correct |
135 |
Correct |
16 ms |
19680 KB |
Output is correct |
136 |
Correct |
921 ms |
423392 KB |
Output is correct |
137 |
Correct |
525 ms |
220304 KB |
Output is correct |
138 |
Correct |
419 ms |
177664 KB |
Output is correct |
139 |
Correct |
520 ms |
211272 KB |
Output is correct |
140 |
Correct |
344 ms |
132780 KB |
Output is correct |
141 |
Correct |
24 ms |
20052 KB |
Output is correct |
142 |
Correct |
25 ms |
20052 KB |
Output is correct |
143 |
Correct |
37 ms |
21588 KB |
Output is correct |
144 |
Correct |
30 ms |
20020 KB |
Output is correct |
145 |
Correct |
26 ms |
20652 KB |
Output is correct |
146 |
Correct |
23 ms |
19956 KB |
Output is correct |
147 |
Correct |
31 ms |
19976 KB |
Output is correct |
148 |
Correct |
21 ms |
18516 KB |
Output is correct |
149 |
Correct |
32 ms |
20452 KB |
Output is correct |
150 |
Correct |
16 ms |
18460 KB |
Output is correct |
151 |
Correct |
38 ms |
21708 KB |
Output is correct |
152 |
Correct |
19 ms |
19996 KB |
Output is correct |
153 |
Correct |
17 ms |
19156 KB |
Output is correct |
154 |
Correct |
20 ms |
20032 KB |
Output is correct |
155 |
Correct |
16 ms |
18772 KB |
Output is correct |
156 |
Correct |
17 ms |
18916 KB |
Output is correct |
157 |
Correct |
15 ms |
19636 KB |
Output is correct |
158 |
Runtime error |
826 ms |
524288 KB |
Execution killed with signal 9 |
159 |
Halted |
0 ms |
0 KB |
- |