#include "paint.h"
#include <bits/stdc++.h>
using namespace std;
#define OPTM ios_base::sync_with_stdio(0); cin.tie(0);
#define INF int(1e9+7)
#define ln '\n'
#define ll long long
#define ull unsigned long long
#define ui unsigned int
#define us unsigned short
#define FOR(i,s,n) for (int i = s; i < n; i++)
#define FORR(i,n,s) for (int i = n; i > s; i--)
#define FORX(u, arr) for (auto u : arr)
#define PB push_back
#define in(v,x) (v.find(x) != v.end())
#define F first
#define S second
#define PII pair<int, int>
#define PLL pair<ll, ll>
#define UM unordered_map
#define US unordered_set
#define PQ priority_queue
#define ALL(v) v.begin(), v.end()
const ll LLINF = 1e18+1;
const int MAXN = 1e5+1;
int w[MAXN], dp[MAXN];
vector<int> col[MAXN];
bool z[MAXN];
US<int> bruh[MAXN];
int minimumInstructions(
int n, int m, int K, std::vector<int> c,
std::vector<int> a, std::vector<std::vector<int>> b) {
FOR(i,0,m) {
FOR(j,0,a[i]) {
col[b[i][j]].PB(i);
bruh[i].insert(b[i][j]);
}
}
FOR(i,0,m) {
// cout << i << ": ";
FORX(u,col[c[i]]) {
// cout << ((m+u-i)%m) << ' ';
w[(m+u-i)%m]++;
}
// cout << ln;
}
vector<int> v;
FOR(i,0,n) dp[i] = INF;
dp[0] = 0;
int cnt = 0;
FOR(i,0,m) if (w[i] == m) cnt++;
if (cnt > 0) v.PB(0);
// cout << ln;
// cout << 0 << ": ";
// FOR(j,0,m) cout << w[j] << ' ';
// cout << ln;
FOR(i,0,n-m) {
// cout << i+m << ln;
FORX(u,col[c[i+m]]) {
int k = (u-((i)%m)+m)%m;
int diff = 1-bruh[u].count(c[i]);
if (w[k] == m-1 && diff == 1) {
//cout << "+++++ i: " << i << " u: " << u << ln;
cnt++;
}
w[k] += diff;
}
FORX(u,col[c[i]]) {
int k = (u-((i)%m)+m)%m;
int diff = bruh[u].count(c[i+m])-1;
if (w[k] == m && diff == -1) {
//cout << "----- i: " << i << " u: " << u << ln;
cnt--;
}
w[k] += diff;
}
if (cnt > 0) v.PB(i+1);
// cout << i+1 << ": ";
// FOR(j,0,m) cout << w[j] << ' ';
// cout << "cnt: " << cnt;
// cout << ln;
}
int vn = v.size();
if (vn == 0 || v[0] > 0) return -1;
// cout << ln;
// FOR(i,0,vn) cout << v[i] << ' ';
// cout << ln;
int i = 0, res = 1;
while (i < vn) {
int sta = v[i];
if (i == vn-1) break;
if (v[i+1] > sta+m) break;
while (i < vn-1 && v[i+1] <= sta+m) i++;
res++;
}
if (v[i]+m >= n) return res;
return -1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8148 KB |
Output is correct |
2 |
Correct |
5 ms |
8148 KB |
Output is correct |
3 |
Correct |
5 ms |
8020 KB |
Output is correct |
4 |
Correct |
4 ms |
8020 KB |
Output is correct |
5 |
Correct |
5 ms |
8148 KB |
Output is correct |
6 |
Correct |
4 ms |
8020 KB |
Output is correct |
7 |
Correct |
5 ms |
8148 KB |
Output is correct |
8 |
Correct |
4 ms |
8148 KB |
Output is correct |
9 |
Correct |
5 ms |
8148 KB |
Output is correct |
10 |
Correct |
5 ms |
8060 KB |
Output is correct |
11 |
Correct |
4 ms |
8148 KB |
Output is correct |
12 |
Correct |
5 ms |
8148 KB |
Output is correct |
13 |
Correct |
4 ms |
8148 KB |
Output is correct |
14 |
Correct |
4 ms |
8148 KB |
Output is correct |
15 |
Correct |
4 ms |
8148 KB |
Output is correct |
16 |
Correct |
5 ms |
8148 KB |
Output is correct |
17 |
Correct |
5 ms |
8148 KB |
Output is correct |
18 |
Correct |
6 ms |
8148 KB |
Output is correct |
19 |
Correct |
5 ms |
8148 KB |
Output is correct |
20 |
Correct |
5 ms |
8148 KB |
Output is correct |
21 |
Correct |
6 ms |
8148 KB |
Output is correct |
22 |
Correct |
35 ms |
16044 KB |
Output is correct |
23 |
Correct |
33 ms |
16004 KB |
Output is correct |
24 |
Correct |
30 ms |
15992 KB |
Output is correct |
25 |
Correct |
7 ms |
8532 KB |
Output is correct |
26 |
Correct |
6 ms |
8532 KB |
Output is correct |
27 |
Correct |
8 ms |
8404 KB |
Output is correct |
28 |
Correct |
7 ms |
8404 KB |
Output is correct |
29 |
Correct |
7 ms |
8276 KB |
Output is correct |
30 |
Correct |
7 ms |
8276 KB |
Output is correct |
31 |
Correct |
19 ms |
10264 KB |
Output is correct |
32 |
Correct |
18 ms |
10260 KB |
Output is correct |
33 |
Correct |
16 ms |
10324 KB |
Output is correct |
34 |
Correct |
14 ms |
10328 KB |
Output is correct |
35 |
Correct |
14 ms |
10256 KB |
Output is correct |
36 |
Correct |
14 ms |
10324 KB |
Output is correct |
37 |
Correct |
45 ms |
16532 KB |
Output is correct |
38 |
Correct |
45 ms |
16516 KB |
Output is correct |
39 |
Correct |
47 ms |
16552 KB |
Output is correct |
40 |
Correct |
16 ms |
9896 KB |
Output is correct |
41 |
Correct |
13 ms |
9172 KB |
Output is correct |
42 |
Correct |
17 ms |
9692 KB |
Output is correct |
43 |
Correct |
14 ms |
8916 KB |
Output is correct |
44 |
Correct |
12 ms |
8764 KB |
Output is correct |
45 |
Correct |
16 ms |
9312 KB |
Output is correct |
46 |
Correct |
65 ms |
25916 KB |
Output is correct |
47 |
Correct |
43 ms |
17936 KB |
Output is correct |
48 |
Correct |
51 ms |
22752 KB |
Output is correct |
49 |
Correct |
69 ms |
23080 KB |
Output is correct |
50 |
Correct |
75 ms |
22208 KB |
Output is correct |
51 |
Correct |
65 ms |
17864 KB |
Output is correct |
52 |
Correct |
16 ms |
9960 KB |
Output is correct |
53 |
Correct |
21 ms |
10064 KB |
Output is correct |
54 |
Correct |
17 ms |
9688 KB |
Output is correct |
55 |
Correct |
17 ms |
9436 KB |
Output is correct |
56 |
Correct |
15 ms |
9312 KB |
Output is correct |
57 |
Correct |
15 ms |
9300 KB |
Output is correct |
58 |
Correct |
78 ms |
27236 KB |
Output is correct |
59 |
Correct |
77 ms |
27264 KB |
Output is correct |
60 |
Correct |
95 ms |
27224 KB |
Output is correct |
61 |
Correct |
72 ms |
27212 KB |
Output is correct |
62 |
Correct |
73 ms |
27312 KB |
Output is correct |
63 |
Correct |
77 ms |
27268 KB |
Output is correct |
64 |
Correct |
84 ms |
25556 KB |
Output is correct |
65 |
Correct |
102 ms |
25548 KB |
Output is correct |
66 |
Correct |
94 ms |
25556 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8148 KB |
Output is correct |
2 |
Correct |
5 ms |
8148 KB |
Output is correct |
3 |
Correct |
5 ms |
8020 KB |
Output is correct |
4 |
Correct |
4 ms |
8020 KB |
Output is correct |
5 |
Correct |
5 ms |
8148 KB |
Output is correct |
6 |
Correct |
4 ms |
8020 KB |
Output is correct |
7 |
Correct |
5 ms |
8148 KB |
Output is correct |
8 |
Correct |
4 ms |
8148 KB |
Output is correct |
9 |
Correct |
5 ms |
8148 KB |
Output is correct |
10 |
Correct |
5 ms |
8060 KB |
Output is correct |
11 |
Correct |
4 ms |
8148 KB |
Output is correct |
12 |
Correct |
5 ms |
8148 KB |
Output is correct |
13 |
Correct |
4 ms |
8148 KB |
Output is correct |
14 |
Correct |
4 ms |
8148 KB |
Output is correct |
15 |
Correct |
4 ms |
8148 KB |
Output is correct |
16 |
Correct |
5 ms |
8148 KB |
Output is correct |
17 |
Correct |
5 ms |
8148 KB |
Output is correct |
18 |
Correct |
6 ms |
8148 KB |
Output is correct |
19 |
Correct |
5 ms |
8148 KB |
Output is correct |
20 |
Correct |
5 ms |
8148 KB |
Output is correct |
21 |
Correct |
6 ms |
8148 KB |
Output is correct |
22 |
Correct |
5 ms |
8020 KB |
Output is correct |
23 |
Correct |
5 ms |
8020 KB |
Output is correct |
24 |
Correct |
6 ms |
8020 KB |
Output is correct |
25 |
Correct |
7 ms |
8020 KB |
Output is correct |
26 |
Correct |
4 ms |
8148 KB |
Output is correct |
27 |
Correct |
5 ms |
8020 KB |
Output is correct |
28 |
Correct |
5 ms |
8148 KB |
Output is correct |
29 |
Correct |
5 ms |
8148 KB |
Output is correct |
30 |
Correct |
5 ms |
8148 KB |
Output is correct |
31 |
Correct |
5 ms |
8148 KB |
Output is correct |
32 |
Correct |
6 ms |
8148 KB |
Output is correct |
33 |
Correct |
6 ms |
8148 KB |
Output is correct |
34 |
Correct |
6 ms |
8148 KB |
Output is correct |
35 |
Correct |
6 ms |
8148 KB |
Output is correct |
36 |
Correct |
5 ms |
8148 KB |
Output is correct |
37 |
Correct |
4 ms |
8148 KB |
Output is correct |
38 |
Correct |
5 ms |
8148 KB |
Output is correct |
39 |
Correct |
4 ms |
8148 KB |
Output is correct |
40 |
Correct |
5 ms |
8148 KB |
Output is correct |
41 |
Correct |
5 ms |
8148 KB |
Output is correct |
42 |
Correct |
5 ms |
8148 KB |
Output is correct |
43 |
Correct |
5 ms |
8148 KB |
Output is correct |
44 |
Correct |
5 ms |
8148 KB |
Output is correct |
45 |
Correct |
5 ms |
8096 KB |
Output is correct |
46 |
Correct |
5 ms |
8120 KB |
Output is correct |
47 |
Correct |
5 ms |
8148 KB |
Output is correct |
48 |
Correct |
5 ms |
8148 KB |
Output is correct |
49 |
Correct |
5 ms |
8148 KB |
Output is correct |
50 |
Correct |
5 ms |
8148 KB |
Output is correct |
51 |
Correct |
5 ms |
8148 KB |
Output is correct |
52 |
Correct |
5 ms |
8148 KB |
Output is correct |
53 |
Correct |
5 ms |
8148 KB |
Output is correct |
54 |
Correct |
5 ms |
8148 KB |
Output is correct |
55 |
Correct |
5 ms |
8148 KB |
Output is correct |
56 |
Correct |
5 ms |
8148 KB |
Output is correct |
57 |
Correct |
7 ms |
8132 KB |
Output is correct |
58 |
Correct |
5 ms |
8256 KB |
Output is correct |
59 |
Correct |
5 ms |
8148 KB |
Output is correct |
60 |
Correct |
5 ms |
8172 KB |
Output is correct |
61 |
Correct |
5 ms |
8148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8020 KB |
Output is correct |
2 |
Correct |
5 ms |
8020 KB |
Output is correct |
3 |
Correct |
5 ms |
8148 KB |
Output is correct |
4 |
Correct |
5 ms |
8148 KB |
Output is correct |
5 |
Correct |
5 ms |
8020 KB |
Output is correct |
6 |
Correct |
4 ms |
8020 KB |
Output is correct |
7 |
Correct |
5 ms |
8148 KB |
Output is correct |
8 |
Correct |
4 ms |
8020 KB |
Output is correct |
9 |
Correct |
5 ms |
8148 KB |
Output is correct |
10 |
Correct |
4 ms |
8148 KB |
Output is correct |
11 |
Correct |
5 ms |
8148 KB |
Output is correct |
12 |
Correct |
5 ms |
8060 KB |
Output is correct |
13 |
Correct |
4 ms |
8148 KB |
Output is correct |
14 |
Correct |
5 ms |
8148 KB |
Output is correct |
15 |
Correct |
4 ms |
8148 KB |
Output is correct |
16 |
Correct |
4 ms |
8148 KB |
Output is correct |
17 |
Correct |
4 ms |
8148 KB |
Output is correct |
18 |
Correct |
5 ms |
8148 KB |
Output is correct |
19 |
Correct |
5 ms |
8148 KB |
Output is correct |
20 |
Correct |
6 ms |
8148 KB |
Output is correct |
21 |
Correct |
5 ms |
8148 KB |
Output is correct |
22 |
Correct |
5 ms |
8148 KB |
Output is correct |
23 |
Correct |
6 ms |
8148 KB |
Output is correct |
24 |
Correct |
35 ms |
16044 KB |
Output is correct |
25 |
Correct |
33 ms |
16004 KB |
Output is correct |
26 |
Correct |
30 ms |
15992 KB |
Output is correct |
27 |
Correct |
6 ms |
8020 KB |
Output is correct |
28 |
Correct |
7 ms |
8020 KB |
Output is correct |
29 |
Correct |
4 ms |
8148 KB |
Output is correct |
30 |
Correct |
5 ms |
8020 KB |
Output is correct |
31 |
Correct |
5 ms |
8148 KB |
Output is correct |
32 |
Correct |
5 ms |
8148 KB |
Output is correct |
33 |
Correct |
5 ms |
8148 KB |
Output is correct |
34 |
Correct |
5 ms |
8148 KB |
Output is correct |
35 |
Correct |
6 ms |
8148 KB |
Output is correct |
36 |
Correct |
6 ms |
8148 KB |
Output is correct |
37 |
Correct |
6 ms |
8148 KB |
Output is correct |
38 |
Correct |
6 ms |
8148 KB |
Output is correct |
39 |
Correct |
5 ms |
8148 KB |
Output is correct |
40 |
Correct |
4 ms |
8148 KB |
Output is correct |
41 |
Correct |
5 ms |
8148 KB |
Output is correct |
42 |
Correct |
4 ms |
8148 KB |
Output is correct |
43 |
Correct |
5 ms |
8148 KB |
Output is correct |
44 |
Correct |
5 ms |
8148 KB |
Output is correct |
45 |
Correct |
5 ms |
8148 KB |
Output is correct |
46 |
Correct |
5 ms |
8148 KB |
Output is correct |
47 |
Correct |
5 ms |
8148 KB |
Output is correct |
48 |
Correct |
5 ms |
8096 KB |
Output is correct |
49 |
Correct |
5 ms |
8120 KB |
Output is correct |
50 |
Correct |
5 ms |
8148 KB |
Output is correct |
51 |
Correct |
5 ms |
8148 KB |
Output is correct |
52 |
Correct |
5 ms |
8148 KB |
Output is correct |
53 |
Correct |
5 ms |
8148 KB |
Output is correct |
54 |
Correct |
5 ms |
8148 KB |
Output is correct |
55 |
Correct |
5 ms |
8148 KB |
Output is correct |
56 |
Correct |
5 ms |
8148 KB |
Output is correct |
57 |
Correct |
5 ms |
8148 KB |
Output is correct |
58 |
Correct |
5 ms |
8148 KB |
Output is correct |
59 |
Correct |
5 ms |
8148 KB |
Output is correct |
60 |
Correct |
7 ms |
8132 KB |
Output is correct |
61 |
Correct |
5 ms |
8256 KB |
Output is correct |
62 |
Correct |
5 ms |
8148 KB |
Output is correct |
63 |
Correct |
5 ms |
8172 KB |
Output is correct |
64 |
Correct |
5 ms |
8148 KB |
Output is correct |
65 |
Correct |
6 ms |
8148 KB |
Output is correct |
66 |
Correct |
5 ms |
8080 KB |
Output is correct |
67 |
Correct |
6 ms |
8148 KB |
Output is correct |
68 |
Correct |
6 ms |
8148 KB |
Output is correct |
69 |
Correct |
5 ms |
8148 KB |
Output is correct |
70 |
Correct |
9 ms |
8676 KB |
Output is correct |
71 |
Correct |
10 ms |
8788 KB |
Output is correct |
72 |
Correct |
8 ms |
8788 KB |
Output is correct |
73 |
Correct |
6 ms |
8404 KB |
Output is correct |
74 |
Correct |
7 ms |
8660 KB |
Output is correct |
75 |
Correct |
6 ms |
8532 KB |
Output is correct |
76 |
Correct |
49 ms |
15180 KB |
Output is correct |
77 |
Correct |
45 ms |
15956 KB |
Output is correct |
78 |
Correct |
49 ms |
17364 KB |
Output is correct |
79 |
Correct |
6 ms |
8200 KB |
Output is correct |
80 |
Correct |
6 ms |
8148 KB |
Output is correct |
81 |
Correct |
6 ms |
8148 KB |
Output is correct |
82 |
Correct |
7 ms |
8216 KB |
Output is correct |
83 |
Correct |
8 ms |
8212 KB |
Output is correct |
84 |
Correct |
8 ms |
8916 KB |
Output is correct |
85 |
Correct |
9 ms |
8996 KB |
Output is correct |
86 |
Correct |
10 ms |
8916 KB |
Output is correct |
87 |
Correct |
9 ms |
8952 KB |
Output is correct |
88 |
Correct |
8 ms |
8944 KB |
Output is correct |
89 |
Correct |
8 ms |
8916 KB |
Output is correct |
90 |
Correct |
75 ms |
18456 KB |
Output is correct |
91 |
Correct |
58 ms |
18492 KB |
Output is correct |
92 |
Correct |
55 ms |
18448 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8020 KB |
Output is correct |
2 |
Correct |
5 ms |
8020 KB |
Output is correct |
3 |
Correct |
5 ms |
8148 KB |
Output is correct |
4 |
Correct |
5 ms |
8148 KB |
Output is correct |
5 |
Correct |
5 ms |
8020 KB |
Output is correct |
6 |
Correct |
4 ms |
8020 KB |
Output is correct |
7 |
Correct |
5 ms |
8148 KB |
Output is correct |
8 |
Correct |
4 ms |
8020 KB |
Output is correct |
9 |
Correct |
5 ms |
8148 KB |
Output is correct |
10 |
Correct |
4 ms |
8148 KB |
Output is correct |
11 |
Correct |
5 ms |
8148 KB |
Output is correct |
12 |
Correct |
5 ms |
8060 KB |
Output is correct |
13 |
Correct |
4 ms |
8148 KB |
Output is correct |
14 |
Correct |
5 ms |
8148 KB |
Output is correct |
15 |
Correct |
4 ms |
8148 KB |
Output is correct |
16 |
Correct |
4 ms |
8148 KB |
Output is correct |
17 |
Correct |
4 ms |
8148 KB |
Output is correct |
18 |
Correct |
5 ms |
8148 KB |
Output is correct |
19 |
Correct |
5 ms |
8148 KB |
Output is correct |
20 |
Correct |
6 ms |
8148 KB |
Output is correct |
21 |
Correct |
5 ms |
8148 KB |
Output is correct |
22 |
Correct |
5 ms |
8148 KB |
Output is correct |
23 |
Correct |
6 ms |
8148 KB |
Output is correct |
24 |
Correct |
35 ms |
16044 KB |
Output is correct |
25 |
Correct |
33 ms |
16004 KB |
Output is correct |
26 |
Correct |
30 ms |
15992 KB |
Output is correct |
27 |
Correct |
7 ms |
8532 KB |
Output is correct |
28 |
Correct |
6 ms |
8532 KB |
Output is correct |
29 |
Correct |
8 ms |
8404 KB |
Output is correct |
30 |
Correct |
7 ms |
8404 KB |
Output is correct |
31 |
Correct |
7 ms |
8276 KB |
Output is correct |
32 |
Correct |
7 ms |
8276 KB |
Output is correct |
33 |
Correct |
19 ms |
10264 KB |
Output is correct |
34 |
Correct |
18 ms |
10260 KB |
Output is correct |
35 |
Correct |
16 ms |
10324 KB |
Output is correct |
36 |
Correct |
14 ms |
10328 KB |
Output is correct |
37 |
Correct |
14 ms |
10256 KB |
Output is correct |
38 |
Correct |
14 ms |
10324 KB |
Output is correct |
39 |
Correct |
45 ms |
16532 KB |
Output is correct |
40 |
Correct |
45 ms |
16516 KB |
Output is correct |
41 |
Correct |
47 ms |
16552 KB |
Output is correct |
42 |
Correct |
6 ms |
8020 KB |
Output is correct |
43 |
Correct |
7 ms |
8020 KB |
Output is correct |
44 |
Correct |
4 ms |
8148 KB |
Output is correct |
45 |
Correct |
5 ms |
8020 KB |
Output is correct |
46 |
Correct |
5 ms |
8148 KB |
Output is correct |
47 |
Correct |
5 ms |
8148 KB |
Output is correct |
48 |
Correct |
5 ms |
8148 KB |
Output is correct |
49 |
Correct |
5 ms |
8148 KB |
Output is correct |
50 |
Correct |
6 ms |
8148 KB |
Output is correct |
51 |
Correct |
6 ms |
8148 KB |
Output is correct |
52 |
Correct |
6 ms |
8148 KB |
Output is correct |
53 |
Correct |
6 ms |
8148 KB |
Output is correct |
54 |
Correct |
5 ms |
8148 KB |
Output is correct |
55 |
Correct |
4 ms |
8148 KB |
Output is correct |
56 |
Correct |
5 ms |
8148 KB |
Output is correct |
57 |
Correct |
4 ms |
8148 KB |
Output is correct |
58 |
Correct |
5 ms |
8148 KB |
Output is correct |
59 |
Correct |
5 ms |
8148 KB |
Output is correct |
60 |
Correct |
5 ms |
8148 KB |
Output is correct |
61 |
Correct |
5 ms |
8148 KB |
Output is correct |
62 |
Correct |
5 ms |
8148 KB |
Output is correct |
63 |
Correct |
5 ms |
8096 KB |
Output is correct |
64 |
Correct |
5 ms |
8120 KB |
Output is correct |
65 |
Correct |
5 ms |
8148 KB |
Output is correct |
66 |
Correct |
5 ms |
8148 KB |
Output is correct |
67 |
Correct |
5 ms |
8148 KB |
Output is correct |
68 |
Correct |
5 ms |
8148 KB |
Output is correct |
69 |
Correct |
5 ms |
8148 KB |
Output is correct |
70 |
Correct |
5 ms |
8148 KB |
Output is correct |
71 |
Correct |
5 ms |
8148 KB |
Output is correct |
72 |
Correct |
5 ms |
8148 KB |
Output is correct |
73 |
Correct |
5 ms |
8148 KB |
Output is correct |
74 |
Correct |
5 ms |
8148 KB |
Output is correct |
75 |
Correct |
7 ms |
8132 KB |
Output is correct |
76 |
Correct |
5 ms |
8256 KB |
Output is correct |
77 |
Correct |
5 ms |
8148 KB |
Output is correct |
78 |
Correct |
5 ms |
8172 KB |
Output is correct |
79 |
Correct |
5 ms |
8148 KB |
Output is correct |
80 |
Correct |
6 ms |
8148 KB |
Output is correct |
81 |
Correct |
5 ms |
8080 KB |
Output is correct |
82 |
Correct |
6 ms |
8148 KB |
Output is correct |
83 |
Correct |
6 ms |
8148 KB |
Output is correct |
84 |
Correct |
5 ms |
8148 KB |
Output is correct |
85 |
Correct |
9 ms |
8676 KB |
Output is correct |
86 |
Correct |
10 ms |
8788 KB |
Output is correct |
87 |
Correct |
8 ms |
8788 KB |
Output is correct |
88 |
Correct |
6 ms |
8404 KB |
Output is correct |
89 |
Correct |
7 ms |
8660 KB |
Output is correct |
90 |
Correct |
6 ms |
8532 KB |
Output is correct |
91 |
Correct |
49 ms |
15180 KB |
Output is correct |
92 |
Correct |
45 ms |
15956 KB |
Output is correct |
93 |
Correct |
49 ms |
17364 KB |
Output is correct |
94 |
Correct |
6 ms |
8200 KB |
Output is correct |
95 |
Correct |
6 ms |
8148 KB |
Output is correct |
96 |
Correct |
6 ms |
8148 KB |
Output is correct |
97 |
Correct |
7 ms |
8216 KB |
Output is correct |
98 |
Correct |
8 ms |
8212 KB |
Output is correct |
99 |
Correct |
8 ms |
8916 KB |
Output is correct |
100 |
Correct |
9 ms |
8996 KB |
Output is correct |
101 |
Correct |
10 ms |
8916 KB |
Output is correct |
102 |
Correct |
9 ms |
8952 KB |
Output is correct |
103 |
Correct |
8 ms |
8944 KB |
Output is correct |
104 |
Correct |
8 ms |
8916 KB |
Output is correct |
105 |
Correct |
75 ms |
18456 KB |
Output is correct |
106 |
Correct |
58 ms |
18492 KB |
Output is correct |
107 |
Correct |
55 ms |
18448 KB |
Output is correct |
108 |
Correct |
7 ms |
8532 KB |
Output is correct |
109 |
Correct |
179 ms |
8780 KB |
Output is correct |
110 |
Correct |
147 ms |
8448 KB |
Output is correct |
111 |
Correct |
116 ms |
8444 KB |
Output is correct |
112 |
Correct |
122 ms |
8484 KB |
Output is correct |
113 |
Correct |
75 ms |
8524 KB |
Output is correct |
114 |
Correct |
24 ms |
11604 KB |
Output is correct |
115 |
Correct |
29 ms |
11788 KB |
Output is correct |
116 |
Correct |
51 ms |
12704 KB |
Output is correct |
117 |
Correct |
29 ms |
11740 KB |
Output is correct |
118 |
Correct |
31 ms |
12224 KB |
Output is correct |
119 |
Correct |
22 ms |
11136 KB |
Output is correct |
120 |
Correct |
33 ms |
14336 KB |
Output is correct |
121 |
Correct |
10 ms |
9428 KB |
Output is correct |
122 |
Correct |
41 ms |
15520 KB |
Output is correct |
123 |
Correct |
10 ms |
9172 KB |
Output is correct |
124 |
Correct |
51 ms |
16632 KB |
Output is correct |
125 |
Correct |
15 ms |
9748 KB |
Output is correct |
126 |
Correct |
14 ms |
9940 KB |
Output is correct |
127 |
Correct |
24 ms |
10420 KB |
Output is correct |
128 |
Correct |
15 ms |
9772 KB |
Output is correct |
129 |
Correct |
14 ms |
9684 KB |
Output is correct |
130 |
Correct |
8 ms |
8532 KB |
Output is correct |
131 |
Correct |
250 ms |
8852 KB |
Output is correct |
132 |
Correct |
228 ms |
8576 KB |
Output is correct |
133 |
Correct |
189 ms |
8532 KB |
Output is correct |
134 |
Correct |
171 ms |
8640 KB |
Output is correct |
135 |
Correct |
152 ms |
8660 KB |
Output is correct |
136 |
Correct |
37 ms |
13376 KB |
Output is correct |
137 |
Correct |
56 ms |
13432 KB |
Output is correct |
138 |
Correct |
45 ms |
13376 KB |
Output is correct |
139 |
Correct |
50 ms |
13404 KB |
Output is correct |
140 |
Correct |
35 ms |
13388 KB |
Output is correct |
141 |
Correct |
36 ms |
13360 KB |
Output is correct |
142 |
Correct |
76 ms |
19072 KB |
Output is correct |
143 |
Correct |
17 ms |
10068 KB |
Output is correct |
144 |
Correct |
73 ms |
19052 KB |
Output is correct |
145 |
Correct |
16 ms |
10128 KB |
Output is correct |
146 |
Correct |
86 ms |
19108 KB |
Output is correct |
147 |
Correct |
15 ms |
10052 KB |
Output is correct |
148 |
Correct |
18 ms |
10832 KB |
Output is correct |
149 |
Correct |
18 ms |
10724 KB |
Output is correct |
150 |
Correct |
19 ms |
10528 KB |
Output is correct |
151 |
Correct |
22 ms |
10428 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8020 KB |
Output is correct |
2 |
Correct |
5 ms |
8020 KB |
Output is correct |
3 |
Correct |
5 ms |
8148 KB |
Output is correct |
4 |
Correct |
5 ms |
8148 KB |
Output is correct |
5 |
Correct |
5 ms |
8020 KB |
Output is correct |
6 |
Correct |
4 ms |
8020 KB |
Output is correct |
7 |
Correct |
5 ms |
8148 KB |
Output is correct |
8 |
Correct |
4 ms |
8020 KB |
Output is correct |
9 |
Correct |
5 ms |
8148 KB |
Output is correct |
10 |
Correct |
4 ms |
8148 KB |
Output is correct |
11 |
Correct |
5 ms |
8148 KB |
Output is correct |
12 |
Correct |
5 ms |
8060 KB |
Output is correct |
13 |
Correct |
4 ms |
8148 KB |
Output is correct |
14 |
Correct |
5 ms |
8148 KB |
Output is correct |
15 |
Correct |
4 ms |
8148 KB |
Output is correct |
16 |
Correct |
4 ms |
8148 KB |
Output is correct |
17 |
Correct |
4 ms |
8148 KB |
Output is correct |
18 |
Correct |
5 ms |
8148 KB |
Output is correct |
19 |
Correct |
5 ms |
8148 KB |
Output is correct |
20 |
Correct |
6 ms |
8148 KB |
Output is correct |
21 |
Correct |
5 ms |
8148 KB |
Output is correct |
22 |
Correct |
5 ms |
8148 KB |
Output is correct |
23 |
Correct |
6 ms |
8148 KB |
Output is correct |
24 |
Correct |
35 ms |
16044 KB |
Output is correct |
25 |
Correct |
33 ms |
16004 KB |
Output is correct |
26 |
Correct |
30 ms |
15992 KB |
Output is correct |
27 |
Correct |
7 ms |
8532 KB |
Output is correct |
28 |
Correct |
6 ms |
8532 KB |
Output is correct |
29 |
Correct |
8 ms |
8404 KB |
Output is correct |
30 |
Correct |
7 ms |
8404 KB |
Output is correct |
31 |
Correct |
7 ms |
8276 KB |
Output is correct |
32 |
Correct |
7 ms |
8276 KB |
Output is correct |
33 |
Correct |
19 ms |
10264 KB |
Output is correct |
34 |
Correct |
18 ms |
10260 KB |
Output is correct |
35 |
Correct |
16 ms |
10324 KB |
Output is correct |
36 |
Correct |
14 ms |
10328 KB |
Output is correct |
37 |
Correct |
14 ms |
10256 KB |
Output is correct |
38 |
Correct |
14 ms |
10324 KB |
Output is correct |
39 |
Correct |
45 ms |
16532 KB |
Output is correct |
40 |
Correct |
45 ms |
16516 KB |
Output is correct |
41 |
Correct |
47 ms |
16552 KB |
Output is correct |
42 |
Correct |
16 ms |
9896 KB |
Output is correct |
43 |
Correct |
13 ms |
9172 KB |
Output is correct |
44 |
Correct |
17 ms |
9692 KB |
Output is correct |
45 |
Correct |
14 ms |
8916 KB |
Output is correct |
46 |
Correct |
12 ms |
8764 KB |
Output is correct |
47 |
Correct |
16 ms |
9312 KB |
Output is correct |
48 |
Correct |
65 ms |
25916 KB |
Output is correct |
49 |
Correct |
43 ms |
17936 KB |
Output is correct |
50 |
Correct |
51 ms |
22752 KB |
Output is correct |
51 |
Correct |
69 ms |
23080 KB |
Output is correct |
52 |
Correct |
75 ms |
22208 KB |
Output is correct |
53 |
Correct |
65 ms |
17864 KB |
Output is correct |
54 |
Correct |
16 ms |
9960 KB |
Output is correct |
55 |
Correct |
21 ms |
10064 KB |
Output is correct |
56 |
Correct |
17 ms |
9688 KB |
Output is correct |
57 |
Correct |
17 ms |
9436 KB |
Output is correct |
58 |
Correct |
15 ms |
9312 KB |
Output is correct |
59 |
Correct |
15 ms |
9300 KB |
Output is correct |
60 |
Correct |
78 ms |
27236 KB |
Output is correct |
61 |
Correct |
77 ms |
27264 KB |
Output is correct |
62 |
Correct |
95 ms |
27224 KB |
Output is correct |
63 |
Correct |
72 ms |
27212 KB |
Output is correct |
64 |
Correct |
73 ms |
27312 KB |
Output is correct |
65 |
Correct |
77 ms |
27268 KB |
Output is correct |
66 |
Correct |
84 ms |
25556 KB |
Output is correct |
67 |
Correct |
102 ms |
25548 KB |
Output is correct |
68 |
Correct |
94 ms |
25556 KB |
Output is correct |
69 |
Correct |
6 ms |
8020 KB |
Output is correct |
70 |
Correct |
7 ms |
8020 KB |
Output is correct |
71 |
Correct |
4 ms |
8148 KB |
Output is correct |
72 |
Correct |
5 ms |
8020 KB |
Output is correct |
73 |
Correct |
5 ms |
8148 KB |
Output is correct |
74 |
Correct |
5 ms |
8148 KB |
Output is correct |
75 |
Correct |
5 ms |
8148 KB |
Output is correct |
76 |
Correct |
5 ms |
8148 KB |
Output is correct |
77 |
Correct |
6 ms |
8148 KB |
Output is correct |
78 |
Correct |
6 ms |
8148 KB |
Output is correct |
79 |
Correct |
6 ms |
8148 KB |
Output is correct |
80 |
Correct |
6 ms |
8148 KB |
Output is correct |
81 |
Correct |
5 ms |
8148 KB |
Output is correct |
82 |
Correct |
4 ms |
8148 KB |
Output is correct |
83 |
Correct |
5 ms |
8148 KB |
Output is correct |
84 |
Correct |
4 ms |
8148 KB |
Output is correct |
85 |
Correct |
5 ms |
8148 KB |
Output is correct |
86 |
Correct |
5 ms |
8148 KB |
Output is correct |
87 |
Correct |
5 ms |
8148 KB |
Output is correct |
88 |
Correct |
5 ms |
8148 KB |
Output is correct |
89 |
Correct |
5 ms |
8148 KB |
Output is correct |
90 |
Correct |
5 ms |
8096 KB |
Output is correct |
91 |
Correct |
5 ms |
8120 KB |
Output is correct |
92 |
Correct |
5 ms |
8148 KB |
Output is correct |
93 |
Correct |
5 ms |
8148 KB |
Output is correct |
94 |
Correct |
5 ms |
8148 KB |
Output is correct |
95 |
Correct |
5 ms |
8148 KB |
Output is correct |
96 |
Correct |
5 ms |
8148 KB |
Output is correct |
97 |
Correct |
5 ms |
8148 KB |
Output is correct |
98 |
Correct |
5 ms |
8148 KB |
Output is correct |
99 |
Correct |
5 ms |
8148 KB |
Output is correct |
100 |
Correct |
5 ms |
8148 KB |
Output is correct |
101 |
Correct |
5 ms |
8148 KB |
Output is correct |
102 |
Correct |
7 ms |
8132 KB |
Output is correct |
103 |
Correct |
5 ms |
8256 KB |
Output is correct |
104 |
Correct |
5 ms |
8148 KB |
Output is correct |
105 |
Correct |
5 ms |
8172 KB |
Output is correct |
106 |
Correct |
5 ms |
8148 KB |
Output is correct |
107 |
Correct |
6 ms |
8148 KB |
Output is correct |
108 |
Correct |
5 ms |
8080 KB |
Output is correct |
109 |
Correct |
6 ms |
8148 KB |
Output is correct |
110 |
Correct |
6 ms |
8148 KB |
Output is correct |
111 |
Correct |
5 ms |
8148 KB |
Output is correct |
112 |
Correct |
9 ms |
8676 KB |
Output is correct |
113 |
Correct |
10 ms |
8788 KB |
Output is correct |
114 |
Correct |
8 ms |
8788 KB |
Output is correct |
115 |
Correct |
6 ms |
8404 KB |
Output is correct |
116 |
Correct |
7 ms |
8660 KB |
Output is correct |
117 |
Correct |
6 ms |
8532 KB |
Output is correct |
118 |
Correct |
49 ms |
15180 KB |
Output is correct |
119 |
Correct |
45 ms |
15956 KB |
Output is correct |
120 |
Correct |
49 ms |
17364 KB |
Output is correct |
121 |
Correct |
6 ms |
8200 KB |
Output is correct |
122 |
Correct |
6 ms |
8148 KB |
Output is correct |
123 |
Correct |
6 ms |
8148 KB |
Output is correct |
124 |
Correct |
7 ms |
8216 KB |
Output is correct |
125 |
Correct |
8 ms |
8212 KB |
Output is correct |
126 |
Correct |
8 ms |
8916 KB |
Output is correct |
127 |
Correct |
9 ms |
8996 KB |
Output is correct |
128 |
Correct |
10 ms |
8916 KB |
Output is correct |
129 |
Correct |
9 ms |
8952 KB |
Output is correct |
130 |
Correct |
8 ms |
8944 KB |
Output is correct |
131 |
Correct |
8 ms |
8916 KB |
Output is correct |
132 |
Correct |
75 ms |
18456 KB |
Output is correct |
133 |
Correct |
58 ms |
18492 KB |
Output is correct |
134 |
Correct |
55 ms |
18448 KB |
Output is correct |
135 |
Correct |
7 ms |
8532 KB |
Output is correct |
136 |
Correct |
179 ms |
8780 KB |
Output is correct |
137 |
Correct |
147 ms |
8448 KB |
Output is correct |
138 |
Correct |
116 ms |
8444 KB |
Output is correct |
139 |
Correct |
122 ms |
8484 KB |
Output is correct |
140 |
Correct |
75 ms |
8524 KB |
Output is correct |
141 |
Correct |
24 ms |
11604 KB |
Output is correct |
142 |
Correct |
29 ms |
11788 KB |
Output is correct |
143 |
Correct |
51 ms |
12704 KB |
Output is correct |
144 |
Correct |
29 ms |
11740 KB |
Output is correct |
145 |
Correct |
31 ms |
12224 KB |
Output is correct |
146 |
Correct |
22 ms |
11136 KB |
Output is correct |
147 |
Correct |
33 ms |
14336 KB |
Output is correct |
148 |
Correct |
10 ms |
9428 KB |
Output is correct |
149 |
Correct |
41 ms |
15520 KB |
Output is correct |
150 |
Correct |
10 ms |
9172 KB |
Output is correct |
151 |
Correct |
51 ms |
16632 KB |
Output is correct |
152 |
Correct |
15 ms |
9748 KB |
Output is correct |
153 |
Correct |
14 ms |
9940 KB |
Output is correct |
154 |
Correct |
24 ms |
10420 KB |
Output is correct |
155 |
Correct |
15 ms |
9772 KB |
Output is correct |
156 |
Correct |
14 ms |
9684 KB |
Output is correct |
157 |
Correct |
8 ms |
8532 KB |
Output is correct |
158 |
Correct |
250 ms |
8852 KB |
Output is correct |
159 |
Correct |
228 ms |
8576 KB |
Output is correct |
160 |
Correct |
189 ms |
8532 KB |
Output is correct |
161 |
Correct |
171 ms |
8640 KB |
Output is correct |
162 |
Correct |
152 ms |
8660 KB |
Output is correct |
163 |
Correct |
37 ms |
13376 KB |
Output is correct |
164 |
Correct |
56 ms |
13432 KB |
Output is correct |
165 |
Correct |
45 ms |
13376 KB |
Output is correct |
166 |
Correct |
50 ms |
13404 KB |
Output is correct |
167 |
Correct |
35 ms |
13388 KB |
Output is correct |
168 |
Correct |
36 ms |
13360 KB |
Output is correct |
169 |
Correct |
76 ms |
19072 KB |
Output is correct |
170 |
Correct |
17 ms |
10068 KB |
Output is correct |
171 |
Correct |
73 ms |
19052 KB |
Output is correct |
172 |
Correct |
16 ms |
10128 KB |
Output is correct |
173 |
Correct |
86 ms |
19108 KB |
Output is correct |
174 |
Correct |
15 ms |
10052 KB |
Output is correct |
175 |
Correct |
18 ms |
10832 KB |
Output is correct |
176 |
Correct |
18 ms |
10724 KB |
Output is correct |
177 |
Correct |
19 ms |
10528 KB |
Output is correct |
178 |
Correct |
22 ms |
10428 KB |
Output is correct |
179 |
Correct |
12 ms |
9172 KB |
Output is correct |
180 |
Correct |
480 ms |
9284 KB |
Output is correct |
181 |
Correct |
597 ms |
9172 KB |
Output is correct |
182 |
Correct |
859 ms |
9564 KB |
Output is correct |
183 |
Correct |
379 ms |
9084 KB |
Output is correct |
184 |
Correct |
293 ms |
9168 KB |
Output is correct |
185 |
Correct |
70 ms |
16480 KB |
Output is correct |
186 |
Correct |
51 ms |
17748 KB |
Output is correct |
187 |
Correct |
96 ms |
17936 KB |
Output is correct |
188 |
Correct |
65 ms |
16364 KB |
Output is correct |
189 |
Correct |
68 ms |
16140 KB |
Output is correct |
190 |
Correct |
84 ms |
18428 KB |
Output is correct |
191 |
Correct |
70 ms |
17404 KB |
Output is correct |
192 |
Correct |
63 ms |
15068 KB |
Output is correct |
193 |
Correct |
71 ms |
14028 KB |
Output is correct |
194 |
Correct |
17 ms |
9860 KB |
Output is correct |
195 |
Correct |
1207 ms |
10108 KB |
Output is correct |
196 |
Correct |
918 ms |
9740 KB |
Output is correct |
197 |
Correct |
740 ms |
9812 KB |
Output is correct |
198 |
Correct |
643 ms |
9848 KB |
Output is correct |
199 |
Correct |
583 ms |
9892 KB |
Output is correct |
200 |
Correct |
116 ms |
32172 KB |
Output is correct |
201 |
Correct |
111 ms |
32204 KB |
Output is correct |
202 |
Correct |
118 ms |
32168 KB |
Output is correct |
203 |
Correct |
109 ms |
32204 KB |
Output is correct |
204 |
Correct |
128 ms |
32204 KB |
Output is correct |
205 |
Correct |
105 ms |
32192 KB |
Output is correct |
206 |
Correct |
112 ms |
29368 KB |
Output is correct |
207 |
Correct |
87 ms |
27588 KB |
Output is correct |
208 |
Correct |
131 ms |
29360 KB |
Output is correct |
209 |
Correct |
85 ms |
27596 KB |
Output is correct |
210 |
Correct |
110 ms |
29380 KB |
Output is correct |
211 |
Correct |
92 ms |
27600 KB |
Output is correct |
212 |
Correct |
95 ms |
29912 KB |
Output is correct |
213 |
Correct |
126 ms |
24268 KB |
Output is correct |
214 |
Correct |
106 ms |
22916 KB |
Output is correct |
215 |
Correct |
98 ms |
22604 KB |
Output is correct |