#include "paint.h"
#include <bits/stdc++.h>
using namespace std;
map<int, int> lseg[200100];
vector<int> liked_by[200100];
int dp[200100]{}, valid_i[200100]{};
int minimumInstructions(int N, int M, int K, vector<int> C, vector<int> A, vector<vector<int>> B) {
for(int i = 0; i < N; i++)
lseg[i].clear(),dp[i]=valid_i[i]=0;
for(int i = 0; i < K; i++) liked_by[i].clear();
multiset<int> st;
for(int i = 0; i < M; i++)
for(int color: B[i])
liked_by[color].push_back(i);
for(int i = N; i--;) {
for(auto j: liked_by[C[i]]) {
lseg[i][j] = 1+lseg[i+1][(j+1)%M];
if(lseg[i][j]>=M) valid_i[i]=1;
}
}
for(int i = 0; i < M; i++) st.insert(0);
for(int i = N; i--;) {
dp[i]=1e9;
if(valid_i[i])
dp[i] = 1+*st.begin();
st.insert(dp[i]);
st.erase(st.find(dp[i+M]));
}
return (dp[0]<1e9?dp[0]:-1);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
14292 KB |
Output is correct |
2 |
Correct |
7 ms |
14292 KB |
Output is correct |
3 |
Correct |
7 ms |
14292 KB |
Output is correct |
4 |
Correct |
7 ms |
14292 KB |
Output is correct |
5 |
Correct |
6 ms |
14292 KB |
Output is correct |
6 |
Correct |
7 ms |
14400 KB |
Output is correct |
7 |
Correct |
6 ms |
14420 KB |
Output is correct |
8 |
Correct |
6 ms |
14420 KB |
Output is correct |
9 |
Correct |
6 ms |
14420 KB |
Output is correct |
10 |
Correct |
7 ms |
14420 KB |
Output is correct |
11 |
Correct |
7 ms |
14420 KB |
Output is correct |
12 |
Correct |
7 ms |
14424 KB |
Output is correct |
13 |
Correct |
7 ms |
14420 KB |
Output is correct |
14 |
Correct |
7 ms |
14420 KB |
Output is correct |
15 |
Correct |
7 ms |
14420 KB |
Output is correct |
16 |
Correct |
9 ms |
14404 KB |
Output is correct |
17 |
Correct |
7 ms |
14480 KB |
Output is correct |
18 |
Correct |
8 ms |
14384 KB |
Output is correct |
19 |
Correct |
8 ms |
14356 KB |
Output is correct |
20 |
Correct |
8 ms |
14408 KB |
Output is correct |
21 |
Correct |
7 ms |
14420 KB |
Output is correct |
22 |
Correct |
21 ms |
18312 KB |
Output is correct |
23 |
Correct |
19 ms |
18348 KB |
Output is correct |
24 |
Correct |
18 ms |
18296 KB |
Output is correct |
25 |
Correct |
11 ms |
15572 KB |
Output is correct |
26 |
Correct |
9 ms |
15632 KB |
Output is correct |
27 |
Correct |
15 ms |
16084 KB |
Output is correct |
28 |
Correct |
11 ms |
16288 KB |
Output is correct |
29 |
Correct |
11 ms |
16272 KB |
Output is correct |
30 |
Correct |
11 ms |
16340 KB |
Output is correct |
31 |
Correct |
15 ms |
16560 KB |
Output is correct |
32 |
Correct |
16 ms |
16672 KB |
Output is correct |
33 |
Correct |
16 ms |
16656 KB |
Output is correct |
34 |
Correct |
15 ms |
16672 KB |
Output is correct |
35 |
Correct |
15 ms |
16652 KB |
Output is correct |
36 |
Correct |
15 ms |
16656 KB |
Output is correct |
37 |
Correct |
33 ms |
20724 KB |
Output is correct |
38 |
Correct |
29 ms |
20684 KB |
Output is correct |
39 |
Correct |
33 ms |
20732 KB |
Output is correct |
40 |
Correct |
24 ms |
20004 KB |
Output is correct |
41 |
Correct |
16 ms |
17956 KB |
Output is correct |
42 |
Correct |
28 ms |
22824 KB |
Output is correct |
43 |
Correct |
22 ms |
20552 KB |
Output is correct |
44 |
Correct |
21 ms |
20152 KB |
Output is correct |
45 |
Correct |
29 ms |
24408 KB |
Output is correct |
46 |
Correct |
62 ms |
30488 KB |
Output is correct |
47 |
Correct |
45 ms |
23676 KB |
Output is correct |
48 |
Correct |
49 ms |
27172 KB |
Output is correct |
49 |
Correct |
63 ms |
30100 KB |
Output is correct |
50 |
Correct |
71 ms |
30376 KB |
Output is correct |
51 |
Correct |
53 ms |
27852 KB |
Output is correct |
52 |
Correct |
24 ms |
20564 KB |
Output is correct |
53 |
Correct |
22 ms |
20680 KB |
Output is correct |
54 |
Correct |
27 ms |
22920 KB |
Output is correct |
55 |
Correct |
33 ms |
23792 KB |
Output is correct |
56 |
Correct |
28 ms |
24084 KB |
Output is correct |
57 |
Correct |
29 ms |
24388 KB |
Output is correct |
58 |
Correct |
69 ms |
32016 KB |
Output is correct |
59 |
Correct |
75 ms |
32008 KB |
Output is correct |
60 |
Correct |
67 ms |
31948 KB |
Output is correct |
61 |
Correct |
70 ms |
31948 KB |
Output is correct |
62 |
Correct |
68 ms |
31904 KB |
Output is correct |
63 |
Correct |
76 ms |
32008 KB |
Output is correct |
64 |
Correct |
76 ms |
35532 KB |
Output is correct |
65 |
Correct |
75 ms |
35500 KB |
Output is correct |
66 |
Correct |
74 ms |
35624 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
14292 KB |
Output is correct |
2 |
Correct |
7 ms |
14292 KB |
Output is correct |
3 |
Correct |
7 ms |
14292 KB |
Output is correct |
4 |
Correct |
7 ms |
14292 KB |
Output is correct |
5 |
Correct |
6 ms |
14292 KB |
Output is correct |
6 |
Correct |
7 ms |
14400 KB |
Output is correct |
7 |
Correct |
6 ms |
14420 KB |
Output is correct |
8 |
Correct |
6 ms |
14420 KB |
Output is correct |
9 |
Correct |
6 ms |
14420 KB |
Output is correct |
10 |
Correct |
7 ms |
14420 KB |
Output is correct |
11 |
Correct |
7 ms |
14420 KB |
Output is correct |
12 |
Correct |
7 ms |
14424 KB |
Output is correct |
13 |
Correct |
7 ms |
14420 KB |
Output is correct |
14 |
Correct |
7 ms |
14420 KB |
Output is correct |
15 |
Correct |
7 ms |
14420 KB |
Output is correct |
16 |
Correct |
9 ms |
14404 KB |
Output is correct |
17 |
Correct |
7 ms |
14480 KB |
Output is correct |
18 |
Correct |
8 ms |
14384 KB |
Output is correct |
19 |
Correct |
8 ms |
14356 KB |
Output is correct |
20 |
Correct |
8 ms |
14408 KB |
Output is correct |
21 |
Correct |
7 ms |
14420 KB |
Output is correct |
22 |
Correct |
6 ms |
14292 KB |
Output is correct |
23 |
Correct |
7 ms |
14380 KB |
Output is correct |
24 |
Correct |
7 ms |
14292 KB |
Output is correct |
25 |
Correct |
6 ms |
14388 KB |
Output is correct |
26 |
Correct |
7 ms |
14292 KB |
Output is correct |
27 |
Correct |
7 ms |
14420 KB |
Output is correct |
28 |
Correct |
8 ms |
14900 KB |
Output is correct |
29 |
Correct |
9 ms |
14676 KB |
Output is correct |
30 |
Correct |
7 ms |
14676 KB |
Output is correct |
31 |
Correct |
7 ms |
14540 KB |
Output is correct |
32 |
Correct |
8 ms |
14676 KB |
Output is correct |
33 |
Correct |
8 ms |
14512 KB |
Output is correct |
34 |
Correct |
6 ms |
14420 KB |
Output is correct |
35 |
Correct |
6 ms |
14420 KB |
Output is correct |
36 |
Correct |
8 ms |
14420 KB |
Output is correct |
37 |
Correct |
6 ms |
14420 KB |
Output is correct |
38 |
Correct |
7 ms |
14448 KB |
Output is correct |
39 |
Correct |
8 ms |
14420 KB |
Output is correct |
40 |
Correct |
9 ms |
14364 KB |
Output is correct |
41 |
Correct |
7 ms |
14420 KB |
Output is correct |
42 |
Correct |
7 ms |
14420 KB |
Output is correct |
43 |
Correct |
7 ms |
14380 KB |
Output is correct |
44 |
Correct |
7 ms |
14420 KB |
Output is correct |
45 |
Correct |
8 ms |
15148 KB |
Output is correct |
46 |
Correct |
8 ms |
15140 KB |
Output is correct |
47 |
Correct |
9 ms |
15060 KB |
Output is correct |
48 |
Correct |
10 ms |
14968 KB |
Output is correct |
49 |
Correct |
8 ms |
14932 KB |
Output is correct |
50 |
Correct |
7 ms |
14420 KB |
Output is correct |
51 |
Correct |
7 ms |
14420 KB |
Output is correct |
52 |
Correct |
8 ms |
14400 KB |
Output is correct |
53 |
Correct |
8 ms |
14420 KB |
Output is correct |
54 |
Correct |
7 ms |
14464 KB |
Output is correct |
55 |
Correct |
7 ms |
14420 KB |
Output is correct |
56 |
Correct |
6 ms |
14420 KB |
Output is correct |
57 |
Correct |
7 ms |
14420 KB |
Output is correct |
58 |
Correct |
7 ms |
14420 KB |
Output is correct |
59 |
Correct |
7 ms |
14420 KB |
Output is correct |
60 |
Correct |
8 ms |
14452 KB |
Output is correct |
61 |
Correct |
8 ms |
14420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
14292 KB |
Output is correct |
2 |
Correct |
7 ms |
14380 KB |
Output is correct |
3 |
Correct |
7 ms |
14292 KB |
Output is correct |
4 |
Correct |
7 ms |
14292 KB |
Output is correct |
5 |
Correct |
7 ms |
14292 KB |
Output is correct |
6 |
Correct |
7 ms |
14292 KB |
Output is correct |
7 |
Correct |
6 ms |
14292 KB |
Output is correct |
8 |
Correct |
7 ms |
14400 KB |
Output is correct |
9 |
Correct |
6 ms |
14420 KB |
Output is correct |
10 |
Correct |
6 ms |
14420 KB |
Output is correct |
11 |
Correct |
6 ms |
14420 KB |
Output is correct |
12 |
Correct |
7 ms |
14420 KB |
Output is correct |
13 |
Correct |
7 ms |
14420 KB |
Output is correct |
14 |
Correct |
7 ms |
14424 KB |
Output is correct |
15 |
Correct |
7 ms |
14420 KB |
Output is correct |
16 |
Correct |
7 ms |
14420 KB |
Output is correct |
17 |
Correct |
7 ms |
14420 KB |
Output is correct |
18 |
Correct |
9 ms |
14404 KB |
Output is correct |
19 |
Correct |
7 ms |
14480 KB |
Output is correct |
20 |
Correct |
8 ms |
14384 KB |
Output is correct |
21 |
Correct |
8 ms |
14356 KB |
Output is correct |
22 |
Correct |
8 ms |
14408 KB |
Output is correct |
23 |
Correct |
7 ms |
14420 KB |
Output is correct |
24 |
Correct |
21 ms |
18312 KB |
Output is correct |
25 |
Correct |
19 ms |
18348 KB |
Output is correct |
26 |
Correct |
18 ms |
18296 KB |
Output is correct |
27 |
Correct |
7 ms |
14292 KB |
Output is correct |
28 |
Correct |
6 ms |
14388 KB |
Output is correct |
29 |
Correct |
7 ms |
14292 KB |
Output is correct |
30 |
Correct |
7 ms |
14420 KB |
Output is correct |
31 |
Correct |
8 ms |
14900 KB |
Output is correct |
32 |
Correct |
9 ms |
14676 KB |
Output is correct |
33 |
Correct |
7 ms |
14676 KB |
Output is correct |
34 |
Correct |
7 ms |
14540 KB |
Output is correct |
35 |
Correct |
8 ms |
14676 KB |
Output is correct |
36 |
Correct |
8 ms |
14512 KB |
Output is correct |
37 |
Correct |
6 ms |
14420 KB |
Output is correct |
38 |
Correct |
6 ms |
14420 KB |
Output is correct |
39 |
Correct |
8 ms |
14420 KB |
Output is correct |
40 |
Correct |
6 ms |
14420 KB |
Output is correct |
41 |
Correct |
7 ms |
14448 KB |
Output is correct |
42 |
Correct |
8 ms |
14420 KB |
Output is correct |
43 |
Correct |
9 ms |
14364 KB |
Output is correct |
44 |
Correct |
7 ms |
14420 KB |
Output is correct |
45 |
Correct |
7 ms |
14420 KB |
Output is correct |
46 |
Correct |
7 ms |
14380 KB |
Output is correct |
47 |
Correct |
7 ms |
14420 KB |
Output is correct |
48 |
Correct |
8 ms |
15148 KB |
Output is correct |
49 |
Correct |
8 ms |
15140 KB |
Output is correct |
50 |
Correct |
9 ms |
15060 KB |
Output is correct |
51 |
Correct |
10 ms |
14968 KB |
Output is correct |
52 |
Correct |
8 ms |
14932 KB |
Output is correct |
53 |
Correct |
7 ms |
14420 KB |
Output is correct |
54 |
Correct |
7 ms |
14420 KB |
Output is correct |
55 |
Correct |
8 ms |
14400 KB |
Output is correct |
56 |
Correct |
8 ms |
14420 KB |
Output is correct |
57 |
Correct |
7 ms |
14464 KB |
Output is correct |
58 |
Correct |
7 ms |
14420 KB |
Output is correct |
59 |
Correct |
6 ms |
14420 KB |
Output is correct |
60 |
Correct |
7 ms |
14420 KB |
Output is correct |
61 |
Correct |
7 ms |
14420 KB |
Output is correct |
62 |
Correct |
7 ms |
14420 KB |
Output is correct |
63 |
Correct |
8 ms |
14452 KB |
Output is correct |
64 |
Correct |
8 ms |
14420 KB |
Output is correct |
65 |
Correct |
15 ms |
16668 KB |
Output is correct |
66 |
Correct |
9 ms |
15316 KB |
Output is correct |
67 |
Correct |
16 ms |
17288 KB |
Output is correct |
68 |
Correct |
11 ms |
16084 KB |
Output is correct |
69 |
Correct |
13 ms |
16852 KB |
Output is correct |
70 |
Correct |
9 ms |
15060 KB |
Output is correct |
71 |
Correct |
10 ms |
15060 KB |
Output is correct |
72 |
Correct |
9 ms |
15060 KB |
Output is correct |
73 |
Correct |
8 ms |
14676 KB |
Output is correct |
74 |
Correct |
9 ms |
15060 KB |
Output is correct |
75 |
Correct |
8 ms |
14876 KB |
Output is correct |
76 |
Correct |
21 ms |
17088 KB |
Output is correct |
77 |
Correct |
21 ms |
17492 KB |
Output is correct |
78 |
Correct |
24 ms |
17904 KB |
Output is correct |
79 |
Correct |
20 ms |
19132 KB |
Output is correct |
80 |
Correct |
19 ms |
19148 KB |
Output is correct |
81 |
Correct |
19 ms |
19156 KB |
Output is correct |
82 |
Correct |
22 ms |
19280 KB |
Output is correct |
83 |
Correct |
20 ms |
19156 KB |
Output is correct |
84 |
Correct |
9 ms |
15188 KB |
Output is correct |
85 |
Correct |
9 ms |
15188 KB |
Output is correct |
86 |
Correct |
11 ms |
15220 KB |
Output is correct |
87 |
Correct |
10 ms |
15168 KB |
Output is correct |
88 |
Correct |
9 ms |
15276 KB |
Output is correct |
89 |
Correct |
9 ms |
15220 KB |
Output is correct |
90 |
Correct |
24 ms |
18124 KB |
Output is correct |
91 |
Correct |
24 ms |
18192 KB |
Output is correct |
92 |
Correct |
24 ms |
18188 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
14292 KB |
Output is correct |
2 |
Correct |
7 ms |
14380 KB |
Output is correct |
3 |
Correct |
7 ms |
14292 KB |
Output is correct |
4 |
Correct |
7 ms |
14292 KB |
Output is correct |
5 |
Correct |
7 ms |
14292 KB |
Output is correct |
6 |
Correct |
7 ms |
14292 KB |
Output is correct |
7 |
Correct |
6 ms |
14292 KB |
Output is correct |
8 |
Correct |
7 ms |
14400 KB |
Output is correct |
9 |
Correct |
6 ms |
14420 KB |
Output is correct |
10 |
Correct |
6 ms |
14420 KB |
Output is correct |
11 |
Correct |
6 ms |
14420 KB |
Output is correct |
12 |
Correct |
7 ms |
14420 KB |
Output is correct |
13 |
Correct |
7 ms |
14420 KB |
Output is correct |
14 |
Correct |
7 ms |
14424 KB |
Output is correct |
15 |
Correct |
7 ms |
14420 KB |
Output is correct |
16 |
Correct |
7 ms |
14420 KB |
Output is correct |
17 |
Correct |
7 ms |
14420 KB |
Output is correct |
18 |
Correct |
9 ms |
14404 KB |
Output is correct |
19 |
Correct |
7 ms |
14480 KB |
Output is correct |
20 |
Correct |
8 ms |
14384 KB |
Output is correct |
21 |
Correct |
8 ms |
14356 KB |
Output is correct |
22 |
Correct |
8 ms |
14408 KB |
Output is correct |
23 |
Correct |
7 ms |
14420 KB |
Output is correct |
24 |
Correct |
21 ms |
18312 KB |
Output is correct |
25 |
Correct |
19 ms |
18348 KB |
Output is correct |
26 |
Correct |
18 ms |
18296 KB |
Output is correct |
27 |
Correct |
11 ms |
15572 KB |
Output is correct |
28 |
Correct |
9 ms |
15632 KB |
Output is correct |
29 |
Correct |
15 ms |
16084 KB |
Output is correct |
30 |
Correct |
11 ms |
16288 KB |
Output is correct |
31 |
Correct |
11 ms |
16272 KB |
Output is correct |
32 |
Correct |
11 ms |
16340 KB |
Output is correct |
33 |
Correct |
15 ms |
16560 KB |
Output is correct |
34 |
Correct |
16 ms |
16672 KB |
Output is correct |
35 |
Correct |
16 ms |
16656 KB |
Output is correct |
36 |
Correct |
15 ms |
16672 KB |
Output is correct |
37 |
Correct |
15 ms |
16652 KB |
Output is correct |
38 |
Correct |
15 ms |
16656 KB |
Output is correct |
39 |
Correct |
33 ms |
20724 KB |
Output is correct |
40 |
Correct |
29 ms |
20684 KB |
Output is correct |
41 |
Correct |
33 ms |
20732 KB |
Output is correct |
42 |
Correct |
7 ms |
14292 KB |
Output is correct |
43 |
Correct |
6 ms |
14388 KB |
Output is correct |
44 |
Correct |
7 ms |
14292 KB |
Output is correct |
45 |
Correct |
7 ms |
14420 KB |
Output is correct |
46 |
Correct |
8 ms |
14900 KB |
Output is correct |
47 |
Correct |
9 ms |
14676 KB |
Output is correct |
48 |
Correct |
7 ms |
14676 KB |
Output is correct |
49 |
Correct |
7 ms |
14540 KB |
Output is correct |
50 |
Correct |
8 ms |
14676 KB |
Output is correct |
51 |
Correct |
8 ms |
14512 KB |
Output is correct |
52 |
Correct |
6 ms |
14420 KB |
Output is correct |
53 |
Correct |
6 ms |
14420 KB |
Output is correct |
54 |
Correct |
8 ms |
14420 KB |
Output is correct |
55 |
Correct |
6 ms |
14420 KB |
Output is correct |
56 |
Correct |
7 ms |
14448 KB |
Output is correct |
57 |
Correct |
8 ms |
14420 KB |
Output is correct |
58 |
Correct |
9 ms |
14364 KB |
Output is correct |
59 |
Correct |
7 ms |
14420 KB |
Output is correct |
60 |
Correct |
7 ms |
14420 KB |
Output is correct |
61 |
Correct |
7 ms |
14380 KB |
Output is correct |
62 |
Correct |
7 ms |
14420 KB |
Output is correct |
63 |
Correct |
8 ms |
15148 KB |
Output is correct |
64 |
Correct |
8 ms |
15140 KB |
Output is correct |
65 |
Correct |
9 ms |
15060 KB |
Output is correct |
66 |
Correct |
10 ms |
14968 KB |
Output is correct |
67 |
Correct |
8 ms |
14932 KB |
Output is correct |
68 |
Correct |
7 ms |
14420 KB |
Output is correct |
69 |
Correct |
7 ms |
14420 KB |
Output is correct |
70 |
Correct |
8 ms |
14400 KB |
Output is correct |
71 |
Correct |
8 ms |
14420 KB |
Output is correct |
72 |
Correct |
7 ms |
14464 KB |
Output is correct |
73 |
Correct |
7 ms |
14420 KB |
Output is correct |
74 |
Correct |
6 ms |
14420 KB |
Output is correct |
75 |
Correct |
7 ms |
14420 KB |
Output is correct |
76 |
Correct |
7 ms |
14420 KB |
Output is correct |
77 |
Correct |
7 ms |
14420 KB |
Output is correct |
78 |
Correct |
8 ms |
14452 KB |
Output is correct |
79 |
Correct |
8 ms |
14420 KB |
Output is correct |
80 |
Correct |
15 ms |
16668 KB |
Output is correct |
81 |
Correct |
9 ms |
15316 KB |
Output is correct |
82 |
Correct |
16 ms |
17288 KB |
Output is correct |
83 |
Correct |
11 ms |
16084 KB |
Output is correct |
84 |
Correct |
13 ms |
16852 KB |
Output is correct |
85 |
Correct |
9 ms |
15060 KB |
Output is correct |
86 |
Correct |
10 ms |
15060 KB |
Output is correct |
87 |
Correct |
9 ms |
15060 KB |
Output is correct |
88 |
Correct |
8 ms |
14676 KB |
Output is correct |
89 |
Correct |
9 ms |
15060 KB |
Output is correct |
90 |
Correct |
8 ms |
14876 KB |
Output is correct |
91 |
Correct |
21 ms |
17088 KB |
Output is correct |
92 |
Correct |
21 ms |
17492 KB |
Output is correct |
93 |
Correct |
24 ms |
17904 KB |
Output is correct |
94 |
Correct |
20 ms |
19132 KB |
Output is correct |
95 |
Correct |
19 ms |
19148 KB |
Output is correct |
96 |
Correct |
19 ms |
19156 KB |
Output is correct |
97 |
Correct |
22 ms |
19280 KB |
Output is correct |
98 |
Correct |
20 ms |
19156 KB |
Output is correct |
99 |
Correct |
9 ms |
15188 KB |
Output is correct |
100 |
Correct |
9 ms |
15188 KB |
Output is correct |
101 |
Correct |
11 ms |
15220 KB |
Output is correct |
102 |
Correct |
10 ms |
15168 KB |
Output is correct |
103 |
Correct |
9 ms |
15276 KB |
Output is correct |
104 |
Correct |
9 ms |
15220 KB |
Output is correct |
105 |
Correct |
24 ms |
18124 KB |
Output is correct |
106 |
Correct |
24 ms |
18192 KB |
Output is correct |
107 |
Correct |
24 ms |
18188 KB |
Output is correct |
108 |
Correct |
12 ms |
16536 KB |
Output is correct |
109 |
Correct |
1166 ms |
435684 KB |
Output is correct |
110 |
Correct |
771 ms |
331204 KB |
Output is correct |
111 |
Correct |
635 ms |
274432 KB |
Output is correct |
112 |
Correct |
750 ms |
332312 KB |
Output is correct |
113 |
Correct |
545 ms |
237080 KB |
Output is correct |
114 |
Correct |
23 ms |
18296 KB |
Output is correct |
115 |
Correct |
19 ms |
18388 KB |
Output is correct |
116 |
Correct |
23 ms |
19324 KB |
Output is correct |
117 |
Correct |
19 ms |
18132 KB |
Output is correct |
118 |
Correct |
21 ms |
18708 KB |
Output is correct |
119 |
Correct |
17 ms |
17620 KB |
Output is correct |
120 |
Correct |
27 ms |
18636 KB |
Output is correct |
121 |
Correct |
13 ms |
16724 KB |
Output is correct |
122 |
Correct |
26 ms |
19380 KB |
Output is correct |
123 |
Correct |
16 ms |
16544 KB |
Output is correct |
124 |
Correct |
29 ms |
20424 KB |
Output is correct |
125 |
Correct |
17 ms |
17748 KB |
Output is correct |
126 |
Correct |
14 ms |
16356 KB |
Output is correct |
127 |
Correct |
15 ms |
16904 KB |
Output is correct |
128 |
Correct |
12 ms |
16084 KB |
Output is correct |
129 |
Correct |
17 ms |
16248 KB |
Output is correct |
130 |
Correct |
11 ms |
16468 KB |
Output is correct |
131 |
Runtime error |
1185 ms |
524288 KB |
Execution killed with signal 9 |
132 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
14292 KB |
Output is correct |
2 |
Correct |
7 ms |
14380 KB |
Output is correct |
3 |
Correct |
7 ms |
14292 KB |
Output is correct |
4 |
Correct |
7 ms |
14292 KB |
Output is correct |
5 |
Correct |
7 ms |
14292 KB |
Output is correct |
6 |
Correct |
7 ms |
14292 KB |
Output is correct |
7 |
Correct |
6 ms |
14292 KB |
Output is correct |
8 |
Correct |
7 ms |
14400 KB |
Output is correct |
9 |
Correct |
6 ms |
14420 KB |
Output is correct |
10 |
Correct |
6 ms |
14420 KB |
Output is correct |
11 |
Correct |
6 ms |
14420 KB |
Output is correct |
12 |
Correct |
7 ms |
14420 KB |
Output is correct |
13 |
Correct |
7 ms |
14420 KB |
Output is correct |
14 |
Correct |
7 ms |
14424 KB |
Output is correct |
15 |
Correct |
7 ms |
14420 KB |
Output is correct |
16 |
Correct |
7 ms |
14420 KB |
Output is correct |
17 |
Correct |
7 ms |
14420 KB |
Output is correct |
18 |
Correct |
9 ms |
14404 KB |
Output is correct |
19 |
Correct |
7 ms |
14480 KB |
Output is correct |
20 |
Correct |
8 ms |
14384 KB |
Output is correct |
21 |
Correct |
8 ms |
14356 KB |
Output is correct |
22 |
Correct |
8 ms |
14408 KB |
Output is correct |
23 |
Correct |
7 ms |
14420 KB |
Output is correct |
24 |
Correct |
21 ms |
18312 KB |
Output is correct |
25 |
Correct |
19 ms |
18348 KB |
Output is correct |
26 |
Correct |
18 ms |
18296 KB |
Output is correct |
27 |
Correct |
11 ms |
15572 KB |
Output is correct |
28 |
Correct |
9 ms |
15632 KB |
Output is correct |
29 |
Correct |
15 ms |
16084 KB |
Output is correct |
30 |
Correct |
11 ms |
16288 KB |
Output is correct |
31 |
Correct |
11 ms |
16272 KB |
Output is correct |
32 |
Correct |
11 ms |
16340 KB |
Output is correct |
33 |
Correct |
15 ms |
16560 KB |
Output is correct |
34 |
Correct |
16 ms |
16672 KB |
Output is correct |
35 |
Correct |
16 ms |
16656 KB |
Output is correct |
36 |
Correct |
15 ms |
16672 KB |
Output is correct |
37 |
Correct |
15 ms |
16652 KB |
Output is correct |
38 |
Correct |
15 ms |
16656 KB |
Output is correct |
39 |
Correct |
33 ms |
20724 KB |
Output is correct |
40 |
Correct |
29 ms |
20684 KB |
Output is correct |
41 |
Correct |
33 ms |
20732 KB |
Output is correct |
42 |
Correct |
24 ms |
20004 KB |
Output is correct |
43 |
Correct |
16 ms |
17956 KB |
Output is correct |
44 |
Correct |
28 ms |
22824 KB |
Output is correct |
45 |
Correct |
22 ms |
20552 KB |
Output is correct |
46 |
Correct |
21 ms |
20152 KB |
Output is correct |
47 |
Correct |
29 ms |
24408 KB |
Output is correct |
48 |
Correct |
62 ms |
30488 KB |
Output is correct |
49 |
Correct |
45 ms |
23676 KB |
Output is correct |
50 |
Correct |
49 ms |
27172 KB |
Output is correct |
51 |
Correct |
63 ms |
30100 KB |
Output is correct |
52 |
Correct |
71 ms |
30376 KB |
Output is correct |
53 |
Correct |
53 ms |
27852 KB |
Output is correct |
54 |
Correct |
24 ms |
20564 KB |
Output is correct |
55 |
Correct |
22 ms |
20680 KB |
Output is correct |
56 |
Correct |
27 ms |
22920 KB |
Output is correct |
57 |
Correct |
33 ms |
23792 KB |
Output is correct |
58 |
Correct |
28 ms |
24084 KB |
Output is correct |
59 |
Correct |
29 ms |
24388 KB |
Output is correct |
60 |
Correct |
69 ms |
32016 KB |
Output is correct |
61 |
Correct |
75 ms |
32008 KB |
Output is correct |
62 |
Correct |
67 ms |
31948 KB |
Output is correct |
63 |
Correct |
70 ms |
31948 KB |
Output is correct |
64 |
Correct |
68 ms |
31904 KB |
Output is correct |
65 |
Correct |
76 ms |
32008 KB |
Output is correct |
66 |
Correct |
76 ms |
35532 KB |
Output is correct |
67 |
Correct |
75 ms |
35500 KB |
Output is correct |
68 |
Correct |
74 ms |
35624 KB |
Output is correct |
69 |
Correct |
7 ms |
14292 KB |
Output is correct |
70 |
Correct |
6 ms |
14388 KB |
Output is correct |
71 |
Correct |
7 ms |
14292 KB |
Output is correct |
72 |
Correct |
7 ms |
14420 KB |
Output is correct |
73 |
Correct |
8 ms |
14900 KB |
Output is correct |
74 |
Correct |
9 ms |
14676 KB |
Output is correct |
75 |
Correct |
7 ms |
14676 KB |
Output is correct |
76 |
Correct |
7 ms |
14540 KB |
Output is correct |
77 |
Correct |
8 ms |
14676 KB |
Output is correct |
78 |
Correct |
8 ms |
14512 KB |
Output is correct |
79 |
Correct |
6 ms |
14420 KB |
Output is correct |
80 |
Correct |
6 ms |
14420 KB |
Output is correct |
81 |
Correct |
8 ms |
14420 KB |
Output is correct |
82 |
Correct |
6 ms |
14420 KB |
Output is correct |
83 |
Correct |
7 ms |
14448 KB |
Output is correct |
84 |
Correct |
8 ms |
14420 KB |
Output is correct |
85 |
Correct |
9 ms |
14364 KB |
Output is correct |
86 |
Correct |
7 ms |
14420 KB |
Output is correct |
87 |
Correct |
7 ms |
14420 KB |
Output is correct |
88 |
Correct |
7 ms |
14380 KB |
Output is correct |
89 |
Correct |
7 ms |
14420 KB |
Output is correct |
90 |
Correct |
8 ms |
15148 KB |
Output is correct |
91 |
Correct |
8 ms |
15140 KB |
Output is correct |
92 |
Correct |
9 ms |
15060 KB |
Output is correct |
93 |
Correct |
10 ms |
14968 KB |
Output is correct |
94 |
Correct |
8 ms |
14932 KB |
Output is correct |
95 |
Correct |
7 ms |
14420 KB |
Output is correct |
96 |
Correct |
7 ms |
14420 KB |
Output is correct |
97 |
Correct |
8 ms |
14400 KB |
Output is correct |
98 |
Correct |
8 ms |
14420 KB |
Output is correct |
99 |
Correct |
7 ms |
14464 KB |
Output is correct |
100 |
Correct |
7 ms |
14420 KB |
Output is correct |
101 |
Correct |
6 ms |
14420 KB |
Output is correct |
102 |
Correct |
7 ms |
14420 KB |
Output is correct |
103 |
Correct |
7 ms |
14420 KB |
Output is correct |
104 |
Correct |
7 ms |
14420 KB |
Output is correct |
105 |
Correct |
8 ms |
14452 KB |
Output is correct |
106 |
Correct |
8 ms |
14420 KB |
Output is correct |
107 |
Correct |
15 ms |
16668 KB |
Output is correct |
108 |
Correct |
9 ms |
15316 KB |
Output is correct |
109 |
Correct |
16 ms |
17288 KB |
Output is correct |
110 |
Correct |
11 ms |
16084 KB |
Output is correct |
111 |
Correct |
13 ms |
16852 KB |
Output is correct |
112 |
Correct |
9 ms |
15060 KB |
Output is correct |
113 |
Correct |
10 ms |
15060 KB |
Output is correct |
114 |
Correct |
9 ms |
15060 KB |
Output is correct |
115 |
Correct |
8 ms |
14676 KB |
Output is correct |
116 |
Correct |
9 ms |
15060 KB |
Output is correct |
117 |
Correct |
8 ms |
14876 KB |
Output is correct |
118 |
Correct |
21 ms |
17088 KB |
Output is correct |
119 |
Correct |
21 ms |
17492 KB |
Output is correct |
120 |
Correct |
24 ms |
17904 KB |
Output is correct |
121 |
Correct |
20 ms |
19132 KB |
Output is correct |
122 |
Correct |
19 ms |
19148 KB |
Output is correct |
123 |
Correct |
19 ms |
19156 KB |
Output is correct |
124 |
Correct |
22 ms |
19280 KB |
Output is correct |
125 |
Correct |
20 ms |
19156 KB |
Output is correct |
126 |
Correct |
9 ms |
15188 KB |
Output is correct |
127 |
Correct |
9 ms |
15188 KB |
Output is correct |
128 |
Correct |
11 ms |
15220 KB |
Output is correct |
129 |
Correct |
10 ms |
15168 KB |
Output is correct |
130 |
Correct |
9 ms |
15276 KB |
Output is correct |
131 |
Correct |
9 ms |
15220 KB |
Output is correct |
132 |
Correct |
24 ms |
18124 KB |
Output is correct |
133 |
Correct |
24 ms |
18192 KB |
Output is correct |
134 |
Correct |
24 ms |
18188 KB |
Output is correct |
135 |
Correct |
12 ms |
16536 KB |
Output is correct |
136 |
Correct |
1166 ms |
435684 KB |
Output is correct |
137 |
Correct |
771 ms |
331204 KB |
Output is correct |
138 |
Correct |
635 ms |
274432 KB |
Output is correct |
139 |
Correct |
750 ms |
332312 KB |
Output is correct |
140 |
Correct |
545 ms |
237080 KB |
Output is correct |
141 |
Correct |
23 ms |
18296 KB |
Output is correct |
142 |
Correct |
19 ms |
18388 KB |
Output is correct |
143 |
Correct |
23 ms |
19324 KB |
Output is correct |
144 |
Correct |
19 ms |
18132 KB |
Output is correct |
145 |
Correct |
21 ms |
18708 KB |
Output is correct |
146 |
Correct |
17 ms |
17620 KB |
Output is correct |
147 |
Correct |
27 ms |
18636 KB |
Output is correct |
148 |
Correct |
13 ms |
16724 KB |
Output is correct |
149 |
Correct |
26 ms |
19380 KB |
Output is correct |
150 |
Correct |
16 ms |
16544 KB |
Output is correct |
151 |
Correct |
29 ms |
20424 KB |
Output is correct |
152 |
Correct |
17 ms |
17748 KB |
Output is correct |
153 |
Correct |
14 ms |
16356 KB |
Output is correct |
154 |
Correct |
15 ms |
16904 KB |
Output is correct |
155 |
Correct |
12 ms |
16084 KB |
Output is correct |
156 |
Correct |
17 ms |
16248 KB |
Output is correct |
157 |
Correct |
11 ms |
16468 KB |
Output is correct |
158 |
Runtime error |
1185 ms |
524288 KB |
Execution killed with signal 9 |
159 |
Halted |
0 ms |
0 KB |
- |