#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];
assert(cnt<=1e7);
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 |
8 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 |
9 ms |
15956 KB |
Output is correct |
5 |
Correct |
9 ms |
15956 KB |
Output is correct |
6 |
Correct |
8 ms |
15956 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
10 ms |
15876 KB |
Output is correct |
9 |
Correct |
10 ms |
15956 KB |
Output is correct |
10 |
Correct |
9 ms |
15948 KB |
Output is correct |
11 |
Correct |
12 ms |
15956 KB |
Output is correct |
12 |
Correct |
10 ms |
15944 KB |
Output is correct |
13 |
Correct |
10 ms |
16080 KB |
Output is correct |
14 |
Correct |
9 ms |
16084 KB |
Output is correct |
15 |
Correct |
9 ms |
15988 KB |
Output is correct |
16 |
Correct |
9 ms |
16076 KB |
Output is correct |
17 |
Correct |
9 ms |
16084 KB |
Output is correct |
18 |
Correct |
9 ms |
15956 KB |
Output is correct |
19 |
Correct |
9 ms |
15956 KB |
Output is correct |
20 |
Correct |
9 ms |
15956 KB |
Output is correct |
21 |
Correct |
10 ms |
15956 KB |
Output is correct |
22 |
Correct |
26 ms |
19892 KB |
Output is correct |
23 |
Correct |
27 ms |
19960 KB |
Output is correct |
24 |
Correct |
32 ms |
19896 KB |
Output is correct |
25 |
Correct |
13 ms |
16208 KB |
Output is correct |
26 |
Correct |
15 ms |
16184 KB |
Output is correct |
27 |
Correct |
16 ms |
18992 KB |
Output is correct |
28 |
Correct |
14 ms |
19028 KB |
Output is correct |
29 |
Correct |
15 ms |
18988 KB |
Output is correct |
30 |
Correct |
14 ms |
19028 KB |
Output is correct |
31 |
Correct |
20 ms |
19936 KB |
Output is correct |
32 |
Correct |
21 ms |
19924 KB |
Output is correct |
33 |
Correct |
21 ms |
19924 KB |
Output is correct |
34 |
Correct |
21 ms |
20012 KB |
Output is correct |
35 |
Correct |
22 ms |
19920 KB |
Output is correct |
36 |
Correct |
22 ms |
19956 KB |
Output is correct |
37 |
Correct |
39 ms |
23056 KB |
Output is correct |
38 |
Correct |
36 ms |
23008 KB |
Output is correct |
39 |
Correct |
35 ms |
23020 KB |
Output is correct |
40 |
Correct |
16 ms |
16980 KB |
Output is correct |
41 |
Correct |
12 ms |
16584 KB |
Output is correct |
42 |
Correct |
35 ms |
31328 KB |
Output is correct |
43 |
Correct |
27 ms |
26088 KB |
Output is correct |
44 |
Correct |
32 ms |
25216 KB |
Output is correct |
45 |
Correct |
36 ms |
31436 KB |
Output is correct |
46 |
Correct |
81 ms |
37680 KB |
Output is correct |
47 |
Correct |
43 ms |
29040 KB |
Output is correct |
48 |
Correct |
46 ms |
31592 KB |
Output is correct |
49 |
Correct |
66 ms |
32324 KB |
Output is correct |
50 |
Correct |
62 ms |
33268 KB |
Output is correct |
51 |
Correct |
52 ms |
31692 KB |
Output is correct |
52 |
Correct |
16 ms |
17108 KB |
Output is correct |
53 |
Correct |
16 ms |
17108 KB |
Output is correct |
54 |
Correct |
37 ms |
31580 KB |
Output is correct |
55 |
Correct |
36 ms |
31588 KB |
Output is correct |
56 |
Correct |
36 ms |
31540 KB |
Output is correct |
57 |
Correct |
36 ms |
31468 KB |
Output is correct |
58 |
Correct |
68 ms |
40396 KB |
Output is correct |
59 |
Correct |
67 ms |
40416 KB |
Output is correct |
60 |
Correct |
68 ms |
40412 KB |
Output is correct |
61 |
Correct |
70 ms |
40300 KB |
Output is correct |
62 |
Correct |
84 ms |
40484 KB |
Output is correct |
63 |
Correct |
77 ms |
40380 KB |
Output is correct |
64 |
Correct |
79 ms |
39396 KB |
Output is correct |
65 |
Correct |
81 ms |
39400 KB |
Output is correct |
66 |
Correct |
75 ms |
39364 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 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 |
9 ms |
15956 KB |
Output is correct |
5 |
Correct |
9 ms |
15956 KB |
Output is correct |
6 |
Correct |
8 ms |
15956 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
10 ms |
15876 KB |
Output is correct |
9 |
Correct |
10 ms |
15956 KB |
Output is correct |
10 |
Correct |
9 ms |
15948 KB |
Output is correct |
11 |
Correct |
12 ms |
15956 KB |
Output is correct |
12 |
Correct |
10 ms |
15944 KB |
Output is correct |
13 |
Correct |
10 ms |
16080 KB |
Output is correct |
14 |
Correct |
9 ms |
16084 KB |
Output is correct |
15 |
Correct |
9 ms |
15988 KB |
Output is correct |
16 |
Correct |
9 ms |
16076 KB |
Output is correct |
17 |
Correct |
9 ms |
16084 KB |
Output is correct |
18 |
Correct |
9 ms |
15956 KB |
Output is correct |
19 |
Correct |
9 ms |
15956 KB |
Output is correct |
20 |
Correct |
9 ms |
15956 KB |
Output is correct |
21 |
Correct |
10 ms |
15956 KB |
Output is correct |
22 |
Correct |
11 ms |
15968 KB |
Output is correct |
23 |
Correct |
9 ms |
15956 KB |
Output is correct |
24 |
Correct |
9 ms |
15956 KB |
Output is correct |
25 |
Correct |
12 ms |
15956 KB |
Output is correct |
26 |
Correct |
10 ms |
15908 KB |
Output is correct |
27 |
Correct |
9 ms |
15956 KB |
Output is correct |
28 |
Correct |
10 ms |
16336 KB |
Output is correct |
29 |
Correct |
11 ms |
16084 KB |
Output is correct |
30 |
Correct |
9 ms |
16084 KB |
Output is correct |
31 |
Correct |
9 ms |
16084 KB |
Output is correct |
32 |
Correct |
10 ms |
16168 KB |
Output is correct |
33 |
Correct |
9 ms |
15976 KB |
Output is correct |
34 |
Correct |
10 ms |
15956 KB |
Output is correct |
35 |
Correct |
9 ms |
15956 KB |
Output is correct |
36 |
Correct |
10 ms |
16020 KB |
Output is correct |
37 |
Correct |
9 ms |
15920 KB |
Output is correct |
38 |
Correct |
9 ms |
15896 KB |
Output is correct |
39 |
Correct |
9 ms |
15956 KB |
Output is correct |
40 |
Correct |
10 ms |
15956 KB |
Output is correct |
41 |
Correct |
9 ms |
15956 KB |
Output is correct |
42 |
Correct |
11 ms |
15952 KB |
Output is correct |
43 |
Correct |
9 ms |
15956 KB |
Output is correct |
44 |
Correct |
11 ms |
15980 KB |
Output is correct |
45 |
Correct |
12 ms |
16596 KB |
Output is correct |
46 |
Correct |
11 ms |
16352 KB |
Output is correct |
47 |
Correct |
11 ms |
16340 KB |
Output is correct |
48 |
Correct |
10 ms |
16212 KB |
Output is correct |
49 |
Correct |
10 ms |
16268 KB |
Output is correct |
50 |
Correct |
9 ms |
16088 KB |
Output is correct |
51 |
Correct |
9 ms |
16084 KB |
Output is correct |
52 |
Correct |
9 ms |
15956 KB |
Output is correct |
53 |
Correct |
9 ms |
15956 KB |
Output is correct |
54 |
Correct |
9 ms |
16032 KB |
Output is correct |
55 |
Correct |
9 ms |
16084 KB |
Output is correct |
56 |
Correct |
9 ms |
15956 KB |
Output is correct |
57 |
Correct |
10 ms |
16084 KB |
Output is correct |
58 |
Correct |
9 ms |
15956 KB |
Output is correct |
59 |
Correct |
11 ms |
16092 KB |
Output is correct |
60 |
Correct |
9 ms |
15956 KB |
Output is correct |
61 |
Correct |
9 ms |
16088 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
15968 KB |
Output is correct |
2 |
Correct |
9 ms |
15956 KB |
Output is correct |
3 |
Correct |
8 ms |
15956 KB |
Output is correct |
4 |
Correct |
9 ms |
15956 KB |
Output is correct |
5 |
Correct |
9 ms |
15956 KB |
Output is correct |
6 |
Correct |
9 ms |
15956 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
8 ms |
15956 KB |
Output is correct |
9 |
Correct |
9 ms |
15956 KB |
Output is correct |
10 |
Correct |
10 ms |
15876 KB |
Output is correct |
11 |
Correct |
10 ms |
15956 KB |
Output is correct |
12 |
Correct |
9 ms |
15948 KB |
Output is correct |
13 |
Correct |
12 ms |
15956 KB |
Output is correct |
14 |
Correct |
10 ms |
15944 KB |
Output is correct |
15 |
Correct |
10 ms |
16080 KB |
Output is correct |
16 |
Correct |
9 ms |
16084 KB |
Output is correct |
17 |
Correct |
9 ms |
15988 KB |
Output is correct |
18 |
Correct |
9 ms |
16076 KB |
Output is correct |
19 |
Correct |
9 ms |
16084 KB |
Output is correct |
20 |
Correct |
9 ms |
15956 KB |
Output is correct |
21 |
Correct |
9 ms |
15956 KB |
Output is correct |
22 |
Correct |
9 ms |
15956 KB |
Output is correct |
23 |
Correct |
10 ms |
15956 KB |
Output is correct |
24 |
Correct |
26 ms |
19892 KB |
Output is correct |
25 |
Correct |
27 ms |
19960 KB |
Output is correct |
26 |
Correct |
32 ms |
19896 KB |
Output is correct |
27 |
Correct |
9 ms |
15956 KB |
Output is correct |
28 |
Correct |
12 ms |
15956 KB |
Output is correct |
29 |
Correct |
10 ms |
15908 KB |
Output is correct |
30 |
Correct |
9 ms |
15956 KB |
Output is correct |
31 |
Correct |
10 ms |
16336 KB |
Output is correct |
32 |
Correct |
11 ms |
16084 KB |
Output is correct |
33 |
Correct |
9 ms |
16084 KB |
Output is correct |
34 |
Correct |
9 ms |
16084 KB |
Output is correct |
35 |
Correct |
10 ms |
16168 KB |
Output is correct |
36 |
Correct |
9 ms |
15976 KB |
Output is correct |
37 |
Correct |
10 ms |
15956 KB |
Output is correct |
38 |
Correct |
9 ms |
15956 KB |
Output is correct |
39 |
Correct |
10 ms |
16020 KB |
Output is correct |
40 |
Correct |
9 ms |
15920 KB |
Output is correct |
41 |
Correct |
9 ms |
15896 KB |
Output is correct |
42 |
Correct |
9 ms |
15956 KB |
Output is correct |
43 |
Correct |
10 ms |
15956 KB |
Output is correct |
44 |
Correct |
9 ms |
15956 KB |
Output is correct |
45 |
Correct |
11 ms |
15952 KB |
Output is correct |
46 |
Correct |
9 ms |
15956 KB |
Output is correct |
47 |
Correct |
11 ms |
15980 KB |
Output is correct |
48 |
Correct |
12 ms |
16596 KB |
Output is correct |
49 |
Correct |
11 ms |
16352 KB |
Output is correct |
50 |
Correct |
11 ms |
16340 KB |
Output is correct |
51 |
Correct |
10 ms |
16212 KB |
Output is correct |
52 |
Correct |
10 ms |
16268 KB |
Output is correct |
53 |
Correct |
9 ms |
16088 KB |
Output is correct |
54 |
Correct |
9 ms |
16084 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 |
16032 KB |
Output is correct |
58 |
Correct |
9 ms |
16084 KB |
Output is correct |
59 |
Correct |
9 ms |
15956 KB |
Output is correct |
60 |
Correct |
10 ms |
16084 KB |
Output is correct |
61 |
Correct |
9 ms |
15956 KB |
Output is correct |
62 |
Correct |
11 ms |
16092 KB |
Output is correct |
63 |
Correct |
9 ms |
15956 KB |
Output is correct |
64 |
Correct |
9 ms |
16088 KB |
Output is correct |
65 |
Correct |
13 ms |
17880 KB |
Output is correct |
66 |
Correct |
15 ms |
16728 KB |
Output is correct |
67 |
Correct |
15 ms |
18388 KB |
Output is correct |
68 |
Correct |
13 ms |
17520 KB |
Output is correct |
69 |
Correct |
13 ms |
18004 KB |
Output is correct |
70 |
Correct |
12 ms |
16468 KB |
Output is correct |
71 |
Correct |
13 ms |
16596 KB |
Output is correct |
72 |
Correct |
12 ms |
16520 KB |
Output is correct |
73 |
Correct |
10 ms |
16212 KB |
Output is correct |
74 |
Correct |
12 ms |
16596 KB |
Output is correct |
75 |
Correct |
12 ms |
16444 KB |
Output is correct |
76 |
Correct |
37 ms |
18612 KB |
Output is correct |
77 |
Correct |
33 ms |
19032 KB |
Output is correct |
78 |
Correct |
29 ms |
19532 KB |
Output is correct |
79 |
Correct |
18 ms |
20052 KB |
Output is correct |
80 |
Correct |
18 ms |
20084 KB |
Output is correct |
81 |
Correct |
18 ms |
20052 KB |
Output is correct |
82 |
Correct |
18 ms |
20072 KB |
Output is correct |
83 |
Correct |
18 ms |
20052 KB |
Output is correct |
84 |
Correct |
12 ms |
16724 KB |
Output is correct |
85 |
Correct |
12 ms |
16676 KB |
Output is correct |
86 |
Correct |
16 ms |
16748 KB |
Output is correct |
87 |
Correct |
14 ms |
16620 KB |
Output is correct |
88 |
Correct |
16 ms |
16724 KB |
Output is correct |
89 |
Correct |
13 ms |
16724 KB |
Output is correct |
90 |
Correct |
36 ms |
19736 KB |
Output is correct |
91 |
Correct |
44 ms |
19648 KB |
Output is correct |
92 |
Correct |
37 ms |
19684 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
15968 KB |
Output is correct |
2 |
Correct |
9 ms |
15956 KB |
Output is correct |
3 |
Correct |
8 ms |
15956 KB |
Output is correct |
4 |
Correct |
9 ms |
15956 KB |
Output is correct |
5 |
Correct |
9 ms |
15956 KB |
Output is correct |
6 |
Correct |
9 ms |
15956 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
8 ms |
15956 KB |
Output is correct |
9 |
Correct |
9 ms |
15956 KB |
Output is correct |
10 |
Correct |
10 ms |
15876 KB |
Output is correct |
11 |
Correct |
10 ms |
15956 KB |
Output is correct |
12 |
Correct |
9 ms |
15948 KB |
Output is correct |
13 |
Correct |
12 ms |
15956 KB |
Output is correct |
14 |
Correct |
10 ms |
15944 KB |
Output is correct |
15 |
Correct |
10 ms |
16080 KB |
Output is correct |
16 |
Correct |
9 ms |
16084 KB |
Output is correct |
17 |
Correct |
9 ms |
15988 KB |
Output is correct |
18 |
Correct |
9 ms |
16076 KB |
Output is correct |
19 |
Correct |
9 ms |
16084 KB |
Output is correct |
20 |
Correct |
9 ms |
15956 KB |
Output is correct |
21 |
Correct |
9 ms |
15956 KB |
Output is correct |
22 |
Correct |
9 ms |
15956 KB |
Output is correct |
23 |
Correct |
10 ms |
15956 KB |
Output is correct |
24 |
Correct |
26 ms |
19892 KB |
Output is correct |
25 |
Correct |
27 ms |
19960 KB |
Output is correct |
26 |
Correct |
32 ms |
19896 KB |
Output is correct |
27 |
Correct |
13 ms |
16208 KB |
Output is correct |
28 |
Correct |
15 ms |
16184 KB |
Output is correct |
29 |
Correct |
16 ms |
18992 KB |
Output is correct |
30 |
Correct |
14 ms |
19028 KB |
Output is correct |
31 |
Correct |
15 ms |
18988 KB |
Output is correct |
32 |
Correct |
14 ms |
19028 KB |
Output is correct |
33 |
Correct |
20 ms |
19936 KB |
Output is correct |
34 |
Correct |
21 ms |
19924 KB |
Output is correct |
35 |
Correct |
21 ms |
19924 KB |
Output is correct |
36 |
Correct |
21 ms |
20012 KB |
Output is correct |
37 |
Correct |
22 ms |
19920 KB |
Output is correct |
38 |
Correct |
22 ms |
19956 KB |
Output is correct |
39 |
Correct |
39 ms |
23056 KB |
Output is correct |
40 |
Correct |
36 ms |
23008 KB |
Output is correct |
41 |
Correct |
35 ms |
23020 KB |
Output is correct |
42 |
Correct |
9 ms |
15956 KB |
Output is correct |
43 |
Correct |
12 ms |
15956 KB |
Output is correct |
44 |
Correct |
10 ms |
15908 KB |
Output is correct |
45 |
Correct |
9 ms |
15956 KB |
Output is correct |
46 |
Correct |
10 ms |
16336 KB |
Output is correct |
47 |
Correct |
11 ms |
16084 KB |
Output is correct |
48 |
Correct |
9 ms |
16084 KB |
Output is correct |
49 |
Correct |
9 ms |
16084 KB |
Output is correct |
50 |
Correct |
10 ms |
16168 KB |
Output is correct |
51 |
Correct |
9 ms |
15976 KB |
Output is correct |
52 |
Correct |
10 ms |
15956 KB |
Output is correct |
53 |
Correct |
9 ms |
15956 KB |
Output is correct |
54 |
Correct |
10 ms |
16020 KB |
Output is correct |
55 |
Correct |
9 ms |
15920 KB |
Output is correct |
56 |
Correct |
9 ms |
15896 KB |
Output is correct |
57 |
Correct |
9 ms |
15956 KB |
Output is correct |
58 |
Correct |
10 ms |
15956 KB |
Output is correct |
59 |
Correct |
9 ms |
15956 KB |
Output is correct |
60 |
Correct |
11 ms |
15952 KB |
Output is correct |
61 |
Correct |
9 ms |
15956 KB |
Output is correct |
62 |
Correct |
11 ms |
15980 KB |
Output is correct |
63 |
Correct |
12 ms |
16596 KB |
Output is correct |
64 |
Correct |
11 ms |
16352 KB |
Output is correct |
65 |
Correct |
11 ms |
16340 KB |
Output is correct |
66 |
Correct |
10 ms |
16212 KB |
Output is correct |
67 |
Correct |
10 ms |
16268 KB |
Output is correct |
68 |
Correct |
9 ms |
16088 KB |
Output is correct |
69 |
Correct |
9 ms |
16084 KB |
Output is correct |
70 |
Correct |
9 ms |
15956 KB |
Output is correct |
71 |
Correct |
9 ms |
15956 KB |
Output is correct |
72 |
Correct |
9 ms |
16032 KB |
Output is correct |
73 |
Correct |
9 ms |
16084 KB |
Output is correct |
74 |
Correct |
9 ms |
15956 KB |
Output is correct |
75 |
Correct |
10 ms |
16084 KB |
Output is correct |
76 |
Correct |
9 ms |
15956 KB |
Output is correct |
77 |
Correct |
11 ms |
16092 KB |
Output is correct |
78 |
Correct |
9 ms |
15956 KB |
Output is correct |
79 |
Correct |
9 ms |
16088 KB |
Output is correct |
80 |
Correct |
13 ms |
17880 KB |
Output is correct |
81 |
Correct |
15 ms |
16728 KB |
Output is correct |
82 |
Correct |
15 ms |
18388 KB |
Output is correct |
83 |
Correct |
13 ms |
17520 KB |
Output is correct |
84 |
Correct |
13 ms |
18004 KB |
Output is correct |
85 |
Correct |
12 ms |
16468 KB |
Output is correct |
86 |
Correct |
13 ms |
16596 KB |
Output is correct |
87 |
Correct |
12 ms |
16520 KB |
Output is correct |
88 |
Correct |
10 ms |
16212 KB |
Output is correct |
89 |
Correct |
12 ms |
16596 KB |
Output is correct |
90 |
Correct |
12 ms |
16444 KB |
Output is correct |
91 |
Correct |
37 ms |
18612 KB |
Output is correct |
92 |
Correct |
33 ms |
19032 KB |
Output is correct |
93 |
Correct |
29 ms |
19532 KB |
Output is correct |
94 |
Correct |
18 ms |
20052 KB |
Output is correct |
95 |
Correct |
18 ms |
20084 KB |
Output is correct |
96 |
Correct |
18 ms |
20052 KB |
Output is correct |
97 |
Correct |
18 ms |
20072 KB |
Output is correct |
98 |
Correct |
18 ms |
20052 KB |
Output is correct |
99 |
Correct |
12 ms |
16724 KB |
Output is correct |
100 |
Correct |
12 ms |
16676 KB |
Output is correct |
101 |
Correct |
16 ms |
16748 KB |
Output is correct |
102 |
Correct |
14 ms |
16620 KB |
Output is correct |
103 |
Correct |
16 ms |
16724 KB |
Output is correct |
104 |
Correct |
13 ms |
16724 KB |
Output is correct |
105 |
Correct |
36 ms |
19736 KB |
Output is correct |
106 |
Correct |
44 ms |
19648 KB |
Output is correct |
107 |
Correct |
37 ms |
19684 KB |
Output is correct |
108 |
Correct |
16 ms |
19668 KB |
Output is correct |
109 |
Correct |
973 ms |
423384 KB |
Output is correct |
110 |
Correct |
525 ms |
220328 KB |
Output is correct |
111 |
Correct |
431 ms |
177536 KB |
Output is correct |
112 |
Correct |
552 ms |
211308 KB |
Output is correct |
113 |
Correct |
356 ms |
132828 KB |
Output is correct |
114 |
Correct |
26 ms |
20040 KB |
Output is correct |
115 |
Correct |
26 ms |
20088 KB |
Output is correct |
116 |
Correct |
38 ms |
21692 KB |
Output is correct |
117 |
Correct |
23 ms |
20048 KB |
Output is correct |
118 |
Correct |
27 ms |
20640 KB |
Output is correct |
119 |
Correct |
23 ms |
19956 KB |
Output is correct |
120 |
Correct |
27 ms |
19916 KB |
Output is correct |
121 |
Correct |
17 ms |
18516 KB |
Output is correct |
122 |
Correct |
33 ms |
20428 KB |
Output is correct |
123 |
Correct |
16 ms |
18388 KB |
Output is correct |
124 |
Correct |
38 ms |
21704 KB |
Output is correct |
125 |
Correct |
22 ms |
19976 KB |
Output is correct |
126 |
Correct |
25 ms |
19180 KB |
Output is correct |
127 |
Correct |
27 ms |
20000 KB |
Output is correct |
128 |
Correct |
20 ms |
18884 KB |
Output is correct |
129 |
Correct |
20 ms |
19028 KB |
Output is correct |
130 |
Correct |
18 ms |
19608 KB |
Output is correct |
131 |
Runtime error |
908 ms |
524288 KB |
Execution killed with signal 9 |
132 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
15968 KB |
Output is correct |
2 |
Correct |
9 ms |
15956 KB |
Output is correct |
3 |
Correct |
8 ms |
15956 KB |
Output is correct |
4 |
Correct |
9 ms |
15956 KB |
Output is correct |
5 |
Correct |
9 ms |
15956 KB |
Output is correct |
6 |
Correct |
9 ms |
15956 KB |
Output is correct |
7 |
Correct |
9 ms |
15956 KB |
Output is correct |
8 |
Correct |
8 ms |
15956 KB |
Output is correct |
9 |
Correct |
9 ms |
15956 KB |
Output is correct |
10 |
Correct |
10 ms |
15876 KB |
Output is correct |
11 |
Correct |
10 ms |
15956 KB |
Output is correct |
12 |
Correct |
9 ms |
15948 KB |
Output is correct |
13 |
Correct |
12 ms |
15956 KB |
Output is correct |
14 |
Correct |
10 ms |
15944 KB |
Output is correct |
15 |
Correct |
10 ms |
16080 KB |
Output is correct |
16 |
Correct |
9 ms |
16084 KB |
Output is correct |
17 |
Correct |
9 ms |
15988 KB |
Output is correct |
18 |
Correct |
9 ms |
16076 KB |
Output is correct |
19 |
Correct |
9 ms |
16084 KB |
Output is correct |
20 |
Correct |
9 ms |
15956 KB |
Output is correct |
21 |
Correct |
9 ms |
15956 KB |
Output is correct |
22 |
Correct |
9 ms |
15956 KB |
Output is correct |
23 |
Correct |
10 ms |
15956 KB |
Output is correct |
24 |
Correct |
26 ms |
19892 KB |
Output is correct |
25 |
Correct |
27 ms |
19960 KB |
Output is correct |
26 |
Correct |
32 ms |
19896 KB |
Output is correct |
27 |
Correct |
13 ms |
16208 KB |
Output is correct |
28 |
Correct |
15 ms |
16184 KB |
Output is correct |
29 |
Correct |
16 ms |
18992 KB |
Output is correct |
30 |
Correct |
14 ms |
19028 KB |
Output is correct |
31 |
Correct |
15 ms |
18988 KB |
Output is correct |
32 |
Correct |
14 ms |
19028 KB |
Output is correct |
33 |
Correct |
20 ms |
19936 KB |
Output is correct |
34 |
Correct |
21 ms |
19924 KB |
Output is correct |
35 |
Correct |
21 ms |
19924 KB |
Output is correct |
36 |
Correct |
21 ms |
20012 KB |
Output is correct |
37 |
Correct |
22 ms |
19920 KB |
Output is correct |
38 |
Correct |
22 ms |
19956 KB |
Output is correct |
39 |
Correct |
39 ms |
23056 KB |
Output is correct |
40 |
Correct |
36 ms |
23008 KB |
Output is correct |
41 |
Correct |
35 ms |
23020 KB |
Output is correct |
42 |
Correct |
16 ms |
16980 KB |
Output is correct |
43 |
Correct |
12 ms |
16584 KB |
Output is correct |
44 |
Correct |
35 ms |
31328 KB |
Output is correct |
45 |
Correct |
27 ms |
26088 KB |
Output is correct |
46 |
Correct |
32 ms |
25216 KB |
Output is correct |
47 |
Correct |
36 ms |
31436 KB |
Output is correct |
48 |
Correct |
81 ms |
37680 KB |
Output is correct |
49 |
Correct |
43 ms |
29040 KB |
Output is correct |
50 |
Correct |
46 ms |
31592 KB |
Output is correct |
51 |
Correct |
66 ms |
32324 KB |
Output is correct |
52 |
Correct |
62 ms |
33268 KB |
Output is correct |
53 |
Correct |
52 ms |
31692 KB |
Output is correct |
54 |
Correct |
16 ms |
17108 KB |
Output is correct |
55 |
Correct |
16 ms |
17108 KB |
Output is correct |
56 |
Correct |
37 ms |
31580 KB |
Output is correct |
57 |
Correct |
36 ms |
31588 KB |
Output is correct |
58 |
Correct |
36 ms |
31540 KB |
Output is correct |
59 |
Correct |
36 ms |
31468 KB |
Output is correct |
60 |
Correct |
68 ms |
40396 KB |
Output is correct |
61 |
Correct |
67 ms |
40416 KB |
Output is correct |
62 |
Correct |
68 ms |
40412 KB |
Output is correct |
63 |
Correct |
70 ms |
40300 KB |
Output is correct |
64 |
Correct |
84 ms |
40484 KB |
Output is correct |
65 |
Correct |
77 ms |
40380 KB |
Output is correct |
66 |
Correct |
79 ms |
39396 KB |
Output is correct |
67 |
Correct |
81 ms |
39400 KB |
Output is correct |
68 |
Correct |
75 ms |
39364 KB |
Output is correct |
69 |
Correct |
9 ms |
15956 KB |
Output is correct |
70 |
Correct |
12 ms |
15956 KB |
Output is correct |
71 |
Correct |
10 ms |
15908 KB |
Output is correct |
72 |
Correct |
9 ms |
15956 KB |
Output is correct |
73 |
Correct |
10 ms |
16336 KB |
Output is correct |
74 |
Correct |
11 ms |
16084 KB |
Output is correct |
75 |
Correct |
9 ms |
16084 KB |
Output is correct |
76 |
Correct |
9 ms |
16084 KB |
Output is correct |
77 |
Correct |
10 ms |
16168 KB |
Output is correct |
78 |
Correct |
9 ms |
15976 KB |
Output is correct |
79 |
Correct |
10 ms |
15956 KB |
Output is correct |
80 |
Correct |
9 ms |
15956 KB |
Output is correct |
81 |
Correct |
10 ms |
16020 KB |
Output is correct |
82 |
Correct |
9 ms |
15920 KB |
Output is correct |
83 |
Correct |
9 ms |
15896 KB |
Output is correct |
84 |
Correct |
9 ms |
15956 KB |
Output is correct |
85 |
Correct |
10 ms |
15956 KB |
Output is correct |
86 |
Correct |
9 ms |
15956 KB |
Output is correct |
87 |
Correct |
11 ms |
15952 KB |
Output is correct |
88 |
Correct |
9 ms |
15956 KB |
Output is correct |
89 |
Correct |
11 ms |
15980 KB |
Output is correct |
90 |
Correct |
12 ms |
16596 KB |
Output is correct |
91 |
Correct |
11 ms |
16352 KB |
Output is correct |
92 |
Correct |
11 ms |
16340 KB |
Output is correct |
93 |
Correct |
10 ms |
16212 KB |
Output is correct |
94 |
Correct |
10 ms |
16268 KB |
Output is correct |
95 |
Correct |
9 ms |
16088 KB |
Output is correct |
96 |
Correct |
9 ms |
16084 KB |
Output is correct |
97 |
Correct |
9 ms |
15956 KB |
Output is correct |
98 |
Correct |
9 ms |
15956 KB |
Output is correct |
99 |
Correct |
9 ms |
16032 KB |
Output is correct |
100 |
Correct |
9 ms |
16084 KB |
Output is correct |
101 |
Correct |
9 ms |
15956 KB |
Output is correct |
102 |
Correct |
10 ms |
16084 KB |
Output is correct |
103 |
Correct |
9 ms |
15956 KB |
Output is correct |
104 |
Correct |
11 ms |
16092 KB |
Output is correct |
105 |
Correct |
9 ms |
15956 KB |
Output is correct |
106 |
Correct |
9 ms |
16088 KB |
Output is correct |
107 |
Correct |
13 ms |
17880 KB |
Output is correct |
108 |
Correct |
15 ms |
16728 KB |
Output is correct |
109 |
Correct |
15 ms |
18388 KB |
Output is correct |
110 |
Correct |
13 ms |
17520 KB |
Output is correct |
111 |
Correct |
13 ms |
18004 KB |
Output is correct |
112 |
Correct |
12 ms |
16468 KB |
Output is correct |
113 |
Correct |
13 ms |
16596 KB |
Output is correct |
114 |
Correct |
12 ms |
16520 KB |
Output is correct |
115 |
Correct |
10 ms |
16212 KB |
Output is correct |
116 |
Correct |
12 ms |
16596 KB |
Output is correct |
117 |
Correct |
12 ms |
16444 KB |
Output is correct |
118 |
Correct |
37 ms |
18612 KB |
Output is correct |
119 |
Correct |
33 ms |
19032 KB |
Output is correct |
120 |
Correct |
29 ms |
19532 KB |
Output is correct |
121 |
Correct |
18 ms |
20052 KB |
Output is correct |
122 |
Correct |
18 ms |
20084 KB |
Output is correct |
123 |
Correct |
18 ms |
20052 KB |
Output is correct |
124 |
Correct |
18 ms |
20072 KB |
Output is correct |
125 |
Correct |
18 ms |
20052 KB |
Output is correct |
126 |
Correct |
12 ms |
16724 KB |
Output is correct |
127 |
Correct |
12 ms |
16676 KB |
Output is correct |
128 |
Correct |
16 ms |
16748 KB |
Output is correct |
129 |
Correct |
14 ms |
16620 KB |
Output is correct |
130 |
Correct |
16 ms |
16724 KB |
Output is correct |
131 |
Correct |
13 ms |
16724 KB |
Output is correct |
132 |
Correct |
36 ms |
19736 KB |
Output is correct |
133 |
Correct |
44 ms |
19648 KB |
Output is correct |
134 |
Correct |
37 ms |
19684 KB |
Output is correct |
135 |
Correct |
16 ms |
19668 KB |
Output is correct |
136 |
Correct |
973 ms |
423384 KB |
Output is correct |
137 |
Correct |
525 ms |
220328 KB |
Output is correct |
138 |
Correct |
431 ms |
177536 KB |
Output is correct |
139 |
Correct |
552 ms |
211308 KB |
Output is correct |
140 |
Correct |
356 ms |
132828 KB |
Output is correct |
141 |
Correct |
26 ms |
20040 KB |
Output is correct |
142 |
Correct |
26 ms |
20088 KB |
Output is correct |
143 |
Correct |
38 ms |
21692 KB |
Output is correct |
144 |
Correct |
23 ms |
20048 KB |
Output is correct |
145 |
Correct |
27 ms |
20640 KB |
Output is correct |
146 |
Correct |
23 ms |
19956 KB |
Output is correct |
147 |
Correct |
27 ms |
19916 KB |
Output is correct |
148 |
Correct |
17 ms |
18516 KB |
Output is correct |
149 |
Correct |
33 ms |
20428 KB |
Output is correct |
150 |
Correct |
16 ms |
18388 KB |
Output is correct |
151 |
Correct |
38 ms |
21704 KB |
Output is correct |
152 |
Correct |
22 ms |
19976 KB |
Output is correct |
153 |
Correct |
25 ms |
19180 KB |
Output is correct |
154 |
Correct |
27 ms |
20000 KB |
Output is correct |
155 |
Correct |
20 ms |
18884 KB |
Output is correct |
156 |
Correct |
20 ms |
19028 KB |
Output is correct |
157 |
Correct |
18 ms |
19608 KB |
Output is correct |
158 |
Runtime error |
908 ms |
524288 KB |
Execution killed with signal 9 |
159 |
Halted |
0 ms |
0 KB |
- |