#include <bits/stdc++.h>
/*
#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx")
#pragma GCC optimize("Ofast")//Comment optimisations for interactive problems (use endl)
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
*/
using namespace std;
typedef int ll;
typedef pair<ll,ll> p;
typedef pair<ll, p> tri;
typedef vector<ll> v;
typedef vector<v> vv;
typedef vector<p> vp;
typedef vector<tri> vtri;
typedef vector<vtri> vvtri;
typedef vector<vvtri> vvvtri;
typedef vector<vv> vvv;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<vvb> vvvb;
typedef vector<p> vp;
typedef vector<vp> vvp;
typedef vector<vvp> vvvp;
typedef vector<vvvp> vvvvp;
#define double long double
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<vvd> vvvd;
const ll mod = 1e9 + 7;
const ll INF = 1e18;
#define f first
#define s second
#define pb push_back
#define eb emplace_back
#define loop(a) for (ll i = 0; i < a; i++)
#define setmin(a, b) a = min(a, b)
#define setmax(a, b) a = max(a, b)
#define all(v) v.begin(), v.end()
#include "paint.h"
constexpr ll maxM = 25000;
typedef bitset<maxM> bs;
constexpr ll maxn = 131072;
bs validStartIndices[2 * maxn];
bs rotateLeft(ll i, bs &bits)
{
return bits << i | bits >> (maxM - i);
}
bool query(ll l, ll r, ll n)
{
l += n; r += n;
bs cur;
cur.set();
bool first = false;
while (l <= r)
{
if (l % 2 == 1)
{
cur &= validStartIndices[l];
l++;
}
if (r % 2 == 0)
{
cur &= validStartIndices[r];
r--;
}
l /= 2; r /= 2;
}
return cur.count() > 0;
}
constexpr ll maxK = 100000;
v appearingIn[maxK];
int minimumInstructions(int N, int M, int K, vector<int> C, vector<int> A, vector<vector<int>> B) {
ll n = pow(2, ceil(log2(N)));
for (ll i = 0; i < N; i++) appearingIn[C[i]].pb(i);
for (ll i = 0; i < M; i++)
{
for (ll x : B[i])
{
for (ll y : appearingIn[x]) validStartIndices[y + n][(i - y + M * N) % M] = 1;
}
}
for (ll i = n - 1; i > 0; i--)
{
validStartIndices[i] = validStartIndices[2 * i] & validStartIndices[2 * i + 1];
}
ll res = 0;
bool possible = true;
ll last = 0;
ll lastDone = 0;
while (last < N)
{
ll lastFound = -1;
for (;lastDone<=min(last, N - M);lastDone++)
{
if (query(lastDone, lastDone + M - 1, n)) lastFound = lastDone;
}
if (lastFound == -1)
{
possible = false;
break;
}
last = lastFound + M;
res++;
}
if (!possible) return -1;
return res;
}
/*
int main() {
int N, M, K;
assert(3 == scanf("%d %d %d", &N, &M, &K));
vector<int> C(N);
for (int i = 0; i < N; ++i) {
assert(1 == scanf("%d", &C[i]));
}
vector<int> A(M);
vector<vector<int>> B(M);
for (int i = 0; i < M; ++i) {
assert(1 == scanf("%d", &A[i]));
B[i].resize(A[i]);
for (int j = 0; j < A[i]; ++j) {
assert(1 == scanf("%d", &B[i][j]));
}
}
int minimum_instructions = minimumInstructions(N, M, K, C, A, B);
printf("%d\n", minimum_instructions);
return 0;
}
/**/
Compilation message
paint.cpp:146:1: warning: "/*" within comment [-Wcomment]
146 | /**/
|
paint.cpp:35:16: warning: overflow in conversion from 'double' to 'll' {aka 'int'} changes value from '1.0e+18' to '2147483647' [-Woverflow]
35 | const ll INF = 1e18;
| ^~~~
paint.cpp: In function 'bool query(ll, ll, ll)':
paint.cpp:63:10: warning: unused variable 'first' [-Wunused-variable]
63 | bool first = false;
| ^~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4700 KB |
Output is correct |
2 |
Correct |
1 ms |
4700 KB |
Output is correct |
3 |
Correct |
1 ms |
4700 KB |
Output is correct |
4 |
Correct |
1 ms |
4700 KB |
Output is correct |
5 |
Correct |
2 ms |
4700 KB |
Output is correct |
6 |
Correct |
1 ms |
4700 KB |
Output is correct |
7 |
Correct |
2 ms |
6748 KB |
Output is correct |
8 |
Correct |
2 ms |
6748 KB |
Output is correct |
9 |
Correct |
1 ms |
6748 KB |
Output is correct |
10 |
Correct |
2 ms |
6744 KB |
Output is correct |
11 |
Correct |
2 ms |
6748 KB |
Output is correct |
12 |
Correct |
2 ms |
6744 KB |
Output is correct |
13 |
Correct |
3 ms |
6748 KB |
Output is correct |
14 |
Correct |
3 ms |
6748 KB |
Output is correct |
15 |
Correct |
2 ms |
6748 KB |
Output is correct |
16 |
Correct |
3 ms |
6744 KB |
Output is correct |
17 |
Correct |
2 ms |
6748 KB |
Output is correct |
18 |
Correct |
2 ms |
6748 KB |
Output is correct |
19 |
Correct |
1 ms |
6748 KB |
Output is correct |
20 |
Correct |
2 ms |
6748 KB |
Output is correct |
21 |
Correct |
1 ms |
6748 KB |
Output is correct |
22 |
Correct |
9 ms |
7516 KB |
Output is correct |
23 |
Correct |
9 ms |
7516 KB |
Output is correct |
24 |
Correct |
9 ms |
7572 KB |
Output is correct |
25 |
Correct |
79 ms |
164948 KB |
Output is correct |
26 |
Correct |
64 ms |
164944 KB |
Output is correct |
27 |
Correct |
49 ms |
165056 KB |
Output is correct |
28 |
Correct |
43 ms |
165032 KB |
Output is correct |
29 |
Correct |
42 ms |
164948 KB |
Output is correct |
30 |
Correct |
41 ms |
165284 KB |
Output is correct |
31 |
Correct |
116 ms |
165892 KB |
Output is correct |
32 |
Correct |
118 ms |
165888 KB |
Output is correct |
33 |
Correct |
130 ms |
165712 KB |
Output is correct |
34 |
Correct |
117 ms |
165716 KB |
Output is correct |
35 |
Correct |
118 ms |
165880 KB |
Output is correct |
36 |
Correct |
119 ms |
165712 KB |
Output is correct |
37 |
Correct |
52 ms |
166476 KB |
Output is correct |
38 |
Correct |
51 ms |
166420 KB |
Output is correct |
39 |
Correct |
52 ms |
166484 KB |
Output is correct |
40 |
Runtime error |
228 ms |
524288 KB |
Execution killed with signal 9 |
41 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4700 KB |
Output is correct |
2 |
Correct |
1 ms |
4700 KB |
Output is correct |
3 |
Correct |
1 ms |
4700 KB |
Output is correct |
4 |
Correct |
1 ms |
4700 KB |
Output is correct |
5 |
Correct |
2 ms |
4700 KB |
Output is correct |
6 |
Correct |
1 ms |
4700 KB |
Output is correct |
7 |
Correct |
2 ms |
6748 KB |
Output is correct |
8 |
Correct |
2 ms |
6748 KB |
Output is correct |
9 |
Correct |
1 ms |
6748 KB |
Output is correct |
10 |
Correct |
2 ms |
6744 KB |
Output is correct |
11 |
Correct |
2 ms |
6748 KB |
Output is correct |
12 |
Correct |
2 ms |
6744 KB |
Output is correct |
13 |
Correct |
3 ms |
6748 KB |
Output is correct |
14 |
Correct |
3 ms |
6748 KB |
Output is correct |
15 |
Correct |
2 ms |
6748 KB |
Output is correct |
16 |
Correct |
3 ms |
6744 KB |
Output is correct |
17 |
Correct |
2 ms |
6748 KB |
Output is correct |
18 |
Correct |
2 ms |
6748 KB |
Output is correct |
19 |
Correct |
1 ms |
6748 KB |
Output is correct |
20 |
Correct |
2 ms |
6748 KB |
Output is correct |
21 |
Correct |
1 ms |
6748 KB |
Output is correct |
22 |
Correct |
1 ms |
4700 KB |
Output is correct |
23 |
Correct |
1 ms |
4700 KB |
Output is correct |
24 |
Correct |
1 ms |
4700 KB |
Output is correct |
25 |
Correct |
1 ms |
4700 KB |
Output is correct |
26 |
Correct |
1 ms |
4700 KB |
Output is correct |
27 |
Correct |
2 ms |
6748 KB |
Output is correct |
28 |
Correct |
2 ms |
6748 KB |
Output is correct |
29 |
Correct |
2 ms |
6748 KB |
Output is correct |
30 |
Correct |
2 ms |
6748 KB |
Output is correct |
31 |
Correct |
2 ms |
6748 KB |
Output is correct |
32 |
Correct |
1 ms |
6748 KB |
Output is correct |
33 |
Correct |
3 ms |
6748 KB |
Output is correct |
34 |
Correct |
2 ms |
6748 KB |
Output is correct |
35 |
Correct |
2 ms |
6748 KB |
Output is correct |
36 |
Correct |
2 ms |
6748 KB |
Output is correct |
37 |
Correct |
2 ms |
6576 KB |
Output is correct |
38 |
Correct |
2 ms |
4700 KB |
Output is correct |
39 |
Correct |
2 ms |
6744 KB |
Output is correct |
40 |
Correct |
1 ms |
6748 KB |
Output is correct |
41 |
Correct |
2 ms |
6748 KB |
Output is correct |
42 |
Correct |
2 ms |
6748 KB |
Output is correct |
43 |
Correct |
2 ms |
6744 KB |
Output is correct |
44 |
Correct |
2 ms |
6748 KB |
Output is correct |
45 |
Correct |
3 ms |
6748 KB |
Output is correct |
46 |
Correct |
2 ms |
6748 KB |
Output is correct |
47 |
Correct |
2 ms |
6748 KB |
Output is correct |
48 |
Correct |
1 ms |
6748 KB |
Output is correct |
49 |
Correct |
2 ms |
6748 KB |
Output is correct |
50 |
Correct |
2 ms |
6748 KB |
Output is correct |
51 |
Correct |
2 ms |
6748 KB |
Output is correct |
52 |
Correct |
2 ms |
6744 KB |
Output is correct |
53 |
Correct |
3 ms |
6748 KB |
Output is correct |
54 |
Correct |
2 ms |
6748 KB |
Output is correct |
55 |
Correct |
3 ms |
6744 KB |
Output is correct |
56 |
Correct |
2 ms |
6748 KB |
Output is correct |
57 |
Correct |
2 ms |
6748 KB |
Output is correct |
58 |
Correct |
2 ms |
6748 KB |
Output is correct |
59 |
Correct |
3 ms |
6748 KB |
Output is correct |
60 |
Correct |
2 ms |
6748 KB |
Output is correct |
61 |
Correct |
3 ms |
6744 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4700 KB |
Output is correct |
2 |
Correct |
1 ms |
4700 KB |
Output is correct |
3 |
Correct |
1 ms |
4700 KB |
Output is correct |
4 |
Correct |
1 ms |
4700 KB |
Output is correct |
5 |
Correct |
1 ms |
4700 KB |
Output is correct |
6 |
Correct |
1 ms |
4700 KB |
Output is correct |
7 |
Correct |
2 ms |
4700 KB |
Output is correct |
8 |
Correct |
1 ms |
4700 KB |
Output is correct |
9 |
Correct |
2 ms |
6748 KB |
Output is correct |
10 |
Correct |
2 ms |
6748 KB |
Output is correct |
11 |
Correct |
1 ms |
6748 KB |
Output is correct |
12 |
Correct |
2 ms |
6744 KB |
Output is correct |
13 |
Correct |
2 ms |
6748 KB |
Output is correct |
14 |
Correct |
2 ms |
6744 KB |
Output is correct |
15 |
Correct |
3 ms |
6748 KB |
Output is correct |
16 |
Correct |
3 ms |
6748 KB |
Output is correct |
17 |
Correct |
2 ms |
6748 KB |
Output is correct |
18 |
Correct |
3 ms |
6744 KB |
Output is correct |
19 |
Correct |
2 ms |
6748 KB |
Output is correct |
20 |
Correct |
2 ms |
6748 KB |
Output is correct |
21 |
Correct |
1 ms |
6748 KB |
Output is correct |
22 |
Correct |
2 ms |
6748 KB |
Output is correct |
23 |
Correct |
1 ms |
6748 KB |
Output is correct |
24 |
Correct |
9 ms |
7516 KB |
Output is correct |
25 |
Correct |
9 ms |
7516 KB |
Output is correct |
26 |
Correct |
9 ms |
7572 KB |
Output is correct |
27 |
Correct |
1 ms |
4700 KB |
Output is correct |
28 |
Correct |
1 ms |
4700 KB |
Output is correct |
29 |
Correct |
1 ms |
4700 KB |
Output is correct |
30 |
Correct |
2 ms |
6748 KB |
Output is correct |
31 |
Correct |
2 ms |
6748 KB |
Output is correct |
32 |
Correct |
2 ms |
6748 KB |
Output is correct |
33 |
Correct |
2 ms |
6748 KB |
Output is correct |
34 |
Correct |
2 ms |
6748 KB |
Output is correct |
35 |
Correct |
1 ms |
6748 KB |
Output is correct |
36 |
Correct |
3 ms |
6748 KB |
Output is correct |
37 |
Correct |
2 ms |
6748 KB |
Output is correct |
38 |
Correct |
2 ms |
6748 KB |
Output is correct |
39 |
Correct |
2 ms |
6748 KB |
Output is correct |
40 |
Correct |
2 ms |
6576 KB |
Output is correct |
41 |
Correct |
2 ms |
4700 KB |
Output is correct |
42 |
Correct |
2 ms |
6744 KB |
Output is correct |
43 |
Correct |
1 ms |
6748 KB |
Output is correct |
44 |
Correct |
2 ms |
6748 KB |
Output is correct |
45 |
Correct |
2 ms |
6748 KB |
Output is correct |
46 |
Correct |
2 ms |
6744 KB |
Output is correct |
47 |
Correct |
2 ms |
6748 KB |
Output is correct |
48 |
Correct |
3 ms |
6748 KB |
Output is correct |
49 |
Correct |
2 ms |
6748 KB |
Output is correct |
50 |
Correct |
2 ms |
6748 KB |
Output is correct |
51 |
Correct |
1 ms |
6748 KB |
Output is correct |
52 |
Correct |
2 ms |
6748 KB |
Output is correct |
53 |
Correct |
2 ms |
6748 KB |
Output is correct |
54 |
Correct |
2 ms |
6748 KB |
Output is correct |
55 |
Correct |
2 ms |
6744 KB |
Output is correct |
56 |
Correct |
3 ms |
6748 KB |
Output is correct |
57 |
Correct |
2 ms |
6748 KB |
Output is correct |
58 |
Correct |
3 ms |
6744 KB |
Output is correct |
59 |
Correct |
2 ms |
6748 KB |
Output is correct |
60 |
Correct |
2 ms |
6748 KB |
Output is correct |
61 |
Correct |
2 ms |
6748 KB |
Output is correct |
62 |
Correct |
3 ms |
6748 KB |
Output is correct |
63 |
Correct |
2 ms |
6748 KB |
Output is correct |
64 |
Correct |
3 ms |
6744 KB |
Output is correct |
65 |
Correct |
1 ms |
4700 KB |
Output is correct |
66 |
Correct |
3 ms |
6748 KB |
Output is correct |
67 |
Correct |
4 ms |
6736 KB |
Output is correct |
68 |
Correct |
3 ms |
6748 KB |
Output is correct |
69 |
Correct |
3 ms |
6748 KB |
Output is correct |
70 |
Correct |
3 ms |
6748 KB |
Output is correct |
71 |
Correct |
3 ms |
6748 KB |
Output is correct |
72 |
Correct |
3 ms |
6744 KB |
Output is correct |
73 |
Correct |
3 ms |
6744 KB |
Output is correct |
74 |
Correct |
3 ms |
6748 KB |
Output is correct |
75 |
Correct |
3 ms |
6772 KB |
Output is correct |
76 |
Correct |
9 ms |
7512 KB |
Output is correct |
77 |
Correct |
10 ms |
7516 KB |
Output is correct |
78 |
Correct |
15 ms |
7772 KB |
Output is correct |
79 |
Correct |
3 ms |
6748 KB |
Output is correct |
80 |
Correct |
3 ms |
6748 KB |
Output is correct |
81 |
Correct |
3 ms |
6748 KB |
Output is correct |
82 |
Correct |
3 ms |
6748 KB |
Output is correct |
83 |
Correct |
3 ms |
6748 KB |
Output is correct |
84 |
Correct |
4 ms |
6748 KB |
Output is correct |
85 |
Correct |
4 ms |
6748 KB |
Output is correct |
86 |
Correct |
4 ms |
6900 KB |
Output is correct |
87 |
Correct |
3 ms |
6748 KB |
Output is correct |
88 |
Correct |
3 ms |
6748 KB |
Output is correct |
89 |
Correct |
3 ms |
6748 KB |
Output is correct |
90 |
Correct |
13 ms |
7772 KB |
Output is correct |
91 |
Correct |
13 ms |
7780 KB |
Output is correct |
92 |
Correct |
13 ms |
7768 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4700 KB |
Output is correct |
2 |
Correct |
1 ms |
4700 KB |
Output is correct |
3 |
Correct |
1 ms |
4700 KB |
Output is correct |
4 |
Correct |
1 ms |
4700 KB |
Output is correct |
5 |
Correct |
1 ms |
4700 KB |
Output is correct |
6 |
Correct |
1 ms |
4700 KB |
Output is correct |
7 |
Correct |
2 ms |
4700 KB |
Output is correct |
8 |
Correct |
1 ms |
4700 KB |
Output is correct |
9 |
Correct |
2 ms |
6748 KB |
Output is correct |
10 |
Correct |
2 ms |
6748 KB |
Output is correct |
11 |
Correct |
1 ms |
6748 KB |
Output is correct |
12 |
Correct |
2 ms |
6744 KB |
Output is correct |
13 |
Correct |
2 ms |
6748 KB |
Output is correct |
14 |
Correct |
2 ms |
6744 KB |
Output is correct |
15 |
Correct |
3 ms |
6748 KB |
Output is correct |
16 |
Correct |
3 ms |
6748 KB |
Output is correct |
17 |
Correct |
2 ms |
6748 KB |
Output is correct |
18 |
Correct |
3 ms |
6744 KB |
Output is correct |
19 |
Correct |
2 ms |
6748 KB |
Output is correct |
20 |
Correct |
2 ms |
6748 KB |
Output is correct |
21 |
Correct |
1 ms |
6748 KB |
Output is correct |
22 |
Correct |
2 ms |
6748 KB |
Output is correct |
23 |
Correct |
1 ms |
6748 KB |
Output is correct |
24 |
Correct |
9 ms |
7516 KB |
Output is correct |
25 |
Correct |
9 ms |
7516 KB |
Output is correct |
26 |
Correct |
9 ms |
7572 KB |
Output is correct |
27 |
Correct |
79 ms |
164948 KB |
Output is correct |
28 |
Correct |
64 ms |
164944 KB |
Output is correct |
29 |
Correct |
49 ms |
165056 KB |
Output is correct |
30 |
Correct |
43 ms |
165032 KB |
Output is correct |
31 |
Correct |
42 ms |
164948 KB |
Output is correct |
32 |
Correct |
41 ms |
165284 KB |
Output is correct |
33 |
Correct |
116 ms |
165892 KB |
Output is correct |
34 |
Correct |
118 ms |
165888 KB |
Output is correct |
35 |
Correct |
130 ms |
165712 KB |
Output is correct |
36 |
Correct |
117 ms |
165716 KB |
Output is correct |
37 |
Correct |
118 ms |
165880 KB |
Output is correct |
38 |
Correct |
119 ms |
165712 KB |
Output is correct |
39 |
Correct |
52 ms |
166476 KB |
Output is correct |
40 |
Correct |
51 ms |
166420 KB |
Output is correct |
41 |
Correct |
52 ms |
166484 KB |
Output is correct |
42 |
Correct |
1 ms |
4700 KB |
Output is correct |
43 |
Correct |
1 ms |
4700 KB |
Output is correct |
44 |
Correct |
1 ms |
4700 KB |
Output is correct |
45 |
Correct |
2 ms |
6748 KB |
Output is correct |
46 |
Correct |
2 ms |
6748 KB |
Output is correct |
47 |
Correct |
2 ms |
6748 KB |
Output is correct |
48 |
Correct |
2 ms |
6748 KB |
Output is correct |
49 |
Correct |
2 ms |
6748 KB |
Output is correct |
50 |
Correct |
1 ms |
6748 KB |
Output is correct |
51 |
Correct |
3 ms |
6748 KB |
Output is correct |
52 |
Correct |
2 ms |
6748 KB |
Output is correct |
53 |
Correct |
2 ms |
6748 KB |
Output is correct |
54 |
Correct |
2 ms |
6748 KB |
Output is correct |
55 |
Correct |
2 ms |
6576 KB |
Output is correct |
56 |
Correct |
2 ms |
4700 KB |
Output is correct |
57 |
Correct |
2 ms |
6744 KB |
Output is correct |
58 |
Correct |
1 ms |
6748 KB |
Output is correct |
59 |
Correct |
2 ms |
6748 KB |
Output is correct |
60 |
Correct |
2 ms |
6748 KB |
Output is correct |
61 |
Correct |
2 ms |
6744 KB |
Output is correct |
62 |
Correct |
2 ms |
6748 KB |
Output is correct |
63 |
Correct |
3 ms |
6748 KB |
Output is correct |
64 |
Correct |
2 ms |
6748 KB |
Output is correct |
65 |
Correct |
2 ms |
6748 KB |
Output is correct |
66 |
Correct |
1 ms |
6748 KB |
Output is correct |
67 |
Correct |
2 ms |
6748 KB |
Output is correct |
68 |
Correct |
2 ms |
6748 KB |
Output is correct |
69 |
Correct |
2 ms |
6748 KB |
Output is correct |
70 |
Correct |
2 ms |
6744 KB |
Output is correct |
71 |
Correct |
3 ms |
6748 KB |
Output is correct |
72 |
Correct |
2 ms |
6748 KB |
Output is correct |
73 |
Correct |
3 ms |
6744 KB |
Output is correct |
74 |
Correct |
2 ms |
6748 KB |
Output is correct |
75 |
Correct |
2 ms |
6748 KB |
Output is correct |
76 |
Correct |
2 ms |
6748 KB |
Output is correct |
77 |
Correct |
3 ms |
6748 KB |
Output is correct |
78 |
Correct |
2 ms |
6748 KB |
Output is correct |
79 |
Correct |
3 ms |
6744 KB |
Output is correct |
80 |
Correct |
1 ms |
4700 KB |
Output is correct |
81 |
Correct |
3 ms |
6748 KB |
Output is correct |
82 |
Correct |
4 ms |
6736 KB |
Output is correct |
83 |
Correct |
3 ms |
6748 KB |
Output is correct |
84 |
Correct |
3 ms |
6748 KB |
Output is correct |
85 |
Correct |
3 ms |
6748 KB |
Output is correct |
86 |
Correct |
3 ms |
6748 KB |
Output is correct |
87 |
Correct |
3 ms |
6744 KB |
Output is correct |
88 |
Correct |
3 ms |
6744 KB |
Output is correct |
89 |
Correct |
3 ms |
6748 KB |
Output is correct |
90 |
Correct |
3 ms |
6772 KB |
Output is correct |
91 |
Correct |
9 ms |
7512 KB |
Output is correct |
92 |
Correct |
10 ms |
7516 KB |
Output is correct |
93 |
Correct |
15 ms |
7772 KB |
Output is correct |
94 |
Correct |
3 ms |
6748 KB |
Output is correct |
95 |
Correct |
3 ms |
6748 KB |
Output is correct |
96 |
Correct |
3 ms |
6748 KB |
Output is correct |
97 |
Correct |
3 ms |
6748 KB |
Output is correct |
98 |
Correct |
3 ms |
6748 KB |
Output is correct |
99 |
Correct |
4 ms |
6748 KB |
Output is correct |
100 |
Correct |
4 ms |
6748 KB |
Output is correct |
101 |
Correct |
4 ms |
6900 KB |
Output is correct |
102 |
Correct |
3 ms |
6748 KB |
Output is correct |
103 |
Correct |
3 ms |
6748 KB |
Output is correct |
104 |
Correct |
3 ms |
6748 KB |
Output is correct |
105 |
Correct |
13 ms |
7772 KB |
Output is correct |
106 |
Correct |
13 ms |
7780 KB |
Output is correct |
107 |
Correct |
13 ms |
7768 KB |
Output is correct |
108 |
Correct |
67 ms |
165076 KB |
Output is correct |
109 |
Correct |
130 ms |
99152 KB |
Output is correct |
110 |
Correct |
56 ms |
90960 KB |
Output is correct |
111 |
Correct |
48 ms |
89076 KB |
Output is correct |
112 |
Correct |
55 ms |
101204 KB |
Output is correct |
113 |
Correct |
46 ms |
87224 KB |
Output is correct |
114 |
Correct |
72 ms |
89688 KB |
Output is correct |
115 |
Correct |
54 ms |
85604 KB |
Output is correct |
116 |
Correct |
109 ms |
161932 KB |
Output is correct |
117 |
Correct |
62 ms |
87708 KB |
Output is correct |
118 |
Correct |
63 ms |
93932 KB |
Output is correct |
119 |
Correct |
78 ms |
97872 KB |
Output is correct |
120 |
Correct |
31 ms |
91996 KB |
Output is correct |
121 |
Correct |
63 ms |
91408 KB |
Output is correct |
122 |
Correct |
38 ms |
90192 KB |
Output is correct |
123 |
Correct |
61 ms |
89180 KB |
Output is correct |
124 |
Correct |
53 ms |
162264 KB |
Output is correct |
125 |
Correct |
100 ms |
161384 KB |
Output is correct |
126 |
Correct |
61 ms |
101716 KB |
Output is correct |
127 |
Correct |
107 ms |
161692 KB |
Output is correct |
128 |
Correct |
64 ms |
95576 KB |
Output is correct |
129 |
Correct |
82 ms |
97616 KB |
Output is correct |
130 |
Correct |
68 ms |
165004 KB |
Output is correct |
131 |
Correct |
192 ms |
165204 KB |
Output is correct |
132 |
Correct |
114 ms |
165200 KB |
Output is correct |
133 |
Correct |
102 ms |
165196 KB |
Output is correct |
134 |
Correct |
97 ms |
165096 KB |
Output is correct |
135 |
Correct |
89 ms |
165200 KB |
Output is correct |
136 |
Correct |
143 ms |
166224 KB |
Output is correct |
137 |
Correct |
122 ms |
166368 KB |
Output is correct |
138 |
Correct |
126 ms |
166360 KB |
Output is correct |
139 |
Correct |
126 ms |
166484 KB |
Output is correct |
140 |
Correct |
122 ms |
166400 KB |
Output is correct |
141 |
Correct |
123 ms |
166224 KB |
Output is correct |
142 |
Correct |
56 ms |
166736 KB |
Output is correct |
143 |
Correct |
120 ms |
165528 KB |
Output is correct |
144 |
Correct |
58 ms |
166740 KB |
Output is correct |
145 |
Correct |
116 ms |
165460 KB |
Output is correct |
146 |
Correct |
64 ms |
166740 KB |
Output is correct |
147 |
Correct |
117 ms |
165860 KB |
Output is correct |
148 |
Correct |
120 ms |
165904 KB |
Output is correct |
149 |
Correct |
118 ms |
165980 KB |
Output is correct |
150 |
Correct |
114 ms |
165888 KB |
Output is correct |
151 |
Correct |
112 ms |
165792 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
4700 KB |
Output is correct |
2 |
Correct |
1 ms |
4700 KB |
Output is correct |
3 |
Correct |
1 ms |
4700 KB |
Output is correct |
4 |
Correct |
1 ms |
4700 KB |
Output is correct |
5 |
Correct |
1 ms |
4700 KB |
Output is correct |
6 |
Correct |
1 ms |
4700 KB |
Output is correct |
7 |
Correct |
2 ms |
4700 KB |
Output is correct |
8 |
Correct |
1 ms |
4700 KB |
Output is correct |
9 |
Correct |
2 ms |
6748 KB |
Output is correct |
10 |
Correct |
2 ms |
6748 KB |
Output is correct |
11 |
Correct |
1 ms |
6748 KB |
Output is correct |
12 |
Correct |
2 ms |
6744 KB |
Output is correct |
13 |
Correct |
2 ms |
6748 KB |
Output is correct |
14 |
Correct |
2 ms |
6744 KB |
Output is correct |
15 |
Correct |
3 ms |
6748 KB |
Output is correct |
16 |
Correct |
3 ms |
6748 KB |
Output is correct |
17 |
Correct |
2 ms |
6748 KB |
Output is correct |
18 |
Correct |
3 ms |
6744 KB |
Output is correct |
19 |
Correct |
2 ms |
6748 KB |
Output is correct |
20 |
Correct |
2 ms |
6748 KB |
Output is correct |
21 |
Correct |
1 ms |
6748 KB |
Output is correct |
22 |
Correct |
2 ms |
6748 KB |
Output is correct |
23 |
Correct |
1 ms |
6748 KB |
Output is correct |
24 |
Correct |
9 ms |
7516 KB |
Output is correct |
25 |
Correct |
9 ms |
7516 KB |
Output is correct |
26 |
Correct |
9 ms |
7572 KB |
Output is correct |
27 |
Correct |
79 ms |
164948 KB |
Output is correct |
28 |
Correct |
64 ms |
164944 KB |
Output is correct |
29 |
Correct |
49 ms |
165056 KB |
Output is correct |
30 |
Correct |
43 ms |
165032 KB |
Output is correct |
31 |
Correct |
42 ms |
164948 KB |
Output is correct |
32 |
Correct |
41 ms |
165284 KB |
Output is correct |
33 |
Correct |
116 ms |
165892 KB |
Output is correct |
34 |
Correct |
118 ms |
165888 KB |
Output is correct |
35 |
Correct |
130 ms |
165712 KB |
Output is correct |
36 |
Correct |
117 ms |
165716 KB |
Output is correct |
37 |
Correct |
118 ms |
165880 KB |
Output is correct |
38 |
Correct |
119 ms |
165712 KB |
Output is correct |
39 |
Correct |
52 ms |
166476 KB |
Output is correct |
40 |
Correct |
51 ms |
166420 KB |
Output is correct |
41 |
Correct |
52 ms |
166484 KB |
Output is correct |
42 |
Runtime error |
228 ms |
524288 KB |
Execution killed with signal 9 |
43 |
Halted |
0 ms |
0 KB |
- |