# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
892093 | 2023-12-24T21:05:52 Z | omeganot | Painting Walls (APIO20_paint) | C++11 | 598 ms | 524288 KB |
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MOD = 1E9 + 7; const int INF = 1E9; const ll INFLL = 1E18; const int MAX = 6E7; int val[MAX]; int len[MAX]; int group[MAX]; int minimumInstructions(int N, int M, int K, vector<int> C, vector<int> A, vector<vector<int>> B) { if(M > 1) { vector<int> bv(N + 1); vector<int> cnt(K); int unique = 0; for(int i = 0; i < M; i++) { if(!cnt[C[i]]) { unique++; } cnt[C[i]]++; } if(unique * 632 < M) { return -1; } else { bv[0]++; bv[M]--; } for(int i = 0; i + M < N; i++) { if(cnt[C[i]] == 1) { unique--; } cnt[C[i]]--; if(!cnt[C[i + M]]) { unique++; } if(unique * 632 >= M) { bv[i + 1]++; bv[i + M + 1]--; } } for(int i = 1; i < N; i++) { bv[i] += bv[i - 1]; if(!bv[i]) { return -1; } } } vector<basic_string<int>> kc(K); for(int i = 0; i < M; i++) { for(int j : B[i]) { kc[j].push_back(i); } } vector<basic_string<int>> a(N); int curr = 0; vector<basic_string<int>> pos(M); for(int i = 0; i < N; i++) { a[i] = kc[C[i]]; for(int j = 0; j < a[i].size(); j++) { val[curr] = a[i][j]; pos[a[i][j]].push_back(curr); a[i][j] = curr; group[curr] = i; curr++; } } vector<int> ind(M); for(int i = 0; i + 1 < N; i++) { for(int j : a[i]) { ind[val[j]]++; } for(int j = 0; j < a[i].size(); j++) { int v = val[a[i][j]]; if(ind[(v + 1) % M] < pos[(v + 1) % M].size() && group[pos[(v + 1) % M][ind[(v + 1) % M]]] == i + 1) { len[pos[(v + 1) % M][ind[(v + 1) % M]]] = len[a[i][j]] + 1; } } } int currR = -1; int maxR = -1; bool ok = true; int ans = 0; for(int i = 0; i + M - 1 < N; i++) { if(currR + 1 < i) { ok = false; break; } for(int j : a[i + M - 1]) { if(len[j] >= M - 1) { maxR = max(maxR, i + M - 1); } } if(currR < i) { ans++; currR = maxR; } } if(maxR != N - 1) { ok = false; } if(currR + 1 < N) { ans++; } return (ok ? ans : -1); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2396 KB | Output is correct |
2 | Correct | 1 ms | 2396 KB | Output is correct |
3 | Correct | 1 ms | 2396 KB | Output is correct |
4 | Correct | 1 ms | 2396 KB | Output is correct |
5 | Correct | 2 ms | 2396 KB | Output is correct |
6 | Correct | 1 ms | 2804 KB | Output is correct |
7 | Correct | 1 ms | 2396 KB | Output is correct |
8 | Correct | 1 ms | 2396 KB | Output is correct |
9 | Correct | 1 ms | 2652 KB | Output is correct |
10 | Correct | 1 ms | 2396 KB | Output is correct |
11 | Correct | 1 ms | 2392 KB | Output is correct |
12 | Correct | 1 ms | 2392 KB | Output is correct |
13 | Correct | 2 ms | 5588 KB | Output is correct |
14 | Correct | 2 ms | 5588 KB | Output is correct |
15 | Correct | 2 ms | 5588 KB | Output is correct |
16 | Correct | 2 ms | 5692 KB | Output is correct |
17 | Correct | 2 ms | 5588 KB | Output is correct |
18 | Correct | 2 ms | 5588 KB | Output is correct |
19 | Correct | 2 ms | 5588 KB | Output is correct |
20 | Correct | 1 ms | 5588 KB | Output is correct |
21 | Correct | 2 ms | 5688 KB | Output is correct |
22 | Correct | 10 ms | 6868 KB | Output is correct |
23 | Correct | 10 ms | 6988 KB | Output is correct |
24 | Correct | 10 ms | 6836 KB | Output is correct |
25 | Correct | 3 ms | 3420 KB | Output is correct |
26 | Correct | 2 ms | 3420 KB | Output is correct |
27 | Correct | 3 ms | 3420 KB | Output is correct |
28 | Correct | 3 ms | 3420 KB | Output is correct |
29 | Correct | 3 ms | 3420 KB | Output is correct |
30 | Correct | 3 ms | 3632 KB | Output is correct |
31 | Correct | 6 ms | 7156 KB | Output is correct |
32 | Correct | 6 ms | 7124 KB | Output is correct |
33 | Correct | 6 ms | 7124 KB | Output is correct |
34 | Correct | 6 ms | 7124 KB | Output is correct |
35 | Correct | 6 ms | 7124 KB | Output is correct |
36 | Correct | 6 ms | 7124 KB | Output is correct |
37 | Correct | 12 ms | 8404 KB | Output is correct |
38 | Correct | 12 ms | 8204 KB | Output is correct |
39 | Correct | 12 ms | 8220 KB | Output is correct |
40 | Correct | 10 ms | 9304 KB | Output is correct |
41 | Correct | 7 ms | 7508 KB | Output is correct |
42 | Correct | 12 ms | 9684 KB | Output is correct |
43 | Correct | 8 ms | 8024 KB | Output is correct |
44 | Correct | 7 ms | 7792 KB | Output is correct |
45 | Correct | 11 ms | 9580 KB | Output is correct |
46 | Correct | 28 ms | 19864 KB | Output is correct |
47 | Correct | 18 ms | 14088 KB | Output is correct |
48 | Correct | 23 ms | 17464 KB | Output is correct |
49 | Correct | 25 ms | 16660 KB | Output is correct |
50 | Correct | 26 ms | 16628 KB | Output is correct |
51 | Correct | 22 ms | 14112 KB | Output is correct |
52 | Correct | 10 ms | 9684 KB | Output is correct |
53 | Correct | 10 ms | 9744 KB | Output is correct |
54 | Correct | 13 ms | 10228 KB | Output is correct |
55 | Correct | 11 ms | 9684 KB | Output is correct |
56 | Correct | 11 ms | 9940 KB | Output is correct |
57 | Correct | 11 ms | 9684 KB | Output is correct |
58 | Correct | 31 ms | 20812 KB | Output is correct |
59 | Correct | 30 ms | 20800 KB | Output is correct |
60 | Correct | 31 ms | 20804 KB | Output is correct |
61 | Correct | 33 ms | 21068 KB | Output is correct |
62 | Correct | 32 ms | 20812 KB | Output is correct |
63 | Correct | 35 ms | 20800 KB | Output is correct |
64 | Correct | 33 ms | 20032 KB | Output is correct |
65 | Correct | 33 ms | 20016 KB | Output is correct |
66 | Correct | 32 ms | 20032 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2396 KB | Output is correct |
2 | Correct | 1 ms | 2396 KB | Output is correct |
3 | Correct | 1 ms | 2396 KB | Output is correct |
4 | Correct | 1 ms | 2396 KB | Output is correct |
5 | Correct | 2 ms | 2396 KB | Output is correct |
6 | Correct | 1 ms | 2804 KB | Output is correct |
7 | Correct | 1 ms | 2396 KB | Output is correct |
8 | Correct | 1 ms | 2396 KB | Output is correct |
9 | Correct | 1 ms | 2652 KB | Output is correct |
10 | Correct | 1 ms | 2396 KB | Output is correct |
11 | Correct | 1 ms | 2392 KB | Output is correct |
12 | Correct | 1 ms | 2392 KB | Output is correct |
13 | Correct | 2 ms | 5588 KB | Output is correct |
14 | Correct | 2 ms | 5588 KB | Output is correct |
15 | Correct | 2 ms | 5588 KB | Output is correct |
16 | Correct | 2 ms | 5692 KB | Output is correct |
17 | Correct | 2 ms | 5588 KB | Output is correct |
18 | Correct | 2 ms | 5588 KB | Output is correct |
19 | Correct | 2 ms | 5588 KB | Output is correct |
20 | Correct | 1 ms | 5588 KB | Output is correct |
21 | Correct | 2 ms | 5688 KB | Output is correct |
22 | Correct | 1 ms | 2396 KB | Output is correct |
23 | Correct | 1 ms | 2396 KB | Output is correct |
24 | Correct | 0 ms | 2396 KB | Output is correct |
25 | Correct | 0 ms | 2396 KB | Output is correct |
26 | Correct | 0 ms | 2396 KB | Output is correct |
27 | Correct | 1 ms | 2396 KB | Output is correct |
28 | Correct | 1 ms | 2652 KB | Output is correct |
29 | Correct | 1 ms | 2396 KB | Output is correct |
30 | Correct | 1 ms | 2392 KB | Output is correct |
31 | Correct | 1 ms | 2492 KB | Output is correct |
32 | Correct | 1 ms | 2396 KB | Output is correct |
33 | Correct | 2 ms | 5132 KB | Output is correct |
34 | Correct | 2 ms | 4444 KB | Output is correct |
35 | Correct | 1 ms | 4052 KB | Output is correct |
36 | Correct | 2 ms | 5596 KB | Output is correct |
37 | Correct | 2 ms | 4900 KB | Output is correct |
38 | Correct | 2 ms | 5124 KB | Output is correct |
39 | Correct | 1 ms | 2392 KB | Output is correct |
40 | Correct | 2 ms | 5168 KB | Output is correct |
41 | Correct | 1 ms | 2396 KB | Output is correct |
42 | Correct | 2 ms | 5352 KB | Output is correct |
43 | Correct | 2 ms | 5364 KB | Output is correct |
44 | Correct | 1 ms | 2396 KB | Output is correct |
45 | Correct | 1 ms | 2652 KB | Output is correct |
46 | Correct | 1 ms | 2652 KB | Output is correct |
47 | Correct | 1 ms | 2648 KB | Output is correct |
48 | Correct | 1 ms | 2652 KB | Output is correct |
49 | Correct | 1 ms | 2652 KB | Output is correct |
50 | Correct | 2 ms | 5588 KB | Output is correct |
51 | Correct | 2 ms | 5584 KB | Output is correct |
52 | Correct | 1 ms | 5588 KB | Output is correct |
53 | Correct | 2 ms | 5688 KB | Output is correct |
54 | Correct | 1 ms | 5588 KB | Output is correct |
55 | Correct | 2 ms | 5588 KB | Output is correct |
56 | Correct | 2 ms | 5688 KB | Output is correct |
57 | Correct | 1 ms | 2396 KB | Output is correct |
58 | Correct | 2 ms | 5588 KB | Output is correct |
59 | Correct | 1 ms | 2392 KB | Output is correct |
60 | Correct | 2 ms | 5588 KB | Output is correct |
61 | Correct | 1 ms | 2396 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2396 KB | Output is correct |
2 | Correct | 1 ms | 2396 KB | Output is correct |
3 | Correct | 1 ms | 2396 KB | Output is correct |
4 | Correct | 1 ms | 2396 KB | Output is correct |
5 | Correct | 1 ms | 2396 KB | Output is correct |
6 | Correct | 1 ms | 2396 KB | Output is correct |
7 | Correct | 2 ms | 2396 KB | Output is correct |
8 | Correct | 1 ms | 2804 KB | Output is correct |
9 | Correct | 1 ms | 2396 KB | Output is correct |
10 | Correct | 1 ms | 2396 KB | Output is correct |
11 | Correct | 1 ms | 2652 KB | Output is correct |
12 | Correct | 1 ms | 2396 KB | Output is correct |
13 | Correct | 1 ms | 2392 KB | Output is correct |
14 | Correct | 1 ms | 2392 KB | Output is correct |
15 | Correct | 2 ms | 5588 KB | Output is correct |
16 | Correct | 2 ms | 5588 KB | Output is correct |
17 | Correct | 2 ms | 5588 KB | Output is correct |
18 | Correct | 2 ms | 5692 KB | Output is correct |
19 | Correct | 2 ms | 5588 KB | Output is correct |
20 | Correct | 2 ms | 5588 KB | Output is correct |
21 | Correct | 2 ms | 5588 KB | Output is correct |
22 | Correct | 1 ms | 5588 KB | Output is correct |
23 | Correct | 2 ms | 5688 KB | Output is correct |
24 | Correct | 10 ms | 6868 KB | Output is correct |
25 | Correct | 10 ms | 6988 KB | Output is correct |
26 | Correct | 10 ms | 6836 KB | Output is correct |
27 | Correct | 0 ms | 2396 KB | Output is correct |
28 | Correct | 0 ms | 2396 KB | Output is correct |
29 | Correct | 0 ms | 2396 KB | Output is correct |
30 | Correct | 1 ms | 2396 KB | Output is correct |
31 | Correct | 1 ms | 2652 KB | Output is correct |
32 | Correct | 1 ms | 2396 KB | Output is correct |
33 | Correct | 1 ms | 2392 KB | Output is correct |
34 | Correct | 1 ms | 2492 KB | Output is correct |
35 | Correct | 1 ms | 2396 KB | Output is correct |
36 | Correct | 2 ms | 5132 KB | Output is correct |
37 | Correct | 2 ms | 4444 KB | Output is correct |
38 | Correct | 1 ms | 4052 KB | Output is correct |
39 | Correct | 2 ms | 5596 KB | Output is correct |
40 | Correct | 2 ms | 4900 KB | Output is correct |
41 | Correct | 2 ms | 5124 KB | Output is correct |
42 | Correct | 1 ms | 2392 KB | Output is correct |
43 | Correct | 2 ms | 5168 KB | Output is correct |
44 | Correct | 1 ms | 2396 KB | Output is correct |
45 | Correct | 2 ms | 5352 KB | Output is correct |
46 | Correct | 2 ms | 5364 KB | Output is correct |
47 | Correct | 1 ms | 2396 KB | Output is correct |
48 | Correct | 1 ms | 2652 KB | Output is correct |
49 | Correct | 1 ms | 2652 KB | Output is correct |
50 | Correct | 1 ms | 2648 KB | Output is correct |
51 | Correct | 1 ms | 2652 KB | Output is correct |
52 | Correct | 1 ms | 2652 KB | Output is correct |
53 | Correct | 2 ms | 5588 KB | Output is correct |
54 | Correct | 2 ms | 5584 KB | Output is correct |
55 | Correct | 1 ms | 5588 KB | Output is correct |
56 | Correct | 2 ms | 5688 KB | Output is correct |
57 | Correct | 1 ms | 5588 KB | Output is correct |
58 | Correct | 2 ms | 5588 KB | Output is correct |
59 | Correct | 2 ms | 5688 KB | Output is correct |
60 | Correct | 1 ms | 2396 KB | Output is correct |
61 | Correct | 2 ms | 5588 KB | Output is correct |
62 | Correct | 1 ms | 2392 KB | Output is correct |
63 | Correct | 2 ms | 5588 KB | Output is correct |
64 | Correct | 1 ms | 2396 KB | Output is correct |
65 | Correct | 2 ms | 5212 KB | Output is correct |
66 | Correct | 1 ms | 2652 KB | Output is correct |
67 | Correct | 2 ms | 5564 KB | Output is correct |
68 | Correct | 1 ms | 3160 KB | Output is correct |
69 | Correct | 2 ms | 5464 KB | Output is correct |
70 | Correct | 3 ms | 5392 KB | Output is correct |
71 | Correct | 3 ms | 5196 KB | Output is correct |
72 | Correct | 3 ms | 4720 KB | Output is correct |
73 | Correct | 2 ms | 4936 KB | Output is correct |
74 | Correct | 3 ms | 5412 KB | Output is correct |
75 | Correct | 3 ms | 5852 KB | Output is correct |
76 | Correct | 11 ms | 6468 KB | Output is correct |
77 | Correct | 11 ms | 6664 KB | Output is correct |
78 | Correct | 13 ms | 7648 KB | Output is correct |
79 | Correct | 3 ms | 5980 KB | Output is correct |
80 | Correct | 3 ms | 5980 KB | Output is correct |
81 | Correct | 3 ms | 5980 KB | Output is correct |
82 | Correct | 2 ms | 5980 KB | Output is correct |
83 | Correct | 2 ms | 5980 KB | Output is correct |
84 | Correct | 3 ms | 6212 KB | Output is correct |
85 | Correct | 3 ms | 6100 KB | Output is correct |
86 | Correct | 4 ms | 6100 KB | Output is correct |
87 | Correct | 3 ms | 6352 KB | Output is correct |
88 | Correct | 4 ms | 6100 KB | Output is correct |
89 | Correct | 3 ms | 6208 KB | Output is correct |
90 | Correct | 14 ms | 8148 KB | Output is correct |
91 | Correct | 14 ms | 8148 KB | Output is correct |
92 | Correct | 14 ms | 8148 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2396 KB | Output is correct |
2 | Correct | 1 ms | 2396 KB | Output is correct |
3 | Correct | 1 ms | 2396 KB | Output is correct |
4 | Correct | 1 ms | 2396 KB | Output is correct |
5 | Correct | 1 ms | 2396 KB | Output is correct |
6 | Correct | 1 ms | 2396 KB | Output is correct |
7 | Correct | 2 ms | 2396 KB | Output is correct |
8 | Correct | 1 ms | 2804 KB | Output is correct |
9 | Correct | 1 ms | 2396 KB | Output is correct |
10 | Correct | 1 ms | 2396 KB | Output is correct |
11 | Correct | 1 ms | 2652 KB | Output is correct |
12 | Correct | 1 ms | 2396 KB | Output is correct |
13 | Correct | 1 ms | 2392 KB | Output is correct |
14 | Correct | 1 ms | 2392 KB | Output is correct |
15 | Correct | 2 ms | 5588 KB | Output is correct |
16 | Correct | 2 ms | 5588 KB | Output is correct |
17 | Correct | 2 ms | 5588 KB | Output is correct |
18 | Correct | 2 ms | 5692 KB | Output is correct |
19 | Correct | 2 ms | 5588 KB | Output is correct |
20 | Correct | 2 ms | 5588 KB | Output is correct |
21 | Correct | 2 ms | 5588 KB | Output is correct |
22 | Correct | 1 ms | 5588 KB | Output is correct |
23 | Correct | 2 ms | 5688 KB | Output is correct |
24 | Correct | 10 ms | 6868 KB | Output is correct |
25 | Correct | 10 ms | 6988 KB | Output is correct |
26 | Correct | 10 ms | 6836 KB | Output is correct |
27 | Correct | 3 ms | 3420 KB | Output is correct |
28 | Correct | 2 ms | 3420 KB | Output is correct |
29 | Correct | 3 ms | 3420 KB | Output is correct |
30 | Correct | 3 ms | 3420 KB | Output is correct |
31 | Correct | 3 ms | 3420 KB | Output is correct |
32 | Correct | 3 ms | 3632 KB | Output is correct |
33 | Correct | 6 ms | 7156 KB | Output is correct |
34 | Correct | 6 ms | 7124 KB | Output is correct |
35 | Correct | 6 ms | 7124 KB | Output is correct |
36 | Correct | 6 ms | 7124 KB | Output is correct |
37 | Correct | 6 ms | 7124 KB | Output is correct |
38 | Correct | 6 ms | 7124 KB | Output is correct |
39 | Correct | 12 ms | 8404 KB | Output is correct |
40 | Correct | 12 ms | 8204 KB | Output is correct |
41 | Correct | 12 ms | 8220 KB | Output is correct |
42 | Correct | 0 ms | 2396 KB | Output is correct |
43 | Correct | 0 ms | 2396 KB | Output is correct |
44 | Correct | 0 ms | 2396 KB | Output is correct |
45 | Correct | 1 ms | 2396 KB | Output is correct |
46 | Correct | 1 ms | 2652 KB | Output is correct |
47 | Correct | 1 ms | 2396 KB | Output is correct |
48 | Correct | 1 ms | 2392 KB | Output is correct |
49 | Correct | 1 ms | 2492 KB | Output is correct |
50 | Correct | 1 ms | 2396 KB | Output is correct |
51 | Correct | 2 ms | 5132 KB | Output is correct |
52 | Correct | 2 ms | 4444 KB | Output is correct |
53 | Correct | 1 ms | 4052 KB | Output is correct |
54 | Correct | 2 ms | 5596 KB | Output is correct |
55 | Correct | 2 ms | 4900 KB | Output is correct |
56 | Correct | 2 ms | 5124 KB | Output is correct |
57 | Correct | 1 ms | 2392 KB | Output is correct |
58 | Correct | 2 ms | 5168 KB | Output is correct |
59 | Correct | 1 ms | 2396 KB | Output is correct |
60 | Correct | 2 ms | 5352 KB | Output is correct |
61 | Correct | 2 ms | 5364 KB | Output is correct |
62 | Correct | 1 ms | 2396 KB | Output is correct |
63 | Correct | 1 ms | 2652 KB | Output is correct |
64 | Correct | 1 ms | 2652 KB | Output is correct |
65 | Correct | 1 ms | 2648 KB | Output is correct |
66 | Correct | 1 ms | 2652 KB | Output is correct |
67 | Correct | 1 ms | 2652 KB | Output is correct |
68 | Correct | 2 ms | 5588 KB | Output is correct |
69 | Correct | 2 ms | 5584 KB | Output is correct |
70 | Correct | 1 ms | 5588 KB | Output is correct |
71 | Correct | 2 ms | 5688 KB | Output is correct |
72 | Correct | 1 ms | 5588 KB | Output is correct |
73 | Correct | 2 ms | 5588 KB | Output is correct |
74 | Correct | 2 ms | 5688 KB | Output is correct |
75 | Correct | 1 ms | 2396 KB | Output is correct |
76 | Correct | 2 ms | 5588 KB | Output is correct |
77 | Correct | 1 ms | 2392 KB | Output is correct |
78 | Correct | 2 ms | 5588 KB | Output is correct |
79 | Correct | 1 ms | 2396 KB | Output is correct |
80 | Correct | 2 ms | 5212 KB | Output is correct |
81 | Correct | 1 ms | 2652 KB | Output is correct |
82 | Correct | 2 ms | 5564 KB | Output is correct |
83 | Correct | 1 ms | 3160 KB | Output is correct |
84 | Correct | 2 ms | 5464 KB | Output is correct |
85 | Correct | 3 ms | 5392 KB | Output is correct |
86 | Correct | 3 ms | 5196 KB | Output is correct |
87 | Correct | 3 ms | 4720 KB | Output is correct |
88 | Correct | 2 ms | 4936 KB | Output is correct |
89 | Correct | 3 ms | 5412 KB | Output is correct |
90 | Correct | 3 ms | 5852 KB | Output is correct |
91 | Correct | 11 ms | 6468 KB | Output is correct |
92 | Correct | 11 ms | 6664 KB | Output is correct |
93 | Correct | 13 ms | 7648 KB | Output is correct |
94 | Correct | 3 ms | 5980 KB | Output is correct |
95 | Correct | 3 ms | 5980 KB | Output is correct |
96 | Correct | 3 ms | 5980 KB | Output is correct |
97 | Correct | 2 ms | 5980 KB | Output is correct |
98 | Correct | 2 ms | 5980 KB | Output is correct |
99 | Correct | 3 ms | 6212 KB | Output is correct |
100 | Correct | 3 ms | 6100 KB | Output is correct |
101 | Correct | 4 ms | 6100 KB | Output is correct |
102 | Correct | 3 ms | 6352 KB | Output is correct |
103 | Correct | 4 ms | 6100 KB | Output is correct |
104 | Correct | 3 ms | 6208 KB | Output is correct |
105 | Correct | 14 ms | 8148 KB | Output is correct |
106 | Correct | 14 ms | 8148 KB | Output is correct |
107 | Correct | 14 ms | 8148 KB | Output is correct |
108 | Correct | 3 ms | 3932 KB | Output is correct |
109 | Correct | 248 ms | 195332 KB | Output is correct |
110 | Correct | 95 ms | 109648 KB | Output is correct |
111 | Correct | 69 ms | 80980 KB | Output is correct |
112 | Correct | 80 ms | 92332 KB | Output is correct |
113 | Correct | 56 ms | 63056 KB | Output is correct |
114 | Correct | 10 ms | 10712 KB | Output is correct |
115 | Correct | 9 ms | 10240 KB | Output is correct |
116 | Correct | 14 ms | 11972 KB | Output is correct |
117 | Correct | 10 ms | 9544 KB | Output is correct |
118 | Correct | 12 ms | 10480 KB | Output is correct |
119 | Correct | 8 ms | 7396 KB | Output is correct |
120 | Correct | 11 ms | 6756 KB | Output is correct |
121 | Correct | 4 ms | 4192 KB | Output is correct |
122 | Correct | 13 ms | 7292 KB | Output is correct |
123 | Correct | 4 ms | 3928 KB | Output is correct |
124 | Correct | 15 ms | 8356 KB | Output is correct |
125 | Correct | 6 ms | 4676 KB | Output is correct |
126 | Correct | 5 ms | 5500 KB | Output is correct |
127 | Correct | 6 ms | 6700 KB | Output is correct |
128 | Correct | 5 ms | 5892 KB | Output is correct |
129 | Correct | 5 ms | 5508 KB | Output is correct |
130 | Correct | 3 ms | 3932 KB | Output is correct |
131 | Correct | 266 ms | 260848 KB | Output is correct |
132 | Correct | 182 ms | 185588 KB | Output is correct |
133 | Correct | 151 ms | 161776 KB | Output is correct |
134 | Correct | 127 ms | 133540 KB | Output is correct |
135 | Correct | 115 ms | 124588 KB | Output is correct |
136 | Correct | 19 ms | 12752 KB | Output is correct |
137 | Correct | 15 ms | 12572 KB | Output is correct |
138 | Correct | 15 ms | 12500 KB | Output is correct |
139 | Correct | 15 ms | 12620 KB | Output is correct |
140 | Correct | 15 ms | 12500 KB | Output is correct |
141 | Correct | 15 ms | 12640 KB | Output is correct |
142 | Correct | 18 ms | 9516 KB | Output is correct |
143 | Correct | 6 ms | 5180 KB | Output is correct |
144 | Correct | 17 ms | 9684 KB | Output is correct |
145 | Correct | 7 ms | 5128 KB | Output is correct |
146 | Correct | 18 ms | 9580 KB | Output is correct |
147 | Correct | 7 ms | 5180 KB | Output is correct |
148 | Correct | 7 ms | 7636 KB | Output is correct |
149 | Correct | 7 ms | 7460 KB | Output is correct |
150 | Correct | 7 ms | 7380 KB | Output is correct |
151 | Correct | 6 ms | 7280 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 2396 KB | Output is correct |
2 | Correct | 1 ms | 2396 KB | Output is correct |
3 | Correct | 1 ms | 2396 KB | Output is correct |
4 | Correct | 1 ms | 2396 KB | Output is correct |
5 | Correct | 1 ms | 2396 KB | Output is correct |
6 | Correct | 1 ms | 2396 KB | Output is correct |
7 | Correct | 2 ms | 2396 KB | Output is correct |
8 | Correct | 1 ms | 2804 KB | Output is correct |
9 | Correct | 1 ms | 2396 KB | Output is correct |
10 | Correct | 1 ms | 2396 KB | Output is correct |
11 | Correct | 1 ms | 2652 KB | Output is correct |
12 | Correct | 1 ms | 2396 KB | Output is correct |
13 | Correct | 1 ms | 2392 KB | Output is correct |
14 | Correct | 1 ms | 2392 KB | Output is correct |
15 | Correct | 2 ms | 5588 KB | Output is correct |
16 | Correct | 2 ms | 5588 KB | Output is correct |
17 | Correct | 2 ms | 5588 KB | Output is correct |
18 | Correct | 2 ms | 5692 KB | Output is correct |
19 | Correct | 2 ms | 5588 KB | Output is correct |
20 | Correct | 2 ms | 5588 KB | Output is correct |
21 | Correct | 2 ms | 5588 KB | Output is correct |
22 | Correct | 1 ms | 5588 KB | Output is correct |
23 | Correct | 2 ms | 5688 KB | Output is correct |
24 | Correct | 10 ms | 6868 KB | Output is correct |
25 | Correct | 10 ms | 6988 KB | Output is correct |
26 | Correct | 10 ms | 6836 KB | Output is correct |
27 | Correct | 3 ms | 3420 KB | Output is correct |
28 | Correct | 2 ms | 3420 KB | Output is correct |
29 | Correct | 3 ms | 3420 KB | Output is correct |
30 | Correct | 3 ms | 3420 KB | Output is correct |
31 | Correct | 3 ms | 3420 KB | Output is correct |
32 | Correct | 3 ms | 3632 KB | Output is correct |
33 | Correct | 6 ms | 7156 KB | Output is correct |
34 | Correct | 6 ms | 7124 KB | Output is correct |
35 | Correct | 6 ms | 7124 KB | Output is correct |
36 | Correct | 6 ms | 7124 KB | Output is correct |
37 | Correct | 6 ms | 7124 KB | Output is correct |
38 | Correct | 6 ms | 7124 KB | Output is correct |
39 | Correct | 12 ms | 8404 KB | Output is correct |
40 | Correct | 12 ms | 8204 KB | Output is correct |
41 | Correct | 12 ms | 8220 KB | Output is correct |
42 | Correct | 10 ms | 9304 KB | Output is correct |
43 | Correct | 7 ms | 7508 KB | Output is correct |
44 | Correct | 12 ms | 9684 KB | Output is correct |
45 | Correct | 8 ms | 8024 KB | Output is correct |
46 | Correct | 7 ms | 7792 KB | Output is correct |
47 | Correct | 11 ms | 9580 KB | Output is correct |
48 | Correct | 28 ms | 19864 KB | Output is correct |
49 | Correct | 18 ms | 14088 KB | Output is correct |
50 | Correct | 23 ms | 17464 KB | Output is correct |
51 | Correct | 25 ms | 16660 KB | Output is correct |
52 | Correct | 26 ms | 16628 KB | Output is correct |
53 | Correct | 22 ms | 14112 KB | Output is correct |
54 | Correct | 10 ms | 9684 KB | Output is correct |
55 | Correct | 10 ms | 9744 KB | Output is correct |
56 | Correct | 13 ms | 10228 KB | Output is correct |
57 | Correct | 11 ms | 9684 KB | Output is correct |
58 | Correct | 11 ms | 9940 KB | Output is correct |
59 | Correct | 11 ms | 9684 KB | Output is correct |
60 | Correct | 31 ms | 20812 KB | Output is correct |
61 | Correct | 30 ms | 20800 KB | Output is correct |
62 | Correct | 31 ms | 20804 KB | Output is correct |
63 | Correct | 33 ms | 21068 KB | Output is correct |
64 | Correct | 32 ms | 20812 KB | Output is correct |
65 | Correct | 35 ms | 20800 KB | Output is correct |
66 | Correct | 33 ms | 20032 KB | Output is correct |
67 | Correct | 33 ms | 20016 KB | Output is correct |
68 | Correct | 32 ms | 20032 KB | Output is correct |
69 | Correct | 0 ms | 2396 KB | Output is correct |
70 | Correct | 0 ms | 2396 KB | Output is correct |
71 | Correct | 0 ms | 2396 KB | Output is correct |
72 | Correct | 1 ms | 2396 KB | Output is correct |
73 | Correct | 1 ms | 2652 KB | Output is correct |
74 | Correct | 1 ms | 2396 KB | Output is correct |
75 | Correct | 1 ms | 2392 KB | Output is correct |
76 | Correct | 1 ms | 2492 KB | Output is correct |
77 | Correct | 1 ms | 2396 KB | Output is correct |
78 | Correct | 2 ms | 5132 KB | Output is correct |
79 | Correct | 2 ms | 4444 KB | Output is correct |
80 | Correct | 1 ms | 4052 KB | Output is correct |
81 | Correct | 2 ms | 5596 KB | Output is correct |
82 | Correct | 2 ms | 4900 KB | Output is correct |
83 | Correct | 2 ms | 5124 KB | Output is correct |
84 | Correct | 1 ms | 2392 KB | Output is correct |
85 | Correct | 2 ms | 5168 KB | Output is correct |
86 | Correct | 1 ms | 2396 KB | Output is correct |
87 | Correct | 2 ms | 5352 KB | Output is correct |
88 | Correct | 2 ms | 5364 KB | Output is correct |
89 | Correct | 1 ms | 2396 KB | Output is correct |
90 | Correct | 1 ms | 2652 KB | Output is correct |
91 | Correct | 1 ms | 2652 KB | Output is correct |
92 | Correct | 1 ms | 2648 KB | Output is correct |
93 | Correct | 1 ms | 2652 KB | Output is correct |
94 | Correct | 1 ms | 2652 KB | Output is correct |
95 | Correct | 2 ms | 5588 KB | Output is correct |
96 | Correct | 2 ms | 5584 KB | Output is correct |
97 | Correct | 1 ms | 5588 KB | Output is correct |
98 | Correct | 2 ms | 5688 KB | Output is correct |
99 | Correct | 1 ms | 5588 KB | Output is correct |
100 | Correct | 2 ms | 5588 KB | Output is correct |
101 | Correct | 2 ms | 5688 KB | Output is correct |
102 | Correct | 1 ms | 2396 KB | Output is correct |
103 | Correct | 2 ms | 5588 KB | Output is correct |
104 | Correct | 1 ms | 2392 KB | Output is correct |
105 | Correct | 2 ms | 5588 KB | Output is correct |
106 | Correct | 1 ms | 2396 KB | Output is correct |
107 | Correct | 2 ms | 5212 KB | Output is correct |
108 | Correct | 1 ms | 2652 KB | Output is correct |
109 | Correct | 2 ms | 5564 KB | Output is correct |
110 | Correct | 1 ms | 3160 KB | Output is correct |
111 | Correct | 2 ms | 5464 KB | Output is correct |
112 | Correct | 3 ms | 5392 KB | Output is correct |
113 | Correct | 3 ms | 5196 KB | Output is correct |
114 | Correct | 3 ms | 4720 KB | Output is correct |
115 | Correct | 2 ms | 4936 KB | Output is correct |
116 | Correct | 3 ms | 5412 KB | Output is correct |
117 | Correct | 3 ms | 5852 KB | Output is correct |
118 | Correct | 11 ms | 6468 KB | Output is correct |
119 | Correct | 11 ms | 6664 KB | Output is correct |
120 | Correct | 13 ms | 7648 KB | Output is correct |
121 | Correct | 3 ms | 5980 KB | Output is correct |
122 | Correct | 3 ms | 5980 KB | Output is correct |
123 | Correct | 3 ms | 5980 KB | Output is correct |
124 | Correct | 2 ms | 5980 KB | Output is correct |
125 | Correct | 2 ms | 5980 KB | Output is correct |
126 | Correct | 3 ms | 6212 KB | Output is correct |
127 | Correct | 3 ms | 6100 KB | Output is correct |
128 | Correct | 4 ms | 6100 KB | Output is correct |
129 | Correct | 3 ms | 6352 KB | Output is correct |
130 | Correct | 4 ms | 6100 KB | Output is correct |
131 | Correct | 3 ms | 6208 KB | Output is correct |
132 | Correct | 14 ms | 8148 KB | Output is correct |
133 | Correct | 14 ms | 8148 KB | Output is correct |
134 | Correct | 14 ms | 8148 KB | Output is correct |
135 | Correct | 3 ms | 3932 KB | Output is correct |
136 | Correct | 248 ms | 195332 KB | Output is correct |
137 | Correct | 95 ms | 109648 KB | Output is correct |
138 | Correct | 69 ms | 80980 KB | Output is correct |
139 | Correct | 80 ms | 92332 KB | Output is correct |
140 | Correct | 56 ms | 63056 KB | Output is correct |
141 | Correct | 10 ms | 10712 KB | Output is correct |
142 | Correct | 9 ms | 10240 KB | Output is correct |
143 | Correct | 14 ms | 11972 KB | Output is correct |
144 | Correct | 10 ms | 9544 KB | Output is correct |
145 | Correct | 12 ms | 10480 KB | Output is correct |
146 | Correct | 8 ms | 7396 KB | Output is correct |
147 | Correct | 11 ms | 6756 KB | Output is correct |
148 | Correct | 4 ms | 4192 KB | Output is correct |
149 | Correct | 13 ms | 7292 KB | Output is correct |
150 | Correct | 4 ms | 3928 KB | Output is correct |
151 | Correct | 15 ms | 8356 KB | Output is correct |
152 | Correct | 6 ms | 4676 KB | Output is correct |
153 | Correct | 5 ms | 5500 KB | Output is correct |
154 | Correct | 6 ms | 6700 KB | Output is correct |
155 | Correct | 5 ms | 5892 KB | Output is correct |
156 | Correct | 5 ms | 5508 KB | Output is correct |
157 | Correct | 3 ms | 3932 KB | Output is correct |
158 | Correct | 266 ms | 260848 KB | Output is correct |
159 | Correct | 182 ms | 185588 KB | Output is correct |
160 | Correct | 151 ms | 161776 KB | Output is correct |
161 | Correct | 127 ms | 133540 KB | Output is correct |
162 | Correct | 115 ms | 124588 KB | Output is correct |
163 | Correct | 19 ms | 12752 KB | Output is correct |
164 | Correct | 15 ms | 12572 KB | Output is correct |
165 | Correct | 15 ms | 12500 KB | Output is correct |
166 | Correct | 15 ms | 12620 KB | Output is correct |
167 | Correct | 15 ms | 12500 KB | Output is correct |
168 | Correct | 15 ms | 12640 KB | Output is correct |
169 | Correct | 18 ms | 9516 KB | Output is correct |
170 | Correct | 6 ms | 5180 KB | Output is correct |
171 | Correct | 17 ms | 9684 KB | Output is correct |
172 | Correct | 7 ms | 5128 KB | Output is correct |
173 | Correct | 18 ms | 9580 KB | Output is correct |
174 | Correct | 7 ms | 5180 KB | Output is correct |
175 | Correct | 7 ms | 7636 KB | Output is correct |
176 | Correct | 7 ms | 7460 KB | Output is correct |
177 | Correct | 7 ms | 7380 KB | Output is correct |
178 | Correct | 6 ms | 7280 KB | Output is correct |
179 | Correct | 8 ms | 10564 KB | Output is correct |
180 | Runtime error | 598 ms | 524288 KB | Execution killed with signal 9 |
181 | Halted | 0 ms | 0 KB | - |