#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define pb push_back
#define ff first
#define ss second
const int inf = 3e5;
struct ST{
vector<int> t;
int n;
ST(int ns){
n = ns;
t.resize(4 * n);
}
void upd(int v, int tl, int tr, int& p, int& x){
if (tl == tr){
t[v] += x;
return;
}
int tm = (tl + tr) / 2, vv = 2 * v;
if (p <= tm){
upd(vv, tl, tm, p, x);
}
else {
upd(vv + 1, tm + 1, tr, p, x);
}
t[v] = max(t[vv], t[vv + 1]);
}
void upd(int p, int x){
p++;
upd(1, 1, n, p, x);
}
int get(){
return t[1];
}
};
int minimumInstructions(int n, int m, int k, vector<int> x, vector<int> A, vector<vector<int>> B){
vector<int> d[k];
for (int i = 0; i < m; i++){
for (int j: B[i]){
d[j].pb(i);
}
}
vector<int> p(n + 1);
int i = 0, j = 0;
ST T(inf);
while (i < n){
while (j < n){
for (int f: d[x[j]]){
T.upd(f - j + n, 1);
T.upd(f - j + (m + n), 1);
}
if (T.get() != (j - i + 1)){
for (int f: d[x[j]]){
T.upd(f - j + n, -1);
T.upd(f - j + (m + n), -1);
}
break;
}
j++;
}
if (i <= (j - m)){
p[i]++;
p[j - m + 1]--;
}
for (int f: d[x[i]]){
T.upd(f - i + n, -1);
T.upd(f - i + (m + n), -1);
}
i++;
}
vector<bool> gd(n);
int sum = 0;
for (int i = 0; i < n; i++){
sum += p[i];
gd[i] = (sum > 0);
}
int mx = -1, t = -1, out = 0;
for (int i = 0; i < n; i++){
if (gd[i]) t = i;
if (i == (mx + 1)){
if (t == -1) return -1;
mx = t + m - 1;
t = -1;
out++;
}
}
return out;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4948 KB |
Output is correct |
2 |
Correct |
1 ms |
4944 KB |
Output is correct |
3 |
Correct |
1 ms |
4944 KB |
Output is correct |
4 |
Correct |
1 ms |
5112 KB |
Output is correct |
5 |
Correct |
2 ms |
4944 KB |
Output is correct |
6 |
Correct |
2 ms |
4944 KB |
Output is correct |
7 |
Correct |
2 ms |
4944 KB |
Output is correct |
8 |
Correct |
2 ms |
4944 KB |
Output is correct |
9 |
Correct |
2 ms |
4944 KB |
Output is correct |
10 |
Correct |
2 ms |
4944 KB |
Output is correct |
11 |
Correct |
2 ms |
4944 KB |
Output is correct |
12 |
Correct |
2 ms |
5112 KB |
Output is correct |
13 |
Correct |
4 ms |
7336 KB |
Output is correct |
14 |
Correct |
4 ms |
7504 KB |
Output is correct |
15 |
Correct |
4 ms |
7504 KB |
Output is correct |
16 |
Correct |
3 ms |
7672 KB |
Output is correct |
17 |
Correct |
4 ms |
7504 KB |
Output is correct |
18 |
Correct |
4 ms |
7504 KB |
Output is correct |
19 |
Correct |
4 ms |
7504 KB |
Output is correct |
20 |
Correct |
4 ms |
7520 KB |
Output is correct |
21 |
Correct |
4 ms |
7504 KB |
Output is correct |
22 |
Correct |
17 ms |
11752 KB |
Output is correct |
23 |
Correct |
18 ms |
11344 KB |
Output is correct |
24 |
Correct |
19 ms |
11344 KB |
Output is correct |
25 |
Correct |
13 ms |
5200 KB |
Output is correct |
26 |
Correct |
13 ms |
5200 KB |
Output is correct |
27 |
Correct |
13 ms |
5200 KB |
Output is correct |
28 |
Correct |
14 ms |
5200 KB |
Output is correct |
29 |
Correct |
13 ms |
5200 KB |
Output is correct |
30 |
Correct |
14 ms |
5364 KB |
Output is correct |
31 |
Correct |
18 ms |
8752 KB |
Output is correct |
32 |
Correct |
16 ms |
8528 KB |
Output is correct |
33 |
Correct |
15 ms |
8784 KB |
Output is correct |
34 |
Correct |
16 ms |
8528 KB |
Output is correct |
35 |
Correct |
17 ms |
8528 KB |
Output is correct |
36 |
Correct |
16 ms |
8528 KB |
Output is correct |
37 |
Correct |
34 ms |
11768 KB |
Output is correct |
38 |
Correct |
40 ms |
11856 KB |
Output is correct |
39 |
Correct |
37 ms |
11600 KB |
Output is correct |
40 |
Correct |
58 ms |
6392 KB |
Output is correct |
41 |
Correct |
36 ms |
5712 KB |
Output is correct |
42 |
Correct |
56 ms |
6240 KB |
Output is correct |
43 |
Correct |
39 ms |
5712 KB |
Output is correct |
44 |
Correct |
36 ms |
5712 KB |
Output is correct |
45 |
Correct |
66 ms |
6376 KB |
Output is correct |
46 |
Correct |
56 ms |
16740 KB |
Output is correct |
47 |
Correct |
54 ms |
12396 KB |
Output is correct |
48 |
Correct |
55 ms |
15440 KB |
Output is correct |
49 |
Correct |
86 ms |
15688 KB |
Output is correct |
50 |
Correct |
94 ms |
15444 KB |
Output is correct |
51 |
Correct |
87 ms |
12964 KB |
Output is correct |
52 |
Correct |
61 ms |
6224 KB |
Output is correct |
53 |
Correct |
64 ms |
6344 KB |
Output is correct |
54 |
Correct |
72 ms |
6492 KB |
Output is correct |
55 |
Correct |
57 ms |
6480 KB |
Output is correct |
56 |
Correct |
59 ms |
6480 KB |
Output is correct |
57 |
Correct |
60 ms |
6392 KB |
Output is correct |
58 |
Correct |
57 ms |
17648 KB |
Output is correct |
59 |
Correct |
52 ms |
17660 KB |
Output is correct |
60 |
Correct |
68 ms |
17460 KB |
Output is correct |
61 |
Correct |
80 ms |
17492 KB |
Output is correct |
62 |
Correct |
59 ms |
18064 KB |
Output is correct |
63 |
Correct |
67 ms |
18784 KB |
Output is correct |
64 |
Correct |
136 ms |
17856 KB |
Output is correct |
65 |
Correct |
143 ms |
17480 KB |
Output is correct |
66 |
Correct |
141 ms |
17344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4948 KB |
Output is correct |
2 |
Correct |
1 ms |
4944 KB |
Output is correct |
3 |
Correct |
1 ms |
4944 KB |
Output is correct |
4 |
Correct |
1 ms |
5112 KB |
Output is correct |
5 |
Correct |
2 ms |
4944 KB |
Output is correct |
6 |
Correct |
2 ms |
4944 KB |
Output is correct |
7 |
Correct |
2 ms |
4944 KB |
Output is correct |
8 |
Correct |
2 ms |
4944 KB |
Output is correct |
9 |
Correct |
2 ms |
4944 KB |
Output is correct |
10 |
Correct |
2 ms |
4944 KB |
Output is correct |
11 |
Correct |
2 ms |
4944 KB |
Output is correct |
12 |
Correct |
2 ms |
5112 KB |
Output is correct |
13 |
Correct |
4 ms |
7336 KB |
Output is correct |
14 |
Correct |
4 ms |
7504 KB |
Output is correct |
15 |
Correct |
4 ms |
7504 KB |
Output is correct |
16 |
Correct |
3 ms |
7672 KB |
Output is correct |
17 |
Correct |
4 ms |
7504 KB |
Output is correct |
18 |
Correct |
4 ms |
7504 KB |
Output is correct |
19 |
Correct |
4 ms |
7504 KB |
Output is correct |
20 |
Correct |
4 ms |
7520 KB |
Output is correct |
21 |
Correct |
4 ms |
7504 KB |
Output is correct |
22 |
Correct |
3 ms |
4944 KB |
Output is correct |
23 |
Correct |
3 ms |
4944 KB |
Output is correct |
24 |
Correct |
3 ms |
4944 KB |
Output is correct |
25 |
Correct |
3 ms |
4944 KB |
Output is correct |
26 |
Correct |
3 ms |
4944 KB |
Output is correct |
27 |
Correct |
4 ms |
4944 KB |
Output is correct |
28 |
Correct |
6 ms |
5020 KB |
Output is correct |
29 |
Correct |
5 ms |
4944 KB |
Output is correct |
30 |
Correct |
5 ms |
4944 KB |
Output is correct |
31 |
Correct |
5 ms |
5200 KB |
Output is correct |
32 |
Correct |
5 ms |
4944 KB |
Output is correct |
33 |
Correct |
5 ms |
7016 KB |
Output is correct |
34 |
Correct |
5 ms |
6480 KB |
Output is correct |
35 |
Correct |
5 ms |
6224 KB |
Output is correct |
36 |
Correct |
5 ms |
7220 KB |
Output is correct |
37 |
Correct |
5 ms |
6992 KB |
Output is correct |
38 |
Correct |
5 ms |
6992 KB |
Output is correct |
39 |
Correct |
2 ms |
4944 KB |
Output is correct |
40 |
Correct |
4 ms |
6736 KB |
Output is correct |
41 |
Correct |
4 ms |
4944 KB |
Output is correct |
42 |
Correct |
5 ms |
7304 KB |
Output is correct |
43 |
Correct |
5 ms |
7248 KB |
Output is correct |
44 |
Correct |
2 ms |
4944 KB |
Output is correct |
45 |
Correct |
9 ms |
4944 KB |
Output is correct |
46 |
Correct |
8 ms |
4944 KB |
Output is correct |
47 |
Correct |
7 ms |
4956 KB |
Output is correct |
48 |
Correct |
7 ms |
4944 KB |
Output is correct |
49 |
Correct |
6 ms |
4944 KB |
Output is correct |
50 |
Correct |
6 ms |
7504 KB |
Output is correct |
51 |
Correct |
7 ms |
7504 KB |
Output is correct |
52 |
Correct |
6 ms |
7504 KB |
Output is correct |
53 |
Correct |
5 ms |
7304 KB |
Output is correct |
54 |
Correct |
6 ms |
7504 KB |
Output is correct |
55 |
Correct |
5 ms |
7760 KB |
Output is correct |
56 |
Correct |
7 ms |
7668 KB |
Output is correct |
57 |
Correct |
4 ms |
4944 KB |
Output is correct |
58 |
Correct |
4 ms |
7672 KB |
Output is correct |
59 |
Correct |
6 ms |
4944 KB |
Output is correct |
60 |
Correct |
7 ms |
7504 KB |
Output is correct |
61 |
Correct |
4 ms |
5108 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
4944 KB |
Output is correct |
2 |
Correct |
3 ms |
4944 KB |
Output is correct |
3 |
Correct |
1 ms |
4948 KB |
Output is correct |
4 |
Correct |
1 ms |
4944 KB |
Output is correct |
5 |
Correct |
1 ms |
4944 KB |
Output is correct |
6 |
Correct |
1 ms |
5112 KB |
Output is correct |
7 |
Correct |
2 ms |
4944 KB |
Output is correct |
8 |
Correct |
2 ms |
4944 KB |
Output is correct |
9 |
Correct |
2 ms |
4944 KB |
Output is correct |
10 |
Correct |
2 ms |
4944 KB |
Output is correct |
11 |
Correct |
2 ms |
4944 KB |
Output is correct |
12 |
Correct |
2 ms |
4944 KB |
Output is correct |
13 |
Correct |
2 ms |
4944 KB |
Output is correct |
14 |
Correct |
2 ms |
5112 KB |
Output is correct |
15 |
Correct |
4 ms |
7336 KB |
Output is correct |
16 |
Correct |
4 ms |
7504 KB |
Output is correct |
17 |
Correct |
4 ms |
7504 KB |
Output is correct |
18 |
Correct |
3 ms |
7672 KB |
Output is correct |
19 |
Correct |
4 ms |
7504 KB |
Output is correct |
20 |
Correct |
4 ms |
7504 KB |
Output is correct |
21 |
Correct |
4 ms |
7504 KB |
Output is correct |
22 |
Correct |
4 ms |
7520 KB |
Output is correct |
23 |
Correct |
4 ms |
7504 KB |
Output is correct |
24 |
Correct |
17 ms |
11752 KB |
Output is correct |
25 |
Correct |
18 ms |
11344 KB |
Output is correct |
26 |
Correct |
19 ms |
11344 KB |
Output is correct |
27 |
Correct |
3 ms |
4944 KB |
Output is correct |
28 |
Correct |
3 ms |
4944 KB |
Output is correct |
29 |
Correct |
3 ms |
4944 KB |
Output is correct |
30 |
Correct |
4 ms |
4944 KB |
Output is correct |
31 |
Correct |
6 ms |
5020 KB |
Output is correct |
32 |
Correct |
5 ms |
4944 KB |
Output is correct |
33 |
Correct |
5 ms |
4944 KB |
Output is correct |
34 |
Correct |
5 ms |
5200 KB |
Output is correct |
35 |
Correct |
5 ms |
4944 KB |
Output is correct |
36 |
Correct |
5 ms |
7016 KB |
Output is correct |
37 |
Correct |
5 ms |
6480 KB |
Output is correct |
38 |
Correct |
5 ms |
6224 KB |
Output is correct |
39 |
Correct |
5 ms |
7220 KB |
Output is correct |
40 |
Correct |
5 ms |
6992 KB |
Output is correct |
41 |
Correct |
5 ms |
6992 KB |
Output is correct |
42 |
Correct |
2 ms |
4944 KB |
Output is correct |
43 |
Correct |
4 ms |
6736 KB |
Output is correct |
44 |
Correct |
4 ms |
4944 KB |
Output is correct |
45 |
Correct |
5 ms |
7304 KB |
Output is correct |
46 |
Correct |
5 ms |
7248 KB |
Output is correct |
47 |
Correct |
2 ms |
4944 KB |
Output is correct |
48 |
Correct |
9 ms |
4944 KB |
Output is correct |
49 |
Correct |
8 ms |
4944 KB |
Output is correct |
50 |
Correct |
7 ms |
4956 KB |
Output is correct |
51 |
Correct |
7 ms |
4944 KB |
Output is correct |
52 |
Correct |
6 ms |
4944 KB |
Output is correct |
53 |
Correct |
6 ms |
7504 KB |
Output is correct |
54 |
Correct |
7 ms |
7504 KB |
Output is correct |
55 |
Correct |
6 ms |
7504 KB |
Output is correct |
56 |
Correct |
5 ms |
7304 KB |
Output is correct |
57 |
Correct |
6 ms |
7504 KB |
Output is correct |
58 |
Correct |
5 ms |
7760 KB |
Output is correct |
59 |
Correct |
7 ms |
7668 KB |
Output is correct |
60 |
Correct |
4 ms |
4944 KB |
Output is correct |
61 |
Correct |
4 ms |
7672 KB |
Output is correct |
62 |
Correct |
6 ms |
4944 KB |
Output is correct |
63 |
Correct |
7 ms |
7504 KB |
Output is correct |
64 |
Correct |
4 ms |
5108 KB |
Output is correct |
65 |
Correct |
16 ms |
4944 KB |
Output is correct |
66 |
Correct |
7 ms |
4944 KB |
Output is correct |
67 |
Correct |
19 ms |
4944 KB |
Output is correct |
68 |
Correct |
13 ms |
4944 KB |
Output is correct |
69 |
Correct |
17 ms |
4944 KB |
Output is correct |
70 |
Correct |
8 ms |
7248 KB |
Output is correct |
71 |
Correct |
10 ms |
6992 KB |
Output is correct |
72 |
Correct |
8 ms |
6480 KB |
Output is correct |
73 |
Correct |
6 ms |
6736 KB |
Output is correct |
74 |
Correct |
11 ms |
6992 KB |
Output is correct |
75 |
Correct |
8 ms |
7504 KB |
Output is correct |
76 |
Correct |
18 ms |
9324 KB |
Output is correct |
77 |
Correct |
20 ms |
10064 KB |
Output is correct |
78 |
Correct |
25 ms |
11600 KB |
Output is correct |
79 |
Correct |
24 ms |
4944 KB |
Output is correct |
80 |
Correct |
24 ms |
4944 KB |
Output is correct |
81 |
Correct |
25 ms |
4944 KB |
Output is correct |
82 |
Correct |
24 ms |
4944 KB |
Output is correct |
83 |
Correct |
24 ms |
4944 KB |
Output is correct |
84 |
Correct |
11 ms |
7504 KB |
Output is correct |
85 |
Correct |
10 ms |
7504 KB |
Output is correct |
86 |
Correct |
10 ms |
7504 KB |
Output is correct |
87 |
Correct |
11 ms |
7504 KB |
Output is correct |
88 |
Correct |
9 ms |
7756 KB |
Output is correct |
89 |
Correct |
8 ms |
7504 KB |
Output is correct |
90 |
Correct |
23 ms |
11112 KB |
Output is correct |
91 |
Correct |
22 ms |
11088 KB |
Output is correct |
92 |
Correct |
23 ms |
11104 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
4944 KB |
Output is correct |
2 |
Correct |
3 ms |
4944 KB |
Output is correct |
3 |
Correct |
1 ms |
4948 KB |
Output is correct |
4 |
Correct |
1 ms |
4944 KB |
Output is correct |
5 |
Correct |
1 ms |
4944 KB |
Output is correct |
6 |
Correct |
1 ms |
5112 KB |
Output is correct |
7 |
Correct |
2 ms |
4944 KB |
Output is correct |
8 |
Correct |
2 ms |
4944 KB |
Output is correct |
9 |
Correct |
2 ms |
4944 KB |
Output is correct |
10 |
Correct |
2 ms |
4944 KB |
Output is correct |
11 |
Correct |
2 ms |
4944 KB |
Output is correct |
12 |
Correct |
2 ms |
4944 KB |
Output is correct |
13 |
Correct |
2 ms |
4944 KB |
Output is correct |
14 |
Correct |
2 ms |
5112 KB |
Output is correct |
15 |
Correct |
4 ms |
7336 KB |
Output is correct |
16 |
Correct |
4 ms |
7504 KB |
Output is correct |
17 |
Correct |
4 ms |
7504 KB |
Output is correct |
18 |
Correct |
3 ms |
7672 KB |
Output is correct |
19 |
Correct |
4 ms |
7504 KB |
Output is correct |
20 |
Correct |
4 ms |
7504 KB |
Output is correct |
21 |
Correct |
4 ms |
7504 KB |
Output is correct |
22 |
Correct |
4 ms |
7520 KB |
Output is correct |
23 |
Correct |
4 ms |
7504 KB |
Output is correct |
24 |
Correct |
17 ms |
11752 KB |
Output is correct |
25 |
Correct |
18 ms |
11344 KB |
Output is correct |
26 |
Correct |
19 ms |
11344 KB |
Output is correct |
27 |
Correct |
13 ms |
5200 KB |
Output is correct |
28 |
Correct |
13 ms |
5200 KB |
Output is correct |
29 |
Correct |
13 ms |
5200 KB |
Output is correct |
30 |
Correct |
14 ms |
5200 KB |
Output is correct |
31 |
Correct |
13 ms |
5200 KB |
Output is correct |
32 |
Correct |
14 ms |
5364 KB |
Output is correct |
33 |
Correct |
18 ms |
8752 KB |
Output is correct |
34 |
Correct |
16 ms |
8528 KB |
Output is correct |
35 |
Correct |
15 ms |
8784 KB |
Output is correct |
36 |
Correct |
16 ms |
8528 KB |
Output is correct |
37 |
Correct |
17 ms |
8528 KB |
Output is correct |
38 |
Correct |
16 ms |
8528 KB |
Output is correct |
39 |
Correct |
34 ms |
11768 KB |
Output is correct |
40 |
Correct |
40 ms |
11856 KB |
Output is correct |
41 |
Correct |
37 ms |
11600 KB |
Output is correct |
42 |
Correct |
3 ms |
4944 KB |
Output is correct |
43 |
Correct |
3 ms |
4944 KB |
Output is correct |
44 |
Correct |
3 ms |
4944 KB |
Output is correct |
45 |
Correct |
4 ms |
4944 KB |
Output is correct |
46 |
Correct |
6 ms |
5020 KB |
Output is correct |
47 |
Correct |
5 ms |
4944 KB |
Output is correct |
48 |
Correct |
5 ms |
4944 KB |
Output is correct |
49 |
Correct |
5 ms |
5200 KB |
Output is correct |
50 |
Correct |
5 ms |
4944 KB |
Output is correct |
51 |
Correct |
5 ms |
7016 KB |
Output is correct |
52 |
Correct |
5 ms |
6480 KB |
Output is correct |
53 |
Correct |
5 ms |
6224 KB |
Output is correct |
54 |
Correct |
5 ms |
7220 KB |
Output is correct |
55 |
Correct |
5 ms |
6992 KB |
Output is correct |
56 |
Correct |
5 ms |
6992 KB |
Output is correct |
57 |
Correct |
2 ms |
4944 KB |
Output is correct |
58 |
Correct |
4 ms |
6736 KB |
Output is correct |
59 |
Correct |
4 ms |
4944 KB |
Output is correct |
60 |
Correct |
5 ms |
7304 KB |
Output is correct |
61 |
Correct |
5 ms |
7248 KB |
Output is correct |
62 |
Correct |
2 ms |
4944 KB |
Output is correct |
63 |
Correct |
9 ms |
4944 KB |
Output is correct |
64 |
Correct |
8 ms |
4944 KB |
Output is correct |
65 |
Correct |
7 ms |
4956 KB |
Output is correct |
66 |
Correct |
7 ms |
4944 KB |
Output is correct |
67 |
Correct |
6 ms |
4944 KB |
Output is correct |
68 |
Correct |
6 ms |
7504 KB |
Output is correct |
69 |
Correct |
7 ms |
7504 KB |
Output is correct |
70 |
Correct |
6 ms |
7504 KB |
Output is correct |
71 |
Correct |
5 ms |
7304 KB |
Output is correct |
72 |
Correct |
6 ms |
7504 KB |
Output is correct |
73 |
Correct |
5 ms |
7760 KB |
Output is correct |
74 |
Correct |
7 ms |
7668 KB |
Output is correct |
75 |
Correct |
4 ms |
4944 KB |
Output is correct |
76 |
Correct |
4 ms |
7672 KB |
Output is correct |
77 |
Correct |
6 ms |
4944 KB |
Output is correct |
78 |
Correct |
7 ms |
7504 KB |
Output is correct |
79 |
Correct |
4 ms |
5108 KB |
Output is correct |
80 |
Correct |
16 ms |
4944 KB |
Output is correct |
81 |
Correct |
7 ms |
4944 KB |
Output is correct |
82 |
Correct |
19 ms |
4944 KB |
Output is correct |
83 |
Correct |
13 ms |
4944 KB |
Output is correct |
84 |
Correct |
17 ms |
4944 KB |
Output is correct |
85 |
Correct |
8 ms |
7248 KB |
Output is correct |
86 |
Correct |
10 ms |
6992 KB |
Output is correct |
87 |
Correct |
8 ms |
6480 KB |
Output is correct |
88 |
Correct |
6 ms |
6736 KB |
Output is correct |
89 |
Correct |
11 ms |
6992 KB |
Output is correct |
90 |
Correct |
8 ms |
7504 KB |
Output is correct |
91 |
Correct |
18 ms |
9324 KB |
Output is correct |
92 |
Correct |
20 ms |
10064 KB |
Output is correct |
93 |
Correct |
25 ms |
11600 KB |
Output is correct |
94 |
Correct |
24 ms |
4944 KB |
Output is correct |
95 |
Correct |
24 ms |
4944 KB |
Output is correct |
96 |
Correct |
25 ms |
4944 KB |
Output is correct |
97 |
Correct |
24 ms |
4944 KB |
Output is correct |
98 |
Correct |
24 ms |
4944 KB |
Output is correct |
99 |
Correct |
11 ms |
7504 KB |
Output is correct |
100 |
Correct |
10 ms |
7504 KB |
Output is correct |
101 |
Correct |
10 ms |
7504 KB |
Output is correct |
102 |
Correct |
11 ms |
7504 KB |
Output is correct |
103 |
Correct |
9 ms |
7756 KB |
Output is correct |
104 |
Correct |
8 ms |
7504 KB |
Output is correct |
105 |
Correct |
23 ms |
11112 KB |
Output is correct |
106 |
Correct |
22 ms |
11088 KB |
Output is correct |
107 |
Correct |
23 ms |
11104 KB |
Output is correct |
108 |
Correct |
23 ms |
5200 KB |
Output is correct |
109 |
Execution timed out |
1552 ms |
5200 KB |
Time limit exceeded |
110 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
4944 KB |
Output is correct |
2 |
Correct |
3 ms |
4944 KB |
Output is correct |
3 |
Correct |
1 ms |
4948 KB |
Output is correct |
4 |
Correct |
1 ms |
4944 KB |
Output is correct |
5 |
Correct |
1 ms |
4944 KB |
Output is correct |
6 |
Correct |
1 ms |
5112 KB |
Output is correct |
7 |
Correct |
2 ms |
4944 KB |
Output is correct |
8 |
Correct |
2 ms |
4944 KB |
Output is correct |
9 |
Correct |
2 ms |
4944 KB |
Output is correct |
10 |
Correct |
2 ms |
4944 KB |
Output is correct |
11 |
Correct |
2 ms |
4944 KB |
Output is correct |
12 |
Correct |
2 ms |
4944 KB |
Output is correct |
13 |
Correct |
2 ms |
4944 KB |
Output is correct |
14 |
Correct |
2 ms |
5112 KB |
Output is correct |
15 |
Correct |
4 ms |
7336 KB |
Output is correct |
16 |
Correct |
4 ms |
7504 KB |
Output is correct |
17 |
Correct |
4 ms |
7504 KB |
Output is correct |
18 |
Correct |
3 ms |
7672 KB |
Output is correct |
19 |
Correct |
4 ms |
7504 KB |
Output is correct |
20 |
Correct |
4 ms |
7504 KB |
Output is correct |
21 |
Correct |
4 ms |
7504 KB |
Output is correct |
22 |
Correct |
4 ms |
7520 KB |
Output is correct |
23 |
Correct |
4 ms |
7504 KB |
Output is correct |
24 |
Correct |
17 ms |
11752 KB |
Output is correct |
25 |
Correct |
18 ms |
11344 KB |
Output is correct |
26 |
Correct |
19 ms |
11344 KB |
Output is correct |
27 |
Correct |
13 ms |
5200 KB |
Output is correct |
28 |
Correct |
13 ms |
5200 KB |
Output is correct |
29 |
Correct |
13 ms |
5200 KB |
Output is correct |
30 |
Correct |
14 ms |
5200 KB |
Output is correct |
31 |
Correct |
13 ms |
5200 KB |
Output is correct |
32 |
Correct |
14 ms |
5364 KB |
Output is correct |
33 |
Correct |
18 ms |
8752 KB |
Output is correct |
34 |
Correct |
16 ms |
8528 KB |
Output is correct |
35 |
Correct |
15 ms |
8784 KB |
Output is correct |
36 |
Correct |
16 ms |
8528 KB |
Output is correct |
37 |
Correct |
17 ms |
8528 KB |
Output is correct |
38 |
Correct |
16 ms |
8528 KB |
Output is correct |
39 |
Correct |
34 ms |
11768 KB |
Output is correct |
40 |
Correct |
40 ms |
11856 KB |
Output is correct |
41 |
Correct |
37 ms |
11600 KB |
Output is correct |
42 |
Correct |
58 ms |
6392 KB |
Output is correct |
43 |
Correct |
36 ms |
5712 KB |
Output is correct |
44 |
Correct |
56 ms |
6240 KB |
Output is correct |
45 |
Correct |
39 ms |
5712 KB |
Output is correct |
46 |
Correct |
36 ms |
5712 KB |
Output is correct |
47 |
Correct |
66 ms |
6376 KB |
Output is correct |
48 |
Correct |
56 ms |
16740 KB |
Output is correct |
49 |
Correct |
54 ms |
12396 KB |
Output is correct |
50 |
Correct |
55 ms |
15440 KB |
Output is correct |
51 |
Correct |
86 ms |
15688 KB |
Output is correct |
52 |
Correct |
94 ms |
15444 KB |
Output is correct |
53 |
Correct |
87 ms |
12964 KB |
Output is correct |
54 |
Correct |
61 ms |
6224 KB |
Output is correct |
55 |
Correct |
64 ms |
6344 KB |
Output is correct |
56 |
Correct |
72 ms |
6492 KB |
Output is correct |
57 |
Correct |
57 ms |
6480 KB |
Output is correct |
58 |
Correct |
59 ms |
6480 KB |
Output is correct |
59 |
Correct |
60 ms |
6392 KB |
Output is correct |
60 |
Correct |
57 ms |
17648 KB |
Output is correct |
61 |
Correct |
52 ms |
17660 KB |
Output is correct |
62 |
Correct |
68 ms |
17460 KB |
Output is correct |
63 |
Correct |
80 ms |
17492 KB |
Output is correct |
64 |
Correct |
59 ms |
18064 KB |
Output is correct |
65 |
Correct |
67 ms |
18784 KB |
Output is correct |
66 |
Correct |
136 ms |
17856 KB |
Output is correct |
67 |
Correct |
143 ms |
17480 KB |
Output is correct |
68 |
Correct |
141 ms |
17344 KB |
Output is correct |
69 |
Correct |
3 ms |
4944 KB |
Output is correct |
70 |
Correct |
3 ms |
4944 KB |
Output is correct |
71 |
Correct |
3 ms |
4944 KB |
Output is correct |
72 |
Correct |
4 ms |
4944 KB |
Output is correct |
73 |
Correct |
6 ms |
5020 KB |
Output is correct |
74 |
Correct |
5 ms |
4944 KB |
Output is correct |
75 |
Correct |
5 ms |
4944 KB |
Output is correct |
76 |
Correct |
5 ms |
5200 KB |
Output is correct |
77 |
Correct |
5 ms |
4944 KB |
Output is correct |
78 |
Correct |
5 ms |
7016 KB |
Output is correct |
79 |
Correct |
5 ms |
6480 KB |
Output is correct |
80 |
Correct |
5 ms |
6224 KB |
Output is correct |
81 |
Correct |
5 ms |
7220 KB |
Output is correct |
82 |
Correct |
5 ms |
6992 KB |
Output is correct |
83 |
Correct |
5 ms |
6992 KB |
Output is correct |
84 |
Correct |
2 ms |
4944 KB |
Output is correct |
85 |
Correct |
4 ms |
6736 KB |
Output is correct |
86 |
Correct |
4 ms |
4944 KB |
Output is correct |
87 |
Correct |
5 ms |
7304 KB |
Output is correct |
88 |
Correct |
5 ms |
7248 KB |
Output is correct |
89 |
Correct |
2 ms |
4944 KB |
Output is correct |
90 |
Correct |
9 ms |
4944 KB |
Output is correct |
91 |
Correct |
8 ms |
4944 KB |
Output is correct |
92 |
Correct |
7 ms |
4956 KB |
Output is correct |
93 |
Correct |
7 ms |
4944 KB |
Output is correct |
94 |
Correct |
6 ms |
4944 KB |
Output is correct |
95 |
Correct |
6 ms |
7504 KB |
Output is correct |
96 |
Correct |
7 ms |
7504 KB |
Output is correct |
97 |
Correct |
6 ms |
7504 KB |
Output is correct |
98 |
Correct |
5 ms |
7304 KB |
Output is correct |
99 |
Correct |
6 ms |
7504 KB |
Output is correct |
100 |
Correct |
5 ms |
7760 KB |
Output is correct |
101 |
Correct |
7 ms |
7668 KB |
Output is correct |
102 |
Correct |
4 ms |
4944 KB |
Output is correct |
103 |
Correct |
4 ms |
7672 KB |
Output is correct |
104 |
Correct |
6 ms |
4944 KB |
Output is correct |
105 |
Correct |
7 ms |
7504 KB |
Output is correct |
106 |
Correct |
4 ms |
5108 KB |
Output is correct |
107 |
Correct |
16 ms |
4944 KB |
Output is correct |
108 |
Correct |
7 ms |
4944 KB |
Output is correct |
109 |
Correct |
19 ms |
4944 KB |
Output is correct |
110 |
Correct |
13 ms |
4944 KB |
Output is correct |
111 |
Correct |
17 ms |
4944 KB |
Output is correct |
112 |
Correct |
8 ms |
7248 KB |
Output is correct |
113 |
Correct |
10 ms |
6992 KB |
Output is correct |
114 |
Correct |
8 ms |
6480 KB |
Output is correct |
115 |
Correct |
6 ms |
6736 KB |
Output is correct |
116 |
Correct |
11 ms |
6992 KB |
Output is correct |
117 |
Correct |
8 ms |
7504 KB |
Output is correct |
118 |
Correct |
18 ms |
9324 KB |
Output is correct |
119 |
Correct |
20 ms |
10064 KB |
Output is correct |
120 |
Correct |
25 ms |
11600 KB |
Output is correct |
121 |
Correct |
24 ms |
4944 KB |
Output is correct |
122 |
Correct |
24 ms |
4944 KB |
Output is correct |
123 |
Correct |
25 ms |
4944 KB |
Output is correct |
124 |
Correct |
24 ms |
4944 KB |
Output is correct |
125 |
Correct |
24 ms |
4944 KB |
Output is correct |
126 |
Correct |
11 ms |
7504 KB |
Output is correct |
127 |
Correct |
10 ms |
7504 KB |
Output is correct |
128 |
Correct |
10 ms |
7504 KB |
Output is correct |
129 |
Correct |
11 ms |
7504 KB |
Output is correct |
130 |
Correct |
9 ms |
7756 KB |
Output is correct |
131 |
Correct |
8 ms |
7504 KB |
Output is correct |
132 |
Correct |
23 ms |
11112 KB |
Output is correct |
133 |
Correct |
22 ms |
11088 KB |
Output is correct |
134 |
Correct |
23 ms |
11104 KB |
Output is correct |
135 |
Correct |
23 ms |
5200 KB |
Output is correct |
136 |
Execution timed out |
1552 ms |
5200 KB |
Time limit exceeded |
137 |
Halted |
0 ms |
0 KB |
- |