#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<bool> gd(n);
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++;
}
for (int f = i; f <= j - m; f++) gd[f] = 1;
for (int f: d[x[i]]){
T.upd(f - i + n, -1);
T.upd(f - i + (m + n), -1);
}
i++;
}
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 |
4944 KB |
Output is correct |
2 |
Correct |
2 ms |
4944 KB |
Output is correct |
3 |
Correct |
1 ms |
5052 KB |
Output is correct |
4 |
Correct |
1 ms |
4944 KB |
Output is correct |
5 |
Correct |
1 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 |
4956 KB |
Output is correct |
11 |
Correct |
2 ms |
4944 KB |
Output is correct |
12 |
Correct |
2 ms |
4944 KB |
Output is correct |
13 |
Correct |
3 ms |
7504 KB |
Output is correct |
14 |
Correct |
4 ms |
7504 KB |
Output is correct |
15 |
Correct |
3 ms |
7412 KB |
Output is correct |
16 |
Correct |
4 ms |
7504 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 |
7672 KB |
Output is correct |
20 |
Correct |
4 ms |
7452 KB |
Output is correct |
21 |
Correct |
4 ms |
7436 KB |
Output is correct |
22 |
Correct |
19 ms |
11212 KB |
Output is correct |
23 |
Correct |
18 ms |
11344 KB |
Output is correct |
24 |
Correct |
17 ms |
11344 KB |
Output is correct |
25 |
Correct |
13 ms |
5200 KB |
Output is correct |
26 |
Correct |
14 ms |
5212 KB |
Output is correct |
27 |
Correct |
14 ms |
5200 KB |
Output is correct |
28 |
Correct |
13 ms |
5200 KB |
Output is correct |
29 |
Correct |
14 ms |
5200 KB |
Output is correct |
30 |
Correct |
13 ms |
5200 KB |
Output is correct |
31 |
Correct |
35 ms |
8528 KB |
Output is correct |
32 |
Correct |
39 ms |
8784 KB |
Output is correct |
33 |
Correct |
34 ms |
8528 KB |
Output is correct |
34 |
Correct |
35 ms |
8528 KB |
Output is correct |
35 |
Correct |
37 ms |
8528 KB |
Output is correct |
36 |
Correct |
36 ms |
8696 KB |
Output is correct |
37 |
Correct |
35 ms |
11600 KB |
Output is correct |
38 |
Correct |
33 ms |
11600 KB |
Output is correct |
39 |
Correct |
33 ms |
11600 KB |
Output is correct |
40 |
Correct |
54 ms |
5712 KB |
Output is correct |
41 |
Correct |
35 ms |
5456 KB |
Output is correct |
42 |
Correct |
57 ms |
5712 KB |
Output is correct |
43 |
Correct |
38 ms |
5456 KB |
Output is correct |
44 |
Correct |
35 ms |
5456 KB |
Output is correct |
45 |
Correct |
57 ms |
5712 KB |
Output is correct |
46 |
Correct |
518 ms |
16464 KB |
Output is correct |
47 |
Correct |
376 ms |
12112 KB |
Output is correct |
48 |
Correct |
84 ms |
14588 KB |
Output is correct |
49 |
Correct |
78 ms |
14664 KB |
Output is correct |
50 |
Correct |
91 ms |
14408 KB |
Output is correct |
51 |
Correct |
81 ms |
11856 KB |
Output is correct |
52 |
Correct |
60 ms |
5712 KB |
Output is correct |
53 |
Correct |
59 ms |
5712 KB |
Output is correct |
54 |
Correct |
58 ms |
5712 KB |
Output is correct |
55 |
Correct |
57 ms |
5712 KB |
Output is correct |
56 |
Correct |
57 ms |
5712 KB |
Output is correct |
57 |
Correct |
58 ms |
5712 KB |
Output is correct |
58 |
Correct |
750 ms |
17232 KB |
Output is correct |
59 |
Correct |
1244 ms |
17232 KB |
Output is correct |
60 |
Correct |
1002 ms |
17232 KB |
Output is correct |
61 |
Correct |
1094 ms |
17232 KB |
Output is correct |
62 |
Correct |
787 ms |
17992 KB |
Output is correct |
63 |
Correct |
1429 ms |
17232 KB |
Output is correct |
64 |
Correct |
124 ms |
17224 KB |
Output is correct |
65 |
Correct |
129 ms |
16456 KB |
Output is correct |
66 |
Correct |
123 ms |
17232 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4944 KB |
Output is correct |
2 |
Correct |
2 ms |
4944 KB |
Output is correct |
3 |
Correct |
1 ms |
5052 KB |
Output is correct |
4 |
Correct |
1 ms |
4944 KB |
Output is correct |
5 |
Correct |
1 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 |
4956 KB |
Output is correct |
11 |
Correct |
2 ms |
4944 KB |
Output is correct |
12 |
Correct |
2 ms |
4944 KB |
Output is correct |
13 |
Correct |
3 ms |
7504 KB |
Output is correct |
14 |
Correct |
4 ms |
7504 KB |
Output is correct |
15 |
Correct |
3 ms |
7412 KB |
Output is correct |
16 |
Correct |
4 ms |
7504 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 |
7672 KB |
Output is correct |
20 |
Correct |
4 ms |
7452 KB |
Output is correct |
21 |
Correct |
4 ms |
7436 KB |
Output is correct |
22 |
Correct |
2 ms |
4944 KB |
Output is correct |
23 |
Correct |
2 ms |
4944 KB |
Output is correct |
24 |
Correct |
1 ms |
4944 KB |
Output is correct |
25 |
Correct |
2 ms |
5112 KB |
Output is correct |
26 |
Correct |
2 ms |
5116 KB |
Output is correct |
27 |
Correct |
2 ms |
5196 KB |
Output is correct |
28 |
Correct |
5 ms |
4944 KB |
Output is correct |
29 |
Correct |
3 ms |
4944 KB |
Output is correct |
30 |
Correct |
3 ms |
4944 KB |
Output is correct |
31 |
Correct |
3 ms |
4944 KB |
Output is correct |
32 |
Correct |
4 ms |
4944 KB |
Output is correct |
33 |
Correct |
3 ms |
7032 KB |
Output is correct |
34 |
Correct |
3 ms |
6648 KB |
Output is correct |
35 |
Correct |
3 ms |
6224 KB |
Output is correct |
36 |
Correct |
4 ms |
7248 KB |
Output is correct |
37 |
Correct |
3 ms |
6992 KB |
Output is correct |
38 |
Correct |
3 ms |
6992 KB |
Output is correct |
39 |
Correct |
2 ms |
5132 KB |
Output is correct |
40 |
Correct |
4 ms |
6736 KB |
Output is correct |
41 |
Correct |
2 ms |
4944 KB |
Output is correct |
42 |
Correct |
5 ms |
7248 KB |
Output is correct |
43 |
Correct |
4 ms |
7248 KB |
Output is correct |
44 |
Correct |
2 ms |
4944 KB |
Output is correct |
45 |
Correct |
7 ms |
5112 KB |
Output is correct |
46 |
Correct |
6 ms |
4944 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 |
4944 KB |
Output is correct |
50 |
Correct |
3 ms |
7504 KB |
Output is correct |
51 |
Correct |
4 ms |
7504 KB |
Output is correct |
52 |
Correct |
5 ms |
7504 KB |
Output is correct |
53 |
Correct |
4 ms |
7672 KB |
Output is correct |
54 |
Correct |
4 ms |
7504 KB |
Output is correct |
55 |
Correct |
4 ms |
7504 KB |
Output is correct |
56 |
Correct |
3 ms |
7504 KB |
Output is correct |
57 |
Correct |
2 ms |
4944 KB |
Output is correct |
58 |
Correct |
4 ms |
7352 KB |
Output is correct |
59 |
Correct |
2 ms |
4944 KB |
Output is correct |
60 |
Correct |
3 ms |
7504 KB |
Output is correct |
61 |
Correct |
2 ms |
4944 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
4944 KB |
Output is correct |
2 |
Correct |
2 ms |
4944 KB |
Output is correct |
3 |
Correct |
1 ms |
4944 KB |
Output is correct |
4 |
Correct |
2 ms |
4944 KB |
Output is correct |
5 |
Correct |
1 ms |
5052 KB |
Output is correct |
6 |
Correct |
1 ms |
4944 KB |
Output is correct |
7 |
Correct |
1 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 |
4956 KB |
Output is correct |
13 |
Correct |
2 ms |
4944 KB |
Output is correct |
14 |
Correct |
2 ms |
4944 KB |
Output is correct |
15 |
Correct |
3 ms |
7504 KB |
Output is correct |
16 |
Correct |
4 ms |
7504 KB |
Output is correct |
17 |
Correct |
3 ms |
7412 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 |
7504 KB |
Output is correct |
21 |
Correct |
4 ms |
7672 KB |
Output is correct |
22 |
Correct |
4 ms |
7452 KB |
Output is correct |
23 |
Correct |
4 ms |
7436 KB |
Output is correct |
24 |
Correct |
19 ms |
11212 KB |
Output is correct |
25 |
Correct |
18 ms |
11344 KB |
Output is correct |
26 |
Correct |
17 ms |
11344 KB |
Output is correct |
27 |
Correct |
1 ms |
4944 KB |
Output is correct |
28 |
Correct |
2 ms |
5112 KB |
Output is correct |
29 |
Correct |
2 ms |
5116 KB |
Output is correct |
30 |
Correct |
2 ms |
5196 KB |
Output is correct |
31 |
Correct |
5 ms |
4944 KB |
Output is correct |
32 |
Correct |
3 ms |
4944 KB |
Output is correct |
33 |
Correct |
3 ms |
4944 KB |
Output is correct |
34 |
Correct |
3 ms |
4944 KB |
Output is correct |
35 |
Correct |
4 ms |
4944 KB |
Output is correct |
36 |
Correct |
3 ms |
7032 KB |
Output is correct |
37 |
Correct |
3 ms |
6648 KB |
Output is correct |
38 |
Correct |
3 ms |
6224 KB |
Output is correct |
39 |
Correct |
4 ms |
7248 KB |
Output is correct |
40 |
Correct |
3 ms |
6992 KB |
Output is correct |
41 |
Correct |
3 ms |
6992 KB |
Output is correct |
42 |
Correct |
2 ms |
5132 KB |
Output is correct |
43 |
Correct |
4 ms |
6736 KB |
Output is correct |
44 |
Correct |
2 ms |
4944 KB |
Output is correct |
45 |
Correct |
5 ms |
7248 KB |
Output is correct |
46 |
Correct |
4 ms |
7248 KB |
Output is correct |
47 |
Correct |
2 ms |
4944 KB |
Output is correct |
48 |
Correct |
7 ms |
5112 KB |
Output is correct |
49 |
Correct |
6 ms |
4944 KB |
Output is correct |
50 |
Correct |
5 ms |
4944 KB |
Output is correct |
51 |
Correct |
5 ms |
4944 KB |
Output is correct |
52 |
Correct |
5 ms |
4944 KB |
Output is correct |
53 |
Correct |
3 ms |
7504 KB |
Output is correct |
54 |
Correct |
4 ms |
7504 KB |
Output is correct |
55 |
Correct |
5 ms |
7504 KB |
Output is correct |
56 |
Correct |
4 ms |
7672 KB |
Output is correct |
57 |
Correct |
4 ms |
7504 KB |
Output is correct |
58 |
Correct |
4 ms |
7504 KB |
Output is correct |
59 |
Correct |
3 ms |
7504 KB |
Output is correct |
60 |
Correct |
2 ms |
4944 KB |
Output is correct |
61 |
Correct |
4 ms |
7352 KB |
Output is correct |
62 |
Correct |
2 ms |
4944 KB |
Output is correct |
63 |
Correct |
3 ms |
7504 KB |
Output is correct |
64 |
Correct |
2 ms |
4944 KB |
Output is correct |
65 |
Correct |
10 ms |
4944 KB |
Output is correct |
66 |
Correct |
8 ms |
5112 KB |
Output is correct |
67 |
Correct |
17 ms |
4944 KB |
Output is correct |
68 |
Correct |
12 ms |
4944 KB |
Output is correct |
69 |
Correct |
14 ms |
4944 KB |
Output is correct |
70 |
Correct |
6 ms |
7248 KB |
Output is correct |
71 |
Correct |
6 ms |
6736 KB |
Output is correct |
72 |
Correct |
7 ms |
6736 KB |
Output is correct |
73 |
Correct |
5 ms |
6736 KB |
Output is correct |
74 |
Correct |
7 ms |
6992 KB |
Output is correct |
75 |
Correct |
6 ms |
7504 KB |
Output is correct |
76 |
Correct |
16 ms |
9296 KB |
Output is correct |
77 |
Correct |
16 ms |
10232 KB |
Output is correct |
78 |
Correct |
20 ms |
11004 KB |
Output is correct |
79 |
Correct |
21 ms |
4944 KB |
Output is correct |
80 |
Correct |
22 ms |
4944 KB |
Output is correct |
81 |
Correct |
22 ms |
4944 KB |
Output is correct |
82 |
Correct |
21 ms |
4944 KB |
Output is correct |
83 |
Correct |
22 ms |
4944 KB |
Output is correct |
84 |
Correct |
8 ms |
7504 KB |
Output is correct |
85 |
Correct |
8 ms |
7504 KB |
Output is correct |
86 |
Correct |
7 ms |
7504 KB |
Output is correct |
87 |
Correct |
8 ms |
7672 KB |
Output is correct |
88 |
Correct |
8 ms |
7504 KB |
Output is correct |
89 |
Correct |
8 ms |
7504 KB |
Output is correct |
90 |
Correct |
22 ms |
11088 KB |
Output is correct |
91 |
Correct |
21 ms |
11088 KB |
Output is correct |
92 |
Correct |
25 ms |
11088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
4944 KB |
Output is correct |
2 |
Correct |
2 ms |
4944 KB |
Output is correct |
3 |
Correct |
1 ms |
4944 KB |
Output is correct |
4 |
Correct |
2 ms |
4944 KB |
Output is correct |
5 |
Correct |
1 ms |
5052 KB |
Output is correct |
6 |
Correct |
1 ms |
4944 KB |
Output is correct |
7 |
Correct |
1 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 |
4956 KB |
Output is correct |
13 |
Correct |
2 ms |
4944 KB |
Output is correct |
14 |
Correct |
2 ms |
4944 KB |
Output is correct |
15 |
Correct |
3 ms |
7504 KB |
Output is correct |
16 |
Correct |
4 ms |
7504 KB |
Output is correct |
17 |
Correct |
3 ms |
7412 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 |
7504 KB |
Output is correct |
21 |
Correct |
4 ms |
7672 KB |
Output is correct |
22 |
Correct |
4 ms |
7452 KB |
Output is correct |
23 |
Correct |
4 ms |
7436 KB |
Output is correct |
24 |
Correct |
19 ms |
11212 KB |
Output is correct |
25 |
Correct |
18 ms |
11344 KB |
Output is correct |
26 |
Correct |
17 ms |
11344 KB |
Output is correct |
27 |
Correct |
13 ms |
5200 KB |
Output is correct |
28 |
Correct |
14 ms |
5212 KB |
Output is correct |
29 |
Correct |
14 ms |
5200 KB |
Output is correct |
30 |
Correct |
13 ms |
5200 KB |
Output is correct |
31 |
Correct |
14 ms |
5200 KB |
Output is correct |
32 |
Correct |
13 ms |
5200 KB |
Output is correct |
33 |
Correct |
35 ms |
8528 KB |
Output is correct |
34 |
Correct |
39 ms |
8784 KB |
Output is correct |
35 |
Correct |
34 ms |
8528 KB |
Output is correct |
36 |
Correct |
35 ms |
8528 KB |
Output is correct |
37 |
Correct |
37 ms |
8528 KB |
Output is correct |
38 |
Correct |
36 ms |
8696 KB |
Output is correct |
39 |
Correct |
35 ms |
11600 KB |
Output is correct |
40 |
Correct |
33 ms |
11600 KB |
Output is correct |
41 |
Correct |
33 ms |
11600 KB |
Output is correct |
42 |
Correct |
1 ms |
4944 KB |
Output is correct |
43 |
Correct |
2 ms |
5112 KB |
Output is correct |
44 |
Correct |
2 ms |
5116 KB |
Output is correct |
45 |
Correct |
2 ms |
5196 KB |
Output is correct |
46 |
Correct |
5 ms |
4944 KB |
Output is correct |
47 |
Correct |
3 ms |
4944 KB |
Output is correct |
48 |
Correct |
3 ms |
4944 KB |
Output is correct |
49 |
Correct |
3 ms |
4944 KB |
Output is correct |
50 |
Correct |
4 ms |
4944 KB |
Output is correct |
51 |
Correct |
3 ms |
7032 KB |
Output is correct |
52 |
Correct |
3 ms |
6648 KB |
Output is correct |
53 |
Correct |
3 ms |
6224 KB |
Output is correct |
54 |
Correct |
4 ms |
7248 KB |
Output is correct |
55 |
Correct |
3 ms |
6992 KB |
Output is correct |
56 |
Correct |
3 ms |
6992 KB |
Output is correct |
57 |
Correct |
2 ms |
5132 KB |
Output is correct |
58 |
Correct |
4 ms |
6736 KB |
Output is correct |
59 |
Correct |
2 ms |
4944 KB |
Output is correct |
60 |
Correct |
5 ms |
7248 KB |
Output is correct |
61 |
Correct |
4 ms |
7248 KB |
Output is correct |
62 |
Correct |
2 ms |
4944 KB |
Output is correct |
63 |
Correct |
7 ms |
5112 KB |
Output is correct |
64 |
Correct |
6 ms |
4944 KB |
Output is correct |
65 |
Correct |
5 ms |
4944 KB |
Output is correct |
66 |
Correct |
5 ms |
4944 KB |
Output is correct |
67 |
Correct |
5 ms |
4944 KB |
Output is correct |
68 |
Correct |
3 ms |
7504 KB |
Output is correct |
69 |
Correct |
4 ms |
7504 KB |
Output is correct |
70 |
Correct |
5 ms |
7504 KB |
Output is correct |
71 |
Correct |
4 ms |
7672 KB |
Output is correct |
72 |
Correct |
4 ms |
7504 KB |
Output is correct |
73 |
Correct |
4 ms |
7504 KB |
Output is correct |
74 |
Correct |
3 ms |
7504 KB |
Output is correct |
75 |
Correct |
2 ms |
4944 KB |
Output is correct |
76 |
Correct |
4 ms |
7352 KB |
Output is correct |
77 |
Correct |
2 ms |
4944 KB |
Output is correct |
78 |
Correct |
3 ms |
7504 KB |
Output is correct |
79 |
Correct |
2 ms |
4944 KB |
Output is correct |
80 |
Correct |
10 ms |
4944 KB |
Output is correct |
81 |
Correct |
8 ms |
5112 KB |
Output is correct |
82 |
Correct |
17 ms |
4944 KB |
Output is correct |
83 |
Correct |
12 ms |
4944 KB |
Output is correct |
84 |
Correct |
14 ms |
4944 KB |
Output is correct |
85 |
Correct |
6 ms |
7248 KB |
Output is correct |
86 |
Correct |
6 ms |
6736 KB |
Output is correct |
87 |
Correct |
7 ms |
6736 KB |
Output is correct |
88 |
Correct |
5 ms |
6736 KB |
Output is correct |
89 |
Correct |
7 ms |
6992 KB |
Output is correct |
90 |
Correct |
6 ms |
7504 KB |
Output is correct |
91 |
Correct |
16 ms |
9296 KB |
Output is correct |
92 |
Correct |
16 ms |
10232 KB |
Output is correct |
93 |
Correct |
20 ms |
11004 KB |
Output is correct |
94 |
Correct |
21 ms |
4944 KB |
Output is correct |
95 |
Correct |
22 ms |
4944 KB |
Output is correct |
96 |
Correct |
22 ms |
4944 KB |
Output is correct |
97 |
Correct |
21 ms |
4944 KB |
Output is correct |
98 |
Correct |
22 ms |
4944 KB |
Output is correct |
99 |
Correct |
8 ms |
7504 KB |
Output is correct |
100 |
Correct |
8 ms |
7504 KB |
Output is correct |
101 |
Correct |
7 ms |
7504 KB |
Output is correct |
102 |
Correct |
8 ms |
7672 KB |
Output is correct |
103 |
Correct |
8 ms |
7504 KB |
Output is correct |
104 |
Correct |
8 ms |
7504 KB |
Output is correct |
105 |
Correct |
22 ms |
11088 KB |
Output is correct |
106 |
Correct |
21 ms |
11088 KB |
Output is correct |
107 |
Correct |
25 ms |
11088 KB |
Output is correct |
108 |
Correct |
25 ms |
5368 KB |
Output is correct |
109 |
Execution timed out |
1581 ms |
5200 KB |
Time limit exceeded |
110 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
4944 KB |
Output is correct |
2 |
Correct |
2 ms |
4944 KB |
Output is correct |
3 |
Correct |
1 ms |
4944 KB |
Output is correct |
4 |
Correct |
2 ms |
4944 KB |
Output is correct |
5 |
Correct |
1 ms |
5052 KB |
Output is correct |
6 |
Correct |
1 ms |
4944 KB |
Output is correct |
7 |
Correct |
1 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 |
4956 KB |
Output is correct |
13 |
Correct |
2 ms |
4944 KB |
Output is correct |
14 |
Correct |
2 ms |
4944 KB |
Output is correct |
15 |
Correct |
3 ms |
7504 KB |
Output is correct |
16 |
Correct |
4 ms |
7504 KB |
Output is correct |
17 |
Correct |
3 ms |
7412 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 |
7504 KB |
Output is correct |
21 |
Correct |
4 ms |
7672 KB |
Output is correct |
22 |
Correct |
4 ms |
7452 KB |
Output is correct |
23 |
Correct |
4 ms |
7436 KB |
Output is correct |
24 |
Correct |
19 ms |
11212 KB |
Output is correct |
25 |
Correct |
18 ms |
11344 KB |
Output is correct |
26 |
Correct |
17 ms |
11344 KB |
Output is correct |
27 |
Correct |
13 ms |
5200 KB |
Output is correct |
28 |
Correct |
14 ms |
5212 KB |
Output is correct |
29 |
Correct |
14 ms |
5200 KB |
Output is correct |
30 |
Correct |
13 ms |
5200 KB |
Output is correct |
31 |
Correct |
14 ms |
5200 KB |
Output is correct |
32 |
Correct |
13 ms |
5200 KB |
Output is correct |
33 |
Correct |
35 ms |
8528 KB |
Output is correct |
34 |
Correct |
39 ms |
8784 KB |
Output is correct |
35 |
Correct |
34 ms |
8528 KB |
Output is correct |
36 |
Correct |
35 ms |
8528 KB |
Output is correct |
37 |
Correct |
37 ms |
8528 KB |
Output is correct |
38 |
Correct |
36 ms |
8696 KB |
Output is correct |
39 |
Correct |
35 ms |
11600 KB |
Output is correct |
40 |
Correct |
33 ms |
11600 KB |
Output is correct |
41 |
Correct |
33 ms |
11600 KB |
Output is correct |
42 |
Correct |
54 ms |
5712 KB |
Output is correct |
43 |
Correct |
35 ms |
5456 KB |
Output is correct |
44 |
Correct |
57 ms |
5712 KB |
Output is correct |
45 |
Correct |
38 ms |
5456 KB |
Output is correct |
46 |
Correct |
35 ms |
5456 KB |
Output is correct |
47 |
Correct |
57 ms |
5712 KB |
Output is correct |
48 |
Correct |
518 ms |
16464 KB |
Output is correct |
49 |
Correct |
376 ms |
12112 KB |
Output is correct |
50 |
Correct |
84 ms |
14588 KB |
Output is correct |
51 |
Correct |
78 ms |
14664 KB |
Output is correct |
52 |
Correct |
91 ms |
14408 KB |
Output is correct |
53 |
Correct |
81 ms |
11856 KB |
Output is correct |
54 |
Correct |
60 ms |
5712 KB |
Output is correct |
55 |
Correct |
59 ms |
5712 KB |
Output is correct |
56 |
Correct |
58 ms |
5712 KB |
Output is correct |
57 |
Correct |
57 ms |
5712 KB |
Output is correct |
58 |
Correct |
57 ms |
5712 KB |
Output is correct |
59 |
Correct |
58 ms |
5712 KB |
Output is correct |
60 |
Correct |
750 ms |
17232 KB |
Output is correct |
61 |
Correct |
1244 ms |
17232 KB |
Output is correct |
62 |
Correct |
1002 ms |
17232 KB |
Output is correct |
63 |
Correct |
1094 ms |
17232 KB |
Output is correct |
64 |
Correct |
787 ms |
17992 KB |
Output is correct |
65 |
Correct |
1429 ms |
17232 KB |
Output is correct |
66 |
Correct |
124 ms |
17224 KB |
Output is correct |
67 |
Correct |
129 ms |
16456 KB |
Output is correct |
68 |
Correct |
123 ms |
17232 KB |
Output is correct |
69 |
Correct |
1 ms |
4944 KB |
Output is correct |
70 |
Correct |
2 ms |
5112 KB |
Output is correct |
71 |
Correct |
2 ms |
5116 KB |
Output is correct |
72 |
Correct |
2 ms |
5196 KB |
Output is correct |
73 |
Correct |
5 ms |
4944 KB |
Output is correct |
74 |
Correct |
3 ms |
4944 KB |
Output is correct |
75 |
Correct |
3 ms |
4944 KB |
Output is correct |
76 |
Correct |
3 ms |
4944 KB |
Output is correct |
77 |
Correct |
4 ms |
4944 KB |
Output is correct |
78 |
Correct |
3 ms |
7032 KB |
Output is correct |
79 |
Correct |
3 ms |
6648 KB |
Output is correct |
80 |
Correct |
3 ms |
6224 KB |
Output is correct |
81 |
Correct |
4 ms |
7248 KB |
Output is correct |
82 |
Correct |
3 ms |
6992 KB |
Output is correct |
83 |
Correct |
3 ms |
6992 KB |
Output is correct |
84 |
Correct |
2 ms |
5132 KB |
Output is correct |
85 |
Correct |
4 ms |
6736 KB |
Output is correct |
86 |
Correct |
2 ms |
4944 KB |
Output is correct |
87 |
Correct |
5 ms |
7248 KB |
Output is correct |
88 |
Correct |
4 ms |
7248 KB |
Output is correct |
89 |
Correct |
2 ms |
4944 KB |
Output is correct |
90 |
Correct |
7 ms |
5112 KB |
Output is correct |
91 |
Correct |
6 ms |
4944 KB |
Output is correct |
92 |
Correct |
5 ms |
4944 KB |
Output is correct |
93 |
Correct |
5 ms |
4944 KB |
Output is correct |
94 |
Correct |
5 ms |
4944 KB |
Output is correct |
95 |
Correct |
3 ms |
7504 KB |
Output is correct |
96 |
Correct |
4 ms |
7504 KB |
Output is correct |
97 |
Correct |
5 ms |
7504 KB |
Output is correct |
98 |
Correct |
4 ms |
7672 KB |
Output is correct |
99 |
Correct |
4 ms |
7504 KB |
Output is correct |
100 |
Correct |
4 ms |
7504 KB |
Output is correct |
101 |
Correct |
3 ms |
7504 KB |
Output is correct |
102 |
Correct |
2 ms |
4944 KB |
Output is correct |
103 |
Correct |
4 ms |
7352 KB |
Output is correct |
104 |
Correct |
2 ms |
4944 KB |
Output is correct |
105 |
Correct |
3 ms |
7504 KB |
Output is correct |
106 |
Correct |
2 ms |
4944 KB |
Output is correct |
107 |
Correct |
10 ms |
4944 KB |
Output is correct |
108 |
Correct |
8 ms |
5112 KB |
Output is correct |
109 |
Correct |
17 ms |
4944 KB |
Output is correct |
110 |
Correct |
12 ms |
4944 KB |
Output is correct |
111 |
Correct |
14 ms |
4944 KB |
Output is correct |
112 |
Correct |
6 ms |
7248 KB |
Output is correct |
113 |
Correct |
6 ms |
6736 KB |
Output is correct |
114 |
Correct |
7 ms |
6736 KB |
Output is correct |
115 |
Correct |
5 ms |
6736 KB |
Output is correct |
116 |
Correct |
7 ms |
6992 KB |
Output is correct |
117 |
Correct |
6 ms |
7504 KB |
Output is correct |
118 |
Correct |
16 ms |
9296 KB |
Output is correct |
119 |
Correct |
16 ms |
10232 KB |
Output is correct |
120 |
Correct |
20 ms |
11004 KB |
Output is correct |
121 |
Correct |
21 ms |
4944 KB |
Output is correct |
122 |
Correct |
22 ms |
4944 KB |
Output is correct |
123 |
Correct |
22 ms |
4944 KB |
Output is correct |
124 |
Correct |
21 ms |
4944 KB |
Output is correct |
125 |
Correct |
22 ms |
4944 KB |
Output is correct |
126 |
Correct |
8 ms |
7504 KB |
Output is correct |
127 |
Correct |
8 ms |
7504 KB |
Output is correct |
128 |
Correct |
7 ms |
7504 KB |
Output is correct |
129 |
Correct |
8 ms |
7672 KB |
Output is correct |
130 |
Correct |
8 ms |
7504 KB |
Output is correct |
131 |
Correct |
8 ms |
7504 KB |
Output is correct |
132 |
Correct |
22 ms |
11088 KB |
Output is correct |
133 |
Correct |
21 ms |
11088 KB |
Output is correct |
134 |
Correct |
25 ms |
11088 KB |
Output is correct |
135 |
Correct |
25 ms |
5368 KB |
Output is correct |
136 |
Execution timed out |
1581 ms |
5200 KB |
Time limit exceeded |
137 |
Halted |
0 ms |
0 KB |
- |