#include <iostream>
#include <stack>
#include <cstring>
#include <vector>
#include <algorithm>
#include <deque>
#include <set>
#include <utility>
#include <array>
using namespace std;
#define ALL(x) x.begin(), x.end()
#define ShinLena cin.tie(nullptr)->sync_with_stdio(false);
#define INLINE inline __attribute__((always_inline))
using ll = long long;
#define N 1000005
int n, m, a[N], t[N<<1], d[N<<1], e[N];
array<int, 4> b[N];
#pragma GCC optimize("O3, unroll-loops")
#pragma GCC target("avx2")
INLINE void push(int v, int l, int r)
{
if (!d[v]) return;
t[v] += d[v];
if (l ^ r)
{
int m = (l+r)/2, vl=v+1, vr=v+(m-l+1)*2;
d[vl] += d[v], d[vr] += d[v];
}
d[v] = 0;
}
void add(int x, int y, int k, int v, int l, int r)
{
push(v, l, r);
if (y < l || r < x) return;
if (x <= l && r <= y) { d[v] = k; push(v, l, r); return; }
int m = (l+r)/2, vl=v+1, vr=v+(m-l+1)*2;
add(x, y, k, vl, l, m);
add(x, y, k, vr, m+1, r);
t[v] = max(t[vl], t[vr]);
}
int query(int x, int y, int v, int l, int r)
{
push(v, l, r);
if (y < l || r < x) return 0;
if (x <= l && r <= y) return t[v];
int m = (l+r)/2, vl=v+1, vr=v+(m-l+1)*2;
return max(query(x, y, vl, l, m), query(x, y, vr, m+1, r));
}
std::stack<int> s;
int main()
{
ShinLena;
cin >> n >> m;
for (int i = 1; i <= n; ++i) cin >> a[i];
for (int i = 0; i < m; ++i) cin >> b[i][0] >> b[i][1] >> b[i][2], b[i][3] = i;
sort(b, b+m);
s.push(n+1); a[n+1] = 1e9+1;
int j = m-1;
for (int i = n; i >= 1; --i)
{
while (s.size() && a[s.top()] < a[i])
{
int x = s.top();
s.pop();
add(x, x, a[x], 0, 1, n);
add(x+1, s.top() - 1, -a[x], 0, 1, n);
}
add(i+1, s.top() - 1, a[i], 0, 1, n);
s.push(i);
for (; j >= 0 && b[j][0] == i; --j) e[b[j][3]] = b[j][2] >= query(i+1, b[j][1], 0, 1, n);
}
for (int i = 0; i < m; ++i) cout << e[i] << '\n';
return 0;
}
Compilation message
sortbooks.cpp:21:40: warning: bad option '-f unroll-loops' to pragma 'optimize' [-Wpragmas]
21 | #pragma GCC optimize("O3, unroll-loops")
| ^
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
22 | #pragma GCC target("avx2")
| ^
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:22:26: warning: bad option '-f unroll-loops' to
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
6492 KB |
Output is correct |
2 |
Correct |
1 ms |
4560 KB |
Output is correct |
3 |
Correct |
1 ms |
6492 KB |
Output is correct |
4 |
Correct |
1 ms |
6492 KB |
Output is correct |
5 |
Correct |
1 ms |
4560 KB |
Output is correct |
6 |
Correct |
1 ms |
4572 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
6492 KB |
Output is correct |
2 |
Correct |
1 ms |
4560 KB |
Output is correct |
3 |
Correct |
1 ms |
6492 KB |
Output is correct |
4 |
Correct |
1 ms |
6492 KB |
Output is correct |
5 |
Correct |
1 ms |
4560 KB |
Output is correct |
6 |
Correct |
1 ms |
4572 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
4 ms |
4700 KB |
Output is correct |
12 |
Correct |
4 ms |
4664 KB |
Output is correct |
13 |
Correct |
5 ms |
4792 KB |
Output is correct |
14 |
Correct |
6 ms |
6748 KB |
Output is correct |
15 |
Correct |
6 ms |
4876 KB |
Output is correct |
16 |
Correct |
5 ms |
4700 KB |
Output is correct |
17 |
Correct |
4 ms |
4700 KB |
Output is correct |
18 |
Correct |
5 ms |
4700 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1391 ms |
70036 KB |
Output is correct |
2 |
Correct |
1469 ms |
70500 KB |
Output is correct |
3 |
Correct |
1395 ms |
70488 KB |
Output is correct |
4 |
Correct |
1404 ms |
70708 KB |
Output is correct |
5 |
Correct |
982 ms |
66956 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
115 ms |
11600 KB |
Output is correct |
2 |
Correct |
108 ms |
11664 KB |
Output is correct |
3 |
Correct |
76 ms |
10104 KB |
Output is correct |
4 |
Correct |
77 ms |
9968 KB |
Output is correct |
5 |
Correct |
79 ms |
10324 KB |
Output is correct |
6 |
Correct |
77 ms |
9880 KB |
Output is correct |
7 |
Correct |
74 ms |
9812 KB |
Output is correct |
8 |
Correct |
90 ms |
10100 KB |
Output is correct |
9 |
Correct |
38 ms |
8172 KB |
Output is correct |
10 |
Correct |
95 ms |
9968 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
6492 KB |
Output is correct |
2 |
Correct |
1 ms |
4560 KB |
Output is correct |
3 |
Correct |
1 ms |
6492 KB |
Output is correct |
4 |
Correct |
1 ms |
6492 KB |
Output is correct |
5 |
Correct |
1 ms |
4560 KB |
Output is correct |
6 |
Correct |
1 ms |
4572 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
4 ms |
4700 KB |
Output is correct |
12 |
Correct |
4 ms |
4664 KB |
Output is correct |
13 |
Correct |
5 ms |
4792 KB |
Output is correct |
14 |
Correct |
6 ms |
6748 KB |
Output is correct |
15 |
Correct |
6 ms |
4876 KB |
Output is correct |
16 |
Correct |
5 ms |
4700 KB |
Output is correct |
17 |
Correct |
4 ms |
4700 KB |
Output is correct |
18 |
Correct |
5 ms |
4700 KB |
Output is correct |
19 |
Correct |
243 ms |
20404 KB |
Output is correct |
20 |
Correct |
242 ms |
20376 KB |
Output is correct |
21 |
Correct |
237 ms |
18260 KB |
Output is correct |
22 |
Correct |
237 ms |
20308 KB |
Output is correct |
23 |
Correct |
238 ms |
18460 KB |
Output is correct |
24 |
Correct |
160 ms |
17488 KB |
Output is correct |
25 |
Correct |
162 ms |
17492 KB |
Output is correct |
26 |
Correct |
180 ms |
17884 KB |
Output is correct |
27 |
Correct |
173 ms |
17744 KB |
Output is correct |
28 |
Correct |
169 ms |
17744 KB |
Output is correct |
29 |
Correct |
176 ms |
17940 KB |
Output is correct |
30 |
Correct |
172 ms |
17640 KB |
Output is correct |
31 |
Correct |
171 ms |
17572 KB |
Output is correct |
32 |
Correct |
175 ms |
17516 KB |
Output is correct |
33 |
Correct |
173 ms |
17740 KB |
Output is correct |
34 |
Correct |
158 ms |
17492 KB |
Output is correct |
35 |
Correct |
158 ms |
17492 KB |
Output is correct |
36 |
Correct |
155 ms |
17236 KB |
Output is correct |
37 |
Correct |
161 ms |
17232 KB |
Output is correct |
38 |
Correct |
157 ms |
17344 KB |
Output is correct |
39 |
Correct |
180 ms |
16976 KB |
Output is correct |
40 |
Correct |
138 ms |
15184 KB |
Output is correct |
41 |
Correct |
192 ms |
16484 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
6492 KB |
Output is correct |
2 |
Correct |
1 ms |
4560 KB |
Output is correct |
3 |
Correct |
1 ms |
6492 KB |
Output is correct |
4 |
Correct |
1 ms |
6492 KB |
Output is correct |
5 |
Correct |
1 ms |
4560 KB |
Output is correct |
6 |
Correct |
1 ms |
4572 KB |
Output is correct |
7 |
Correct |
1 ms |
4444 KB |
Output is correct |
8 |
Correct |
1 ms |
4444 KB |
Output is correct |
9 |
Correct |
1 ms |
4444 KB |
Output is correct |
10 |
Correct |
1 ms |
4444 KB |
Output is correct |
11 |
Correct |
4 ms |
4700 KB |
Output is correct |
12 |
Correct |
4 ms |
4664 KB |
Output is correct |
13 |
Correct |
5 ms |
4792 KB |
Output is correct |
14 |
Correct |
6 ms |
6748 KB |
Output is correct |
15 |
Correct |
6 ms |
4876 KB |
Output is correct |
16 |
Correct |
5 ms |
4700 KB |
Output is correct |
17 |
Correct |
4 ms |
4700 KB |
Output is correct |
18 |
Correct |
5 ms |
4700 KB |
Output is correct |
19 |
Correct |
1391 ms |
70036 KB |
Output is correct |
20 |
Correct |
1469 ms |
70500 KB |
Output is correct |
21 |
Correct |
1395 ms |
70488 KB |
Output is correct |
22 |
Correct |
1404 ms |
70708 KB |
Output is correct |
23 |
Correct |
982 ms |
66956 KB |
Output is correct |
24 |
Correct |
115 ms |
11600 KB |
Output is correct |
25 |
Correct |
108 ms |
11664 KB |
Output is correct |
26 |
Correct |
76 ms |
10104 KB |
Output is correct |
27 |
Correct |
77 ms |
9968 KB |
Output is correct |
28 |
Correct |
79 ms |
10324 KB |
Output is correct |
29 |
Correct |
77 ms |
9880 KB |
Output is correct |
30 |
Correct |
74 ms |
9812 KB |
Output is correct |
31 |
Correct |
90 ms |
10100 KB |
Output is correct |
32 |
Correct |
38 ms |
8172 KB |
Output is correct |
33 |
Correct |
95 ms |
9968 KB |
Output is correct |
34 |
Correct |
243 ms |
20404 KB |
Output is correct |
35 |
Correct |
242 ms |
20376 KB |
Output is correct |
36 |
Correct |
237 ms |
18260 KB |
Output is correct |
37 |
Correct |
237 ms |
20308 KB |
Output is correct |
38 |
Correct |
238 ms |
18460 KB |
Output is correct |
39 |
Correct |
160 ms |
17488 KB |
Output is correct |
40 |
Correct |
162 ms |
17492 KB |
Output is correct |
41 |
Correct |
180 ms |
17884 KB |
Output is correct |
42 |
Correct |
173 ms |
17744 KB |
Output is correct |
43 |
Correct |
169 ms |
17744 KB |
Output is correct |
44 |
Correct |
176 ms |
17940 KB |
Output is correct |
45 |
Correct |
172 ms |
17640 KB |
Output is correct |
46 |
Correct |
171 ms |
17572 KB |
Output is correct |
47 |
Correct |
175 ms |
17516 KB |
Output is correct |
48 |
Correct |
173 ms |
17740 KB |
Output is correct |
49 |
Correct |
158 ms |
17492 KB |
Output is correct |
50 |
Correct |
158 ms |
17492 KB |
Output is correct |
51 |
Correct |
155 ms |
17236 KB |
Output is correct |
52 |
Correct |
161 ms |
17232 KB |
Output is correct |
53 |
Correct |
157 ms |
17344 KB |
Output is correct |
54 |
Correct |
180 ms |
16976 KB |
Output is correct |
55 |
Correct |
138 ms |
15184 KB |
Output is correct |
56 |
Correct |
192 ms |
16484 KB |
Output is correct |
57 |
Correct |
1415 ms |
67384 KB |
Output is correct |
58 |
Correct |
1371 ms |
66728 KB |
Output is correct |
59 |
Correct |
1374 ms |
70828 KB |
Output is correct |
60 |
Correct |
1305 ms |
71304 KB |
Output is correct |
61 |
Correct |
1359 ms |
71184 KB |
Output is correct |
62 |
Correct |
1343 ms |
71264 KB |
Output is correct |
63 |
Correct |
863 ms |
66004 KB |
Output is correct |
64 |
Correct |
870 ms |
66032 KB |
Output is correct |
65 |
Correct |
929 ms |
67408 KB |
Output is correct |
66 |
Correct |
926 ms |
67416 KB |
Output is correct |
67 |
Correct |
924 ms |
67448 KB |
Output is correct |
68 |
Correct |
974 ms |
63532 KB |
Output is correct |
69 |
Correct |
978 ms |
63200 KB |
Output is correct |
70 |
Correct |
1008 ms |
63300 KB |
Output is correct |
71 |
Correct |
971 ms |
63368 KB |
Output is correct |
72 |
Correct |
986 ms |
65380 KB |
Output is correct |
73 |
Correct |
865 ms |
64792 KB |
Output is correct |
74 |
Correct |
847 ms |
65592 KB |
Output is correct |
75 |
Correct |
851 ms |
64648 KB |
Output is correct |
76 |
Correct |
878 ms |
64556 KB |
Output is correct |
77 |
Correct |
844 ms |
64848 KB |
Output is correct |
78 |
Correct |
1010 ms |
63572 KB |
Output is correct |
79 |
Correct |
726 ms |
51020 KB |
Output is correct |
80 |
Correct |
1115 ms |
60344 KB |
Output is correct |