#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) {
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 |
8 ms |
14292 KB |
Output is correct |
2 |
Correct |
7 ms |
14360 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 |
14404 KB |
Output is correct |
6 |
Correct |
6 ms |
14324 KB |
Output is correct |
7 |
Correct |
7 ms |
14420 KB |
Output is correct |
8 |
Correct |
7 ms |
14420 KB |
Output is correct |
9 |
Correct |
7 ms |
14396 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 |
14404 KB |
Output is correct |
13 |
Correct |
7 ms |
14420 KB |
Output is correct |
14 |
Correct |
6 ms |
14420 KB |
Output is correct |
15 |
Correct |
8 ms |
14420 KB |
Output is correct |
16 |
Correct |
7 ms |
14408 KB |
Output is correct |
17 |
Correct |
7 ms |
14380 KB |
Output is correct |
18 |
Correct |
7 ms |
14408 KB |
Output is correct |
19 |
Correct |
7 ms |
14420 KB |
Output is correct |
20 |
Correct |
7 ms |
14420 KB |
Output is correct |
21 |
Correct |
7 ms |
14432 KB |
Output is correct |
22 |
Correct |
20 ms |
18960 KB |
Output is correct |
23 |
Correct |
21 ms |
18900 KB |
Output is correct |
24 |
Correct |
26 ms |
18920 KB |
Output is correct |
25 |
Correct |
10 ms |
15700 KB |
Output is correct |
26 |
Correct |
10 ms |
15692 KB |
Output is correct |
27 |
Correct |
11 ms |
16132 KB |
Output is correct |
28 |
Correct |
11 ms |
16308 KB |
Output is correct |
29 |
Correct |
11 ms |
16336 KB |
Output is correct |
30 |
Correct |
12 ms |
16336 KB |
Output is correct |
31 |
Correct |
15 ms |
16852 KB |
Output is correct |
32 |
Correct |
15 ms |
16852 KB |
Output is correct |
33 |
Correct |
16 ms |
16896 KB |
Output is correct |
34 |
Correct |
16 ms |
16864 KB |
Output is correct |
35 |
Correct |
15 ms |
16852 KB |
Output is correct |
36 |
Correct |
16 ms |
16892 KB |
Output is correct |
37 |
Correct |
26 ms |
21268 KB |
Output is correct |
38 |
Correct |
29 ms |
21364 KB |
Output is correct |
39 |
Correct |
28 ms |
21348 KB |
Output is correct |
40 |
Correct |
22 ms |
20140 KB |
Output is correct |
41 |
Correct |
18 ms |
17960 KB |
Output is correct |
42 |
Correct |
28 ms |
22984 KB |
Output is correct |
43 |
Correct |
21 ms |
20556 KB |
Output is correct |
44 |
Correct |
20 ms |
20304 KB |
Output is correct |
45 |
Correct |
30 ms |
24456 KB |
Output is correct |
46 |
Correct |
64 ms |
31308 KB |
Output is correct |
47 |
Correct |
42 ms |
24156 KB |
Output is correct |
48 |
Correct |
48 ms |
27872 KB |
Output is correct |
49 |
Correct |
63 ms |
30684 KB |
Output is correct |
50 |
Correct |
61 ms |
31084 KB |
Output is correct |
51 |
Correct |
51 ms |
28368 KB |
Output is correct |
52 |
Correct |
24 ms |
20820 KB |
Output is correct |
53 |
Correct |
23 ms |
20820 KB |
Output is correct |
54 |
Correct |
28 ms |
23120 KB |
Output is correct |
55 |
Correct |
30 ms |
24004 KB |
Output is correct |
56 |
Correct |
31 ms |
24336 KB |
Output is correct |
57 |
Correct |
30 ms |
24456 KB |
Output is correct |
58 |
Correct |
71 ms |
32952 KB |
Output is correct |
59 |
Correct |
71 ms |
32952 KB |
Output is correct |
60 |
Correct |
71 ms |
32968 KB |
Output is correct |
61 |
Correct |
73 ms |
32988 KB |
Output is correct |
62 |
Correct |
75 ms |
32996 KB |
Output is correct |
63 |
Correct |
78 ms |
33020 KB |
Output is correct |
64 |
Correct |
77 ms |
36352 KB |
Output is correct |
65 |
Correct |
83 ms |
36428 KB |
Output is correct |
66 |
Correct |
77 ms |
36340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
14292 KB |
Output is correct |
2 |
Correct |
7 ms |
14360 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 |
14404 KB |
Output is correct |
6 |
Correct |
6 ms |
14324 KB |
Output is correct |
7 |
Correct |
7 ms |
14420 KB |
Output is correct |
8 |
Correct |
7 ms |
14420 KB |
Output is correct |
9 |
Correct |
7 ms |
14396 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 |
14404 KB |
Output is correct |
13 |
Correct |
7 ms |
14420 KB |
Output is correct |
14 |
Correct |
6 ms |
14420 KB |
Output is correct |
15 |
Correct |
8 ms |
14420 KB |
Output is correct |
16 |
Correct |
7 ms |
14408 KB |
Output is correct |
17 |
Correct |
7 ms |
14380 KB |
Output is correct |
18 |
Correct |
7 ms |
14408 KB |
Output is correct |
19 |
Correct |
7 ms |
14420 KB |
Output is correct |
20 |
Correct |
7 ms |
14420 KB |
Output is correct |
21 |
Correct |
7 ms |
14432 KB |
Output is correct |
22 |
Correct |
7 ms |
14292 KB |
Output is correct |
23 |
Correct |
7 ms |
14308 KB |
Output is correct |
24 |
Correct |
6 ms |
14292 KB |
Output is correct |
25 |
Correct |
7 ms |
14332 KB |
Output is correct |
26 |
Correct |
6 ms |
14292 KB |
Output is correct |
27 |
Correct |
7 ms |
14408 KB |
Output is correct |
28 |
Correct |
8 ms |
14760 KB |
Output is correct |
29 |
Correct |
7 ms |
14656 KB |
Output is correct |
30 |
Correct |
7 ms |
14676 KB |
Output is correct |
31 |
Correct |
7 ms |
14548 KB |
Output is correct |
32 |
Correct |
7 ms |
14676 KB |
Output is correct |
33 |
Correct |
7 ms |
14420 KB |
Output is correct |
34 |
Correct |
7 ms |
14408 KB |
Output is correct |
35 |
Correct |
6 ms |
14420 KB |
Output is correct |
36 |
Correct |
7 ms |
14420 KB |
Output is correct |
37 |
Correct |
7 ms |
14408 KB |
Output is correct |
38 |
Correct |
6 ms |
14420 KB |
Output is correct |
39 |
Correct |
8 ms |
14404 KB |
Output is correct |
40 |
Correct |
8 ms |
14420 KB |
Output is correct |
41 |
Correct |
7 ms |
14444 KB |
Output is correct |
42 |
Correct |
7 ms |
14412 KB |
Output is correct |
43 |
Correct |
7 ms |
14408 KB |
Output is correct |
44 |
Correct |
7 ms |
14400 KB |
Output is correct |
45 |
Correct |
8 ms |
15060 KB |
Output is correct |
46 |
Correct |
10 ms |
15192 KB |
Output is correct |
47 |
Correct |
8 ms |
15060 KB |
Output is correct |
48 |
Correct |
8 ms |
14932 KB |
Output is correct |
49 |
Correct |
8 ms |
14884 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 |
14472 KB |
Output is correct |
53 |
Correct |
7 ms |
14412 KB |
Output is correct |
54 |
Correct |
7 ms |
14396 KB |
Output is correct |
55 |
Correct |
9 ms |
14420 KB |
Output is correct |
56 |
Correct |
7 ms |
14420 KB |
Output is correct |
57 |
Correct |
7 ms |
14444 KB |
Output is correct |
58 |
Correct |
7 ms |
14400 KB |
Output is correct |
59 |
Correct |
7 ms |
14420 KB |
Output is correct |
60 |
Correct |
7 ms |
14412 KB |
Output is correct |
61 |
Correct |
7 ms |
14420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
14292 KB |
Output is correct |
2 |
Correct |
7 ms |
14308 KB |
Output is correct |
3 |
Correct |
8 ms |
14292 KB |
Output is correct |
4 |
Correct |
7 ms |
14360 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 |
14404 KB |
Output is correct |
8 |
Correct |
6 ms |
14324 KB |
Output is correct |
9 |
Correct |
7 ms |
14420 KB |
Output is correct |
10 |
Correct |
7 ms |
14420 KB |
Output is correct |
11 |
Correct |
7 ms |
14396 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 |
14404 KB |
Output is correct |
15 |
Correct |
7 ms |
14420 KB |
Output is correct |
16 |
Correct |
6 ms |
14420 KB |
Output is correct |
17 |
Correct |
8 ms |
14420 KB |
Output is correct |
18 |
Correct |
7 ms |
14408 KB |
Output is correct |
19 |
Correct |
7 ms |
14380 KB |
Output is correct |
20 |
Correct |
7 ms |
14408 KB |
Output is correct |
21 |
Correct |
7 ms |
14420 KB |
Output is correct |
22 |
Correct |
7 ms |
14420 KB |
Output is correct |
23 |
Correct |
7 ms |
14432 KB |
Output is correct |
24 |
Correct |
20 ms |
18960 KB |
Output is correct |
25 |
Correct |
21 ms |
18900 KB |
Output is correct |
26 |
Correct |
26 ms |
18920 KB |
Output is correct |
27 |
Correct |
6 ms |
14292 KB |
Output is correct |
28 |
Correct |
7 ms |
14332 KB |
Output is correct |
29 |
Correct |
6 ms |
14292 KB |
Output is correct |
30 |
Correct |
7 ms |
14408 KB |
Output is correct |
31 |
Correct |
8 ms |
14760 KB |
Output is correct |
32 |
Correct |
7 ms |
14656 KB |
Output is correct |
33 |
Correct |
7 ms |
14676 KB |
Output is correct |
34 |
Correct |
7 ms |
14548 KB |
Output is correct |
35 |
Correct |
7 ms |
14676 KB |
Output is correct |
36 |
Correct |
7 ms |
14420 KB |
Output is correct |
37 |
Correct |
7 ms |
14408 KB |
Output is correct |
38 |
Correct |
6 ms |
14420 KB |
Output is correct |
39 |
Correct |
7 ms |
14420 KB |
Output is correct |
40 |
Correct |
7 ms |
14408 KB |
Output is correct |
41 |
Correct |
6 ms |
14420 KB |
Output is correct |
42 |
Correct |
8 ms |
14404 KB |
Output is correct |
43 |
Correct |
8 ms |
14420 KB |
Output is correct |
44 |
Correct |
7 ms |
14444 KB |
Output is correct |
45 |
Correct |
7 ms |
14412 KB |
Output is correct |
46 |
Correct |
7 ms |
14408 KB |
Output is correct |
47 |
Correct |
7 ms |
14400 KB |
Output is correct |
48 |
Correct |
8 ms |
15060 KB |
Output is correct |
49 |
Correct |
10 ms |
15192 KB |
Output is correct |
50 |
Correct |
8 ms |
15060 KB |
Output is correct |
51 |
Correct |
8 ms |
14932 KB |
Output is correct |
52 |
Correct |
8 ms |
14884 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 |
14472 KB |
Output is correct |
56 |
Correct |
7 ms |
14412 KB |
Output is correct |
57 |
Correct |
7 ms |
14396 KB |
Output is correct |
58 |
Correct |
9 ms |
14420 KB |
Output is correct |
59 |
Correct |
7 ms |
14420 KB |
Output is correct |
60 |
Correct |
7 ms |
14444 KB |
Output is correct |
61 |
Correct |
7 ms |
14400 KB |
Output is correct |
62 |
Correct |
7 ms |
14420 KB |
Output is correct |
63 |
Correct |
7 ms |
14412 KB |
Output is correct |
64 |
Correct |
7 ms |
14420 KB |
Output is correct |
65 |
Correct |
12 ms |
16596 KB |
Output is correct |
66 |
Correct |
9 ms |
15300 KB |
Output is correct |
67 |
Correct |
15 ms |
17364 KB |
Output is correct |
68 |
Correct |
12 ms |
16084 KB |
Output is correct |
69 |
Correct |
13 ms |
16832 KB |
Output is correct |
70 |
Correct |
9 ms |
15056 KB |
Output is correct |
71 |
Correct |
9 ms |
15188 KB |
Output is correct |
72 |
Correct |
9 ms |
15060 KB |
Output is correct |
73 |
Correct |
8 ms |
14804 KB |
Output is correct |
74 |
Correct |
10 ms |
15060 KB |
Output is correct |
75 |
Correct |
8 ms |
14976 KB |
Output is correct |
76 |
Correct |
28 ms |
17648 KB |
Output is correct |
77 |
Correct |
22 ms |
18108 KB |
Output is correct |
78 |
Correct |
25 ms |
18768 KB |
Output is correct |
79 |
Correct |
20 ms |
19156 KB |
Output is correct |
80 |
Correct |
19 ms |
19044 KB |
Output is correct |
81 |
Correct |
19 ms |
19100 KB |
Output is correct |
82 |
Correct |
19 ms |
19268 KB |
Output is correct |
83 |
Correct |
19 ms |
19160 KB |
Output is correct |
84 |
Correct |
12 ms |
15316 KB |
Output is correct |
85 |
Correct |
9 ms |
15316 KB |
Output is correct |
86 |
Correct |
9 ms |
15324 KB |
Output is correct |
87 |
Correct |
10 ms |
15308 KB |
Output is correct |
88 |
Correct |
10 ms |
15316 KB |
Output is correct |
89 |
Correct |
11 ms |
15340 KB |
Output is correct |
90 |
Correct |
30 ms |
19112 KB |
Output is correct |
91 |
Correct |
27 ms |
19124 KB |
Output is correct |
92 |
Correct |
29 ms |
19016 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
14292 KB |
Output is correct |
2 |
Correct |
7 ms |
14308 KB |
Output is correct |
3 |
Correct |
8 ms |
14292 KB |
Output is correct |
4 |
Correct |
7 ms |
14360 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 |
14404 KB |
Output is correct |
8 |
Correct |
6 ms |
14324 KB |
Output is correct |
9 |
Correct |
7 ms |
14420 KB |
Output is correct |
10 |
Correct |
7 ms |
14420 KB |
Output is correct |
11 |
Correct |
7 ms |
14396 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 |
14404 KB |
Output is correct |
15 |
Correct |
7 ms |
14420 KB |
Output is correct |
16 |
Correct |
6 ms |
14420 KB |
Output is correct |
17 |
Correct |
8 ms |
14420 KB |
Output is correct |
18 |
Correct |
7 ms |
14408 KB |
Output is correct |
19 |
Correct |
7 ms |
14380 KB |
Output is correct |
20 |
Correct |
7 ms |
14408 KB |
Output is correct |
21 |
Correct |
7 ms |
14420 KB |
Output is correct |
22 |
Correct |
7 ms |
14420 KB |
Output is correct |
23 |
Correct |
7 ms |
14432 KB |
Output is correct |
24 |
Correct |
20 ms |
18960 KB |
Output is correct |
25 |
Correct |
21 ms |
18900 KB |
Output is correct |
26 |
Correct |
26 ms |
18920 KB |
Output is correct |
27 |
Correct |
10 ms |
15700 KB |
Output is correct |
28 |
Correct |
10 ms |
15692 KB |
Output is correct |
29 |
Correct |
11 ms |
16132 KB |
Output is correct |
30 |
Correct |
11 ms |
16308 KB |
Output is correct |
31 |
Correct |
11 ms |
16336 KB |
Output is correct |
32 |
Correct |
12 ms |
16336 KB |
Output is correct |
33 |
Correct |
15 ms |
16852 KB |
Output is correct |
34 |
Correct |
15 ms |
16852 KB |
Output is correct |
35 |
Correct |
16 ms |
16896 KB |
Output is correct |
36 |
Correct |
16 ms |
16864 KB |
Output is correct |
37 |
Correct |
15 ms |
16852 KB |
Output is correct |
38 |
Correct |
16 ms |
16892 KB |
Output is correct |
39 |
Correct |
26 ms |
21268 KB |
Output is correct |
40 |
Correct |
29 ms |
21364 KB |
Output is correct |
41 |
Correct |
28 ms |
21348 KB |
Output is correct |
42 |
Correct |
6 ms |
14292 KB |
Output is correct |
43 |
Correct |
7 ms |
14332 KB |
Output is correct |
44 |
Correct |
6 ms |
14292 KB |
Output is correct |
45 |
Correct |
7 ms |
14408 KB |
Output is correct |
46 |
Correct |
8 ms |
14760 KB |
Output is correct |
47 |
Correct |
7 ms |
14656 KB |
Output is correct |
48 |
Correct |
7 ms |
14676 KB |
Output is correct |
49 |
Correct |
7 ms |
14548 KB |
Output is correct |
50 |
Correct |
7 ms |
14676 KB |
Output is correct |
51 |
Correct |
7 ms |
14420 KB |
Output is correct |
52 |
Correct |
7 ms |
14408 KB |
Output is correct |
53 |
Correct |
6 ms |
14420 KB |
Output is correct |
54 |
Correct |
7 ms |
14420 KB |
Output is correct |
55 |
Correct |
7 ms |
14408 KB |
Output is correct |
56 |
Correct |
6 ms |
14420 KB |
Output is correct |
57 |
Correct |
8 ms |
14404 KB |
Output is correct |
58 |
Correct |
8 ms |
14420 KB |
Output is correct |
59 |
Correct |
7 ms |
14444 KB |
Output is correct |
60 |
Correct |
7 ms |
14412 KB |
Output is correct |
61 |
Correct |
7 ms |
14408 KB |
Output is correct |
62 |
Correct |
7 ms |
14400 KB |
Output is correct |
63 |
Correct |
8 ms |
15060 KB |
Output is correct |
64 |
Correct |
10 ms |
15192 KB |
Output is correct |
65 |
Correct |
8 ms |
15060 KB |
Output is correct |
66 |
Correct |
8 ms |
14932 KB |
Output is correct |
67 |
Correct |
8 ms |
14884 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 |
14472 KB |
Output is correct |
71 |
Correct |
7 ms |
14412 KB |
Output is correct |
72 |
Correct |
7 ms |
14396 KB |
Output is correct |
73 |
Correct |
9 ms |
14420 KB |
Output is correct |
74 |
Correct |
7 ms |
14420 KB |
Output is correct |
75 |
Correct |
7 ms |
14444 KB |
Output is correct |
76 |
Correct |
7 ms |
14400 KB |
Output is correct |
77 |
Correct |
7 ms |
14420 KB |
Output is correct |
78 |
Correct |
7 ms |
14412 KB |
Output is correct |
79 |
Correct |
7 ms |
14420 KB |
Output is correct |
80 |
Correct |
12 ms |
16596 KB |
Output is correct |
81 |
Correct |
9 ms |
15300 KB |
Output is correct |
82 |
Correct |
15 ms |
17364 KB |
Output is correct |
83 |
Correct |
12 ms |
16084 KB |
Output is correct |
84 |
Correct |
13 ms |
16832 KB |
Output is correct |
85 |
Correct |
9 ms |
15056 KB |
Output is correct |
86 |
Correct |
9 ms |
15188 KB |
Output is correct |
87 |
Correct |
9 ms |
15060 KB |
Output is correct |
88 |
Correct |
8 ms |
14804 KB |
Output is correct |
89 |
Correct |
10 ms |
15060 KB |
Output is correct |
90 |
Correct |
8 ms |
14976 KB |
Output is correct |
91 |
Correct |
28 ms |
17648 KB |
Output is correct |
92 |
Correct |
22 ms |
18108 KB |
Output is correct |
93 |
Correct |
25 ms |
18768 KB |
Output is correct |
94 |
Correct |
20 ms |
19156 KB |
Output is correct |
95 |
Correct |
19 ms |
19044 KB |
Output is correct |
96 |
Correct |
19 ms |
19100 KB |
Output is correct |
97 |
Correct |
19 ms |
19268 KB |
Output is correct |
98 |
Correct |
19 ms |
19160 KB |
Output is correct |
99 |
Correct |
12 ms |
15316 KB |
Output is correct |
100 |
Correct |
9 ms |
15316 KB |
Output is correct |
101 |
Correct |
9 ms |
15324 KB |
Output is correct |
102 |
Correct |
10 ms |
15308 KB |
Output is correct |
103 |
Correct |
10 ms |
15316 KB |
Output is correct |
104 |
Correct |
11 ms |
15340 KB |
Output is correct |
105 |
Correct |
30 ms |
19112 KB |
Output is correct |
106 |
Correct |
27 ms |
19124 KB |
Output is correct |
107 |
Correct |
29 ms |
19016 KB |
Output is correct |
108 |
Correct |
11 ms |
16596 KB |
Output is correct |
109 |
Correct |
1222 ms |
435676 KB |
Output is correct |
110 |
Correct |
751 ms |
331196 KB |
Output is correct |
111 |
Correct |
603 ms |
274380 KB |
Output is correct |
112 |
Correct |
744 ms |
332176 KB |
Output is correct |
113 |
Correct |
513 ms |
236952 KB |
Output is correct |
114 |
Correct |
20 ms |
18696 KB |
Output is correct |
115 |
Correct |
20 ms |
18768 KB |
Output is correct |
116 |
Correct |
24 ms |
19796 KB |
Output is correct |
117 |
Correct |
20 ms |
18512 KB |
Output is correct |
118 |
Correct |
22 ms |
19168 KB |
Output is correct |
119 |
Correct |
18 ms |
17872 KB |
Output is correct |
120 |
Correct |
25 ms |
19092 KB |
Output is correct |
121 |
Correct |
14 ms |
16852 KB |
Output is correct |
122 |
Correct |
29 ms |
19956 KB |
Output is correct |
123 |
Correct |
13 ms |
16588 KB |
Output is correct |
124 |
Correct |
31 ms |
21112 KB |
Output is correct |
125 |
Correct |
17 ms |
17956 KB |
Output is correct |
126 |
Correct |
15 ms |
16588 KB |
Output is correct |
127 |
Correct |
15 ms |
17108 KB |
Output is correct |
128 |
Correct |
13 ms |
16340 KB |
Output is correct |
129 |
Correct |
13 ms |
16464 KB |
Output is correct |
130 |
Correct |
11 ms |
16580 KB |
Output is correct |
131 |
Runtime error |
1196 ms |
524288 KB |
Execution killed with signal 9 |
132 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
14292 KB |
Output is correct |
2 |
Correct |
7 ms |
14308 KB |
Output is correct |
3 |
Correct |
8 ms |
14292 KB |
Output is correct |
4 |
Correct |
7 ms |
14360 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 |
14404 KB |
Output is correct |
8 |
Correct |
6 ms |
14324 KB |
Output is correct |
9 |
Correct |
7 ms |
14420 KB |
Output is correct |
10 |
Correct |
7 ms |
14420 KB |
Output is correct |
11 |
Correct |
7 ms |
14396 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 |
14404 KB |
Output is correct |
15 |
Correct |
7 ms |
14420 KB |
Output is correct |
16 |
Correct |
6 ms |
14420 KB |
Output is correct |
17 |
Correct |
8 ms |
14420 KB |
Output is correct |
18 |
Correct |
7 ms |
14408 KB |
Output is correct |
19 |
Correct |
7 ms |
14380 KB |
Output is correct |
20 |
Correct |
7 ms |
14408 KB |
Output is correct |
21 |
Correct |
7 ms |
14420 KB |
Output is correct |
22 |
Correct |
7 ms |
14420 KB |
Output is correct |
23 |
Correct |
7 ms |
14432 KB |
Output is correct |
24 |
Correct |
20 ms |
18960 KB |
Output is correct |
25 |
Correct |
21 ms |
18900 KB |
Output is correct |
26 |
Correct |
26 ms |
18920 KB |
Output is correct |
27 |
Correct |
10 ms |
15700 KB |
Output is correct |
28 |
Correct |
10 ms |
15692 KB |
Output is correct |
29 |
Correct |
11 ms |
16132 KB |
Output is correct |
30 |
Correct |
11 ms |
16308 KB |
Output is correct |
31 |
Correct |
11 ms |
16336 KB |
Output is correct |
32 |
Correct |
12 ms |
16336 KB |
Output is correct |
33 |
Correct |
15 ms |
16852 KB |
Output is correct |
34 |
Correct |
15 ms |
16852 KB |
Output is correct |
35 |
Correct |
16 ms |
16896 KB |
Output is correct |
36 |
Correct |
16 ms |
16864 KB |
Output is correct |
37 |
Correct |
15 ms |
16852 KB |
Output is correct |
38 |
Correct |
16 ms |
16892 KB |
Output is correct |
39 |
Correct |
26 ms |
21268 KB |
Output is correct |
40 |
Correct |
29 ms |
21364 KB |
Output is correct |
41 |
Correct |
28 ms |
21348 KB |
Output is correct |
42 |
Correct |
22 ms |
20140 KB |
Output is correct |
43 |
Correct |
18 ms |
17960 KB |
Output is correct |
44 |
Correct |
28 ms |
22984 KB |
Output is correct |
45 |
Correct |
21 ms |
20556 KB |
Output is correct |
46 |
Correct |
20 ms |
20304 KB |
Output is correct |
47 |
Correct |
30 ms |
24456 KB |
Output is correct |
48 |
Correct |
64 ms |
31308 KB |
Output is correct |
49 |
Correct |
42 ms |
24156 KB |
Output is correct |
50 |
Correct |
48 ms |
27872 KB |
Output is correct |
51 |
Correct |
63 ms |
30684 KB |
Output is correct |
52 |
Correct |
61 ms |
31084 KB |
Output is correct |
53 |
Correct |
51 ms |
28368 KB |
Output is correct |
54 |
Correct |
24 ms |
20820 KB |
Output is correct |
55 |
Correct |
23 ms |
20820 KB |
Output is correct |
56 |
Correct |
28 ms |
23120 KB |
Output is correct |
57 |
Correct |
30 ms |
24004 KB |
Output is correct |
58 |
Correct |
31 ms |
24336 KB |
Output is correct |
59 |
Correct |
30 ms |
24456 KB |
Output is correct |
60 |
Correct |
71 ms |
32952 KB |
Output is correct |
61 |
Correct |
71 ms |
32952 KB |
Output is correct |
62 |
Correct |
71 ms |
32968 KB |
Output is correct |
63 |
Correct |
73 ms |
32988 KB |
Output is correct |
64 |
Correct |
75 ms |
32996 KB |
Output is correct |
65 |
Correct |
78 ms |
33020 KB |
Output is correct |
66 |
Correct |
77 ms |
36352 KB |
Output is correct |
67 |
Correct |
83 ms |
36428 KB |
Output is correct |
68 |
Correct |
77 ms |
36340 KB |
Output is correct |
69 |
Correct |
6 ms |
14292 KB |
Output is correct |
70 |
Correct |
7 ms |
14332 KB |
Output is correct |
71 |
Correct |
6 ms |
14292 KB |
Output is correct |
72 |
Correct |
7 ms |
14408 KB |
Output is correct |
73 |
Correct |
8 ms |
14760 KB |
Output is correct |
74 |
Correct |
7 ms |
14656 KB |
Output is correct |
75 |
Correct |
7 ms |
14676 KB |
Output is correct |
76 |
Correct |
7 ms |
14548 KB |
Output is correct |
77 |
Correct |
7 ms |
14676 KB |
Output is correct |
78 |
Correct |
7 ms |
14420 KB |
Output is correct |
79 |
Correct |
7 ms |
14408 KB |
Output is correct |
80 |
Correct |
6 ms |
14420 KB |
Output is correct |
81 |
Correct |
7 ms |
14420 KB |
Output is correct |
82 |
Correct |
7 ms |
14408 KB |
Output is correct |
83 |
Correct |
6 ms |
14420 KB |
Output is correct |
84 |
Correct |
8 ms |
14404 KB |
Output is correct |
85 |
Correct |
8 ms |
14420 KB |
Output is correct |
86 |
Correct |
7 ms |
14444 KB |
Output is correct |
87 |
Correct |
7 ms |
14412 KB |
Output is correct |
88 |
Correct |
7 ms |
14408 KB |
Output is correct |
89 |
Correct |
7 ms |
14400 KB |
Output is correct |
90 |
Correct |
8 ms |
15060 KB |
Output is correct |
91 |
Correct |
10 ms |
15192 KB |
Output is correct |
92 |
Correct |
8 ms |
15060 KB |
Output is correct |
93 |
Correct |
8 ms |
14932 KB |
Output is correct |
94 |
Correct |
8 ms |
14884 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 |
14472 KB |
Output is correct |
98 |
Correct |
7 ms |
14412 KB |
Output is correct |
99 |
Correct |
7 ms |
14396 KB |
Output is correct |
100 |
Correct |
9 ms |
14420 KB |
Output is correct |
101 |
Correct |
7 ms |
14420 KB |
Output is correct |
102 |
Correct |
7 ms |
14444 KB |
Output is correct |
103 |
Correct |
7 ms |
14400 KB |
Output is correct |
104 |
Correct |
7 ms |
14420 KB |
Output is correct |
105 |
Correct |
7 ms |
14412 KB |
Output is correct |
106 |
Correct |
7 ms |
14420 KB |
Output is correct |
107 |
Correct |
12 ms |
16596 KB |
Output is correct |
108 |
Correct |
9 ms |
15300 KB |
Output is correct |
109 |
Correct |
15 ms |
17364 KB |
Output is correct |
110 |
Correct |
12 ms |
16084 KB |
Output is correct |
111 |
Correct |
13 ms |
16832 KB |
Output is correct |
112 |
Correct |
9 ms |
15056 KB |
Output is correct |
113 |
Correct |
9 ms |
15188 KB |
Output is correct |
114 |
Correct |
9 ms |
15060 KB |
Output is correct |
115 |
Correct |
8 ms |
14804 KB |
Output is correct |
116 |
Correct |
10 ms |
15060 KB |
Output is correct |
117 |
Correct |
8 ms |
14976 KB |
Output is correct |
118 |
Correct |
28 ms |
17648 KB |
Output is correct |
119 |
Correct |
22 ms |
18108 KB |
Output is correct |
120 |
Correct |
25 ms |
18768 KB |
Output is correct |
121 |
Correct |
20 ms |
19156 KB |
Output is correct |
122 |
Correct |
19 ms |
19044 KB |
Output is correct |
123 |
Correct |
19 ms |
19100 KB |
Output is correct |
124 |
Correct |
19 ms |
19268 KB |
Output is correct |
125 |
Correct |
19 ms |
19160 KB |
Output is correct |
126 |
Correct |
12 ms |
15316 KB |
Output is correct |
127 |
Correct |
9 ms |
15316 KB |
Output is correct |
128 |
Correct |
9 ms |
15324 KB |
Output is correct |
129 |
Correct |
10 ms |
15308 KB |
Output is correct |
130 |
Correct |
10 ms |
15316 KB |
Output is correct |
131 |
Correct |
11 ms |
15340 KB |
Output is correct |
132 |
Correct |
30 ms |
19112 KB |
Output is correct |
133 |
Correct |
27 ms |
19124 KB |
Output is correct |
134 |
Correct |
29 ms |
19016 KB |
Output is correct |
135 |
Correct |
11 ms |
16596 KB |
Output is correct |
136 |
Correct |
1222 ms |
435676 KB |
Output is correct |
137 |
Correct |
751 ms |
331196 KB |
Output is correct |
138 |
Correct |
603 ms |
274380 KB |
Output is correct |
139 |
Correct |
744 ms |
332176 KB |
Output is correct |
140 |
Correct |
513 ms |
236952 KB |
Output is correct |
141 |
Correct |
20 ms |
18696 KB |
Output is correct |
142 |
Correct |
20 ms |
18768 KB |
Output is correct |
143 |
Correct |
24 ms |
19796 KB |
Output is correct |
144 |
Correct |
20 ms |
18512 KB |
Output is correct |
145 |
Correct |
22 ms |
19168 KB |
Output is correct |
146 |
Correct |
18 ms |
17872 KB |
Output is correct |
147 |
Correct |
25 ms |
19092 KB |
Output is correct |
148 |
Correct |
14 ms |
16852 KB |
Output is correct |
149 |
Correct |
29 ms |
19956 KB |
Output is correct |
150 |
Correct |
13 ms |
16588 KB |
Output is correct |
151 |
Correct |
31 ms |
21112 KB |
Output is correct |
152 |
Correct |
17 ms |
17956 KB |
Output is correct |
153 |
Correct |
15 ms |
16588 KB |
Output is correct |
154 |
Correct |
15 ms |
17108 KB |
Output is correct |
155 |
Correct |
13 ms |
16340 KB |
Output is correct |
156 |
Correct |
13 ms |
16464 KB |
Output is correct |
157 |
Correct |
11 ms |
16580 KB |
Output is correct |
158 |
Runtime error |
1196 ms |
524288 KB |
Execution killed with signal 9 |
159 |
Halted |
0 ms |
0 KB |
- |