#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,popcnt,sse4,abm")
#include <bits/stdc++.h>
using namespace std;
#ifndef WAIMAI
#include "towers.h"
#else
#include "stub.cpp"
#endif
#ifdef WAIMAI
#define debug(HEHE...) cout << "[" << #HEHE << "] : ", dout(HEHE)
void dout() {cout << '\n';}
template<typename T, typename...U>
void dout(T t, U...u) {cout << t << (sizeof...(u) ? ", " : ""), dout(u...);}
#else
#define debug(...) 7122
#endif
#define ll long long
#define Waimai ios::sync_with_stdio(false), cin.tie(0)
#define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
#define pb emplace_back
#define F first
#define S second
#define lpos pos*2
#define rpos pos*2+1
const int INF = 2e9 + 1;
const int SIZE = 1e5 + 5;
int n;
bool b;
int a[SIZE], ty[SIZE];
int peak[SIZE], pkL[SIZE];
int pre[SIZE], pL[SIZE], pR[SIZE];
struct Segtree {
struct T {
int mx, mn, ld, rd;
T operator + (const T &o) const {
T re;
re.mx = max(mx, o.mx);
re.mn = min(mn, o.mn);
re.ld = max({ld, o.ld, o.mx - mn});
re.rd = max({rd, o.rd, mx - o.mn});
return re;
}
} node[SIZE << 2];
void build(int pos, int l, int r) {
if (l == r) {
node[pos].mx = node[pos].mn = a[l];
return;
}
int mid = (l + r) / 2;
build(lpos, l, mid);
build(rpos, mid + 1, r);
node[pos] = node[lpos] + node[rpos];
}
int schl(int pos, int l, int r, int L, int R, int x) {
if (l == L && r == R) {
if (node[pos].mx < x) return 0;
if (l == r) return l;
int mid = (L + R) / 2, re = schl(lpos, l, mid, L, mid, x);
return re == 0 ? schl(rpos, mid + 1, r, mid + 1, R, x) : re;
}
int mid = (L + R) / 2, re;
if (r <= mid) return schl(lpos, l, r, L, mid, x);
if (l > mid) return schl(rpos, l, r, mid + 1, R, x);
re = schl(lpos, l, mid, L, mid, x);
return re == 0 ? schl(rpos, mid + 1, r, mid + 1, R, x) : re;
}
int schr(int pos, int l, int r, int L, int R, int x) {
if (l == L && r == R) {
if (node[pos].mx < x) return 0;
if (l == r) return l;
int mid = (L + R) / 2, re = schr(rpos, mid + 1, r, mid + 1, R, x);
return re == 0 ? schr(lpos, l, mid, L, mid, x) : re;
}
int mid = (L + R) / 2, re;
if (r <= mid) return schr(lpos, l, r, L, mid, x);
if (l > mid) return schr(rpos, l, r, mid + 1, R, x);
re = schr(rpos, mid + 1, r, mid + 1, R, x);
return re == 0 ? schr(lpos, l, mid, L, mid, x) : re;
}
T que(int pos, int l, int r, int L, int R) {
if (l == L && r == R) return node[pos];
int mid = (L + R) / 2;
if (r <= mid) return que(lpos, l, r, L, mid);
if (l > mid) return que(rpos, l, r, mid + 1, R);
return que(lpos, l, mid, L, mid) + que(rpos, mid + 1, r, mid + 1, R);
}
} tree;
void init(int N, vector<int> H) {
n = N;
if (n == 1) return;
FOR (i, 1, n) a[i] = H[i - 1];
FOR (i, 1, n) {
if ((i == 1 || a[i] < a[i - 1]) && (i == n || a[i] < a[i + 1])) ty[i] = 1;
if ((i == 1 || a[i] > a[i - 1]) && (i == n || a[i] > a[i + 1])) ty[i] = 2;
}
}
void build(int D) {
set<int> s;
multiset<pair<int, int>> ms;
for (int i = 1, x = 1; i <= n; i++) if (ty[i] == x) {
s.insert(i);
x ^= 3;
}
if (ty[*s.rbegin()] == 2) s.erase(*s.rbegin());
a[0] = a[n + 1] = INF;
s.insert(0), s.insert(n + 1);
bool f = 0;
for (auto it = s.begin(); it != s.end(); it++) {
f ^= 1;
if (f == 0) continue;
int i = *it;
if (it != s.begin()) {
int l = *prev(it);
ms.emplace(a[i] - a[l], i);
}
if (next(it) != s.end()) {
int r = *next(it);
ms.emplace(a[i] - a[r], i);
}
}
while (s.size() > 3) {
int d = ms.begin()->F;
if (d >= D) break;
while (ms.size() && ms.begin()->F == d) {
auto [_, i] = *ms.begin();
auto it = s.lower_bound(i), lit = prev(it), rit = next(it);
int l = *lit, r = *rit;
int il = *prev(lit), ir = *next(rit);
if (a[l] > a[r]) {
ms.erase(ms.find({a[i] - a[l], i}));
ms.erase(ms.find({a[il] - a[l], il}));
if (a[i] < a[il]) {
ms.erase({a[i] - a[r], i});
ms.emplace(a[il] - a[r], il);
s.erase(i);
} else {
int j = *prev(s.find(il));
ms.erase(ms.find({a[il] - a[j], il}));
ms.emplace(a[i] - a[j], i);
s.erase(il);
}
s.erase(l);
} else {
ms.erase(ms.find({a[i] - a[r], i}));
ms.erase(ms.find({a[ir] - a[r], ir}));
if (a[i] < a[ir]) {
ms.erase({a[i] - a[l], i});
ms.emplace(a[ir] - a[l], ir);
s.erase(i);
} else {
int j = *next(s.find(ir));
ms.erase(ms.find({a[ir] - a[j], ir}));
ms.emplace(a[i] - a[j], i);
s.erase(ir);
}
s.erase(r);
}
}
}
tree.build(1, 1, n);
for (int i : s) {
if (ty[i] == 1) pre[i] = 1;
if (ty[i] == 2) peak[i] = 1;
}
pR[n + 1] = n + 1;
for (int i = n; i >= 1; i--) pR[i] = (pre[i] ? i : pR[i + 1]);
FOR (i, 1, n) {
pL[i] = (pre[i] ? i : pL[i - 1]);
pre[i] += pre[i - 1];
pkL[i] = (peak[i] ? i : pkL[i - 1]);
peak[i] += peak[i - 1];
}
}
int max_towers(int L, int R, int D) {
L++, R++;
if (L == R) return 1;
if (b == 0) {
build(D);
b = 1;
}
int ans = pre[R] - pre[L - 1];
if (ans == 0) {
int pcnt = peak[R] - peak[L - 1];
if (pcnt == 0) return 1;
int i = pkL[R];
return 1 + (tree.que(1, L, i, 1, n).mn + D <= a[i] && tree.que(1, i, R, 1, n).mn + D <= a[i]);
}
{
int i = pR[L], j = tree.schr(1, L, i, 1, n, a[i] + D);
if (j) ans += (tree.que(1, L, j, 1, n).ld >= D);
}
{
int i = pL[R], j = tree.schl(1, i, R, 1, n, a[i] + D);
if (j) ans += (tree.que(1, j, R, 1, n).rd >= D);
}
return ans;
}
/*
in1
7 3
10 20 60 40 50 30 70
1 5 10
2 2 100
0 6 17
out1
3
1
2
*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
275 ms |
7020 KB |
Output is correct |
2 |
Correct |
627 ms |
9424 KB |
Output is correct |
3 |
Correct |
623 ms |
9412 KB |
Output is correct |
4 |
Correct |
577 ms |
9424 KB |
Output is correct |
5 |
Correct |
621 ms |
9400 KB |
Output is correct |
6 |
Correct |
632 ms |
9424 KB |
Output is correct |
7 |
Correct |
687 ms |
9424 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4440 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
1 ms |
4696 KB |
Output is correct |
3 |
Correct |
1 ms |
4696 KB |
Output is correct |
4 |
Correct |
2 ms |
4696 KB |
Output is correct |
5 |
Correct |
2 ms |
4696 KB |
Output is correct |
6 |
Correct |
1 ms |
4808 KB |
Output is correct |
7 |
Correct |
2 ms |
4696 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4440 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4560 KB |
Output is correct |
12 |
Correct |
0 ms |
4440 KB |
Output is correct |
13 |
Correct |
1 ms |
4440 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4696 KB |
Output is correct |
16 |
Correct |
2 ms |
4696 KB |
Output is correct |
17 |
Correct |
1 ms |
4696 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
4440 KB |
Output is correct |
20 |
Correct |
1 ms |
4696 KB |
Output is correct |
21 |
Correct |
1 ms |
4696 KB |
Output is correct |
22 |
Correct |
2 ms |
4696 KB |
Output is correct |
23 |
Correct |
1 ms |
4440 KB |
Output is correct |
24 |
Correct |
1 ms |
4440 KB |
Output is correct |
25 |
Correct |
1 ms |
4440 KB |
Output is correct |
26 |
Correct |
2 ms |
4696 KB |
Output is correct |
27 |
Correct |
2 ms |
4696 KB |
Output is correct |
28 |
Correct |
2 ms |
4696 KB |
Output is correct |
29 |
Correct |
2 ms |
4696 KB |
Output is correct |
30 |
Correct |
2 ms |
4696 KB |
Output is correct |
31 |
Correct |
2 ms |
4696 KB |
Output is correct |
32 |
Correct |
1 ms |
4440 KB |
Output is correct |
33 |
Correct |
1 ms |
4440 KB |
Output is correct |
34 |
Correct |
1 ms |
4440 KB |
Output is correct |
35 |
Correct |
1 ms |
4440 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
1 ms |
4696 KB |
Output is correct |
3 |
Correct |
1 ms |
4696 KB |
Output is correct |
4 |
Correct |
2 ms |
4696 KB |
Output is correct |
5 |
Correct |
2 ms |
4696 KB |
Output is correct |
6 |
Correct |
1 ms |
4808 KB |
Output is correct |
7 |
Correct |
2 ms |
4696 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4440 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4560 KB |
Output is correct |
12 |
Correct |
0 ms |
4440 KB |
Output is correct |
13 |
Correct |
1 ms |
4440 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4696 KB |
Output is correct |
16 |
Correct |
2 ms |
4696 KB |
Output is correct |
17 |
Correct |
1 ms |
4696 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
4440 KB |
Output is correct |
20 |
Correct |
1 ms |
4696 KB |
Output is correct |
21 |
Correct |
1 ms |
4696 KB |
Output is correct |
22 |
Correct |
2 ms |
4696 KB |
Output is correct |
23 |
Correct |
1 ms |
4440 KB |
Output is correct |
24 |
Correct |
1 ms |
4440 KB |
Output is correct |
25 |
Correct |
1 ms |
4440 KB |
Output is correct |
26 |
Correct |
2 ms |
4696 KB |
Output is correct |
27 |
Correct |
2 ms |
4696 KB |
Output is correct |
28 |
Correct |
2 ms |
4696 KB |
Output is correct |
29 |
Correct |
2 ms |
4696 KB |
Output is correct |
30 |
Correct |
2 ms |
4696 KB |
Output is correct |
31 |
Correct |
2 ms |
4696 KB |
Output is correct |
32 |
Correct |
1 ms |
4440 KB |
Output is correct |
33 |
Correct |
1 ms |
4440 KB |
Output is correct |
34 |
Correct |
1 ms |
4440 KB |
Output is correct |
35 |
Correct |
1 ms |
4440 KB |
Output is correct |
36 |
Correct |
27 ms |
11172 KB |
Output is correct |
37 |
Correct |
73 ms |
16072 KB |
Output is correct |
38 |
Correct |
59 ms |
15884 KB |
Output is correct |
39 |
Correct |
127 ms |
19144 KB |
Output is correct |
40 |
Correct |
68 ms |
19144 KB |
Output is correct |
41 |
Correct |
104 ms |
19040 KB |
Output is correct |
42 |
Correct |
63 ms |
19096 KB |
Output is correct |
43 |
Correct |
11 ms |
9424 KB |
Output is correct |
44 |
Correct |
10 ms |
9408 KB |
Output is correct |
45 |
Correct |
10 ms |
9424 KB |
Output is correct |
46 |
Correct |
14 ms |
9424 KB |
Output is correct |
47 |
Correct |
46 ms |
15816 KB |
Output is correct |
48 |
Correct |
60 ms |
19196 KB |
Output is correct |
49 |
Correct |
60 ms |
19144 KB |
Output is correct |
50 |
Correct |
10 ms |
9424 KB |
Output is correct |
51 |
Correct |
16 ms |
9516 KB |
Output is correct |
52 |
Correct |
45 ms |
15816 KB |
Output is correct |
53 |
Correct |
55 ms |
19144 KB |
Output is correct |
54 |
Correct |
54 ms |
19396 KB |
Output is correct |
55 |
Correct |
9 ms |
9424 KB |
Output is correct |
56 |
Correct |
10 ms |
9512 KB |
Output is correct |
57 |
Correct |
71 ms |
15828 KB |
Output is correct |
58 |
Correct |
65 ms |
16072 KB |
Output is correct |
59 |
Correct |
52 ms |
16072 KB |
Output is correct |
60 |
Correct |
60 ms |
19148 KB |
Output is correct |
61 |
Correct |
67 ms |
19044 KB |
Output is correct |
62 |
Correct |
87 ms |
19032 KB |
Output is correct |
63 |
Correct |
69 ms |
19208 KB |
Output is correct |
64 |
Correct |
10 ms |
9424 KB |
Output is correct |
65 |
Correct |
11 ms |
9424 KB |
Output is correct |
66 |
Correct |
10 ms |
9432 KB |
Output is correct |
67 |
Correct |
13 ms |
9424 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
528 ms |
15820 KB |
Output is correct |
2 |
Correct |
772 ms |
16008 KB |
Output is correct |
3 |
Correct |
754 ms |
16072 KB |
Output is correct |
4 |
Correct |
723 ms |
19204 KB |
Output is correct |
5 |
Correct |
738 ms |
18996 KB |
Output is correct |
6 |
Correct |
742 ms |
19144 KB |
Output is correct |
7 |
Correct |
802 ms |
19212 KB |
Output is correct |
8 |
Correct |
649 ms |
9424 KB |
Output is correct |
9 |
Correct |
628 ms |
9424 KB |
Output is correct |
10 |
Correct |
660 ms |
9424 KB |
Output is correct |
11 |
Correct |
663 ms |
9424 KB |
Output is correct |
12 |
Correct |
622 ms |
9424 KB |
Output is correct |
13 |
Correct |
619 ms |
9424 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4440 KB |
Output is correct |
16 |
Correct |
1 ms |
4440 KB |
Output is correct |
17 |
Correct |
39 ms |
15816 KB |
Output is correct |
18 |
Correct |
54 ms |
19132 KB |
Output is correct |
19 |
Correct |
55 ms |
19144 KB |
Output is correct |
20 |
Correct |
10 ms |
9424 KB |
Output is correct |
21 |
Correct |
10 ms |
9384 KB |
Output is correct |
22 |
Correct |
47 ms |
15908 KB |
Output is correct |
23 |
Correct |
54 ms |
19152 KB |
Output is correct |
24 |
Correct |
57 ms |
19124 KB |
Output is correct |
25 |
Correct |
11 ms |
9424 KB |
Output is correct |
26 |
Correct |
10 ms |
9588 KB |
Output is correct |
27 |
Correct |
1 ms |
4696 KB |
Output is correct |
28 |
Correct |
2 ms |
4696 KB |
Output is correct |
29 |
Correct |
1 ms |
4696 KB |
Output is correct |
30 |
Correct |
1 ms |
4440 KB |
Output is correct |
31 |
Correct |
1 ms |
4440 KB |
Output is correct |
32 |
Correct |
1 ms |
4696 KB |
Output is correct |
33 |
Correct |
1 ms |
4696 KB |
Output is correct |
34 |
Correct |
1 ms |
4696 KB |
Output is correct |
35 |
Correct |
1 ms |
4440 KB |
Output is correct |
36 |
Correct |
1 ms |
4440 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
189 ms |
8424 KB |
2nd lines differ - on the 1st token, expected: '7063', found: '7197' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4440 KB |
Output is correct |
2 |
Correct |
1 ms |
4696 KB |
Output is correct |
3 |
Correct |
1 ms |
4696 KB |
Output is correct |
4 |
Correct |
2 ms |
4696 KB |
Output is correct |
5 |
Correct |
2 ms |
4696 KB |
Output is correct |
6 |
Correct |
1 ms |
4808 KB |
Output is correct |
7 |
Correct |
2 ms |
4696 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4440 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4560 KB |
Output is correct |
12 |
Correct |
0 ms |
4440 KB |
Output is correct |
13 |
Correct |
1 ms |
4440 KB |
Output is correct |
14 |
Correct |
1 ms |
4440 KB |
Output is correct |
15 |
Correct |
1 ms |
4696 KB |
Output is correct |
16 |
Correct |
2 ms |
4696 KB |
Output is correct |
17 |
Correct |
1 ms |
4696 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
4440 KB |
Output is correct |
20 |
Correct |
1 ms |
4696 KB |
Output is correct |
21 |
Correct |
1 ms |
4696 KB |
Output is correct |
22 |
Correct |
2 ms |
4696 KB |
Output is correct |
23 |
Correct |
1 ms |
4440 KB |
Output is correct |
24 |
Correct |
1 ms |
4440 KB |
Output is correct |
25 |
Correct |
1 ms |
4440 KB |
Output is correct |
26 |
Correct |
2 ms |
4696 KB |
Output is correct |
27 |
Correct |
2 ms |
4696 KB |
Output is correct |
28 |
Correct |
2 ms |
4696 KB |
Output is correct |
29 |
Correct |
2 ms |
4696 KB |
Output is correct |
30 |
Correct |
2 ms |
4696 KB |
Output is correct |
31 |
Correct |
2 ms |
4696 KB |
Output is correct |
32 |
Correct |
1 ms |
4440 KB |
Output is correct |
33 |
Correct |
1 ms |
4440 KB |
Output is correct |
34 |
Correct |
1 ms |
4440 KB |
Output is correct |
35 |
Correct |
1 ms |
4440 KB |
Output is correct |
36 |
Correct |
27 ms |
11172 KB |
Output is correct |
37 |
Correct |
73 ms |
16072 KB |
Output is correct |
38 |
Correct |
59 ms |
15884 KB |
Output is correct |
39 |
Correct |
127 ms |
19144 KB |
Output is correct |
40 |
Correct |
68 ms |
19144 KB |
Output is correct |
41 |
Correct |
104 ms |
19040 KB |
Output is correct |
42 |
Correct |
63 ms |
19096 KB |
Output is correct |
43 |
Correct |
11 ms |
9424 KB |
Output is correct |
44 |
Correct |
10 ms |
9408 KB |
Output is correct |
45 |
Correct |
10 ms |
9424 KB |
Output is correct |
46 |
Correct |
14 ms |
9424 KB |
Output is correct |
47 |
Correct |
46 ms |
15816 KB |
Output is correct |
48 |
Correct |
60 ms |
19196 KB |
Output is correct |
49 |
Correct |
60 ms |
19144 KB |
Output is correct |
50 |
Correct |
10 ms |
9424 KB |
Output is correct |
51 |
Correct |
16 ms |
9516 KB |
Output is correct |
52 |
Correct |
45 ms |
15816 KB |
Output is correct |
53 |
Correct |
55 ms |
19144 KB |
Output is correct |
54 |
Correct |
54 ms |
19396 KB |
Output is correct |
55 |
Correct |
9 ms |
9424 KB |
Output is correct |
56 |
Correct |
10 ms |
9512 KB |
Output is correct |
57 |
Correct |
71 ms |
15828 KB |
Output is correct |
58 |
Correct |
65 ms |
16072 KB |
Output is correct |
59 |
Correct |
52 ms |
16072 KB |
Output is correct |
60 |
Correct |
60 ms |
19148 KB |
Output is correct |
61 |
Correct |
67 ms |
19044 KB |
Output is correct |
62 |
Correct |
87 ms |
19032 KB |
Output is correct |
63 |
Correct |
69 ms |
19208 KB |
Output is correct |
64 |
Correct |
10 ms |
9424 KB |
Output is correct |
65 |
Correct |
11 ms |
9424 KB |
Output is correct |
66 |
Correct |
10 ms |
9432 KB |
Output is correct |
67 |
Correct |
13 ms |
9424 KB |
Output is correct |
68 |
Correct |
528 ms |
15820 KB |
Output is correct |
69 |
Correct |
772 ms |
16008 KB |
Output is correct |
70 |
Correct |
754 ms |
16072 KB |
Output is correct |
71 |
Correct |
723 ms |
19204 KB |
Output is correct |
72 |
Correct |
738 ms |
18996 KB |
Output is correct |
73 |
Correct |
742 ms |
19144 KB |
Output is correct |
74 |
Correct |
802 ms |
19212 KB |
Output is correct |
75 |
Correct |
649 ms |
9424 KB |
Output is correct |
76 |
Correct |
628 ms |
9424 KB |
Output is correct |
77 |
Correct |
660 ms |
9424 KB |
Output is correct |
78 |
Correct |
663 ms |
9424 KB |
Output is correct |
79 |
Correct |
622 ms |
9424 KB |
Output is correct |
80 |
Correct |
619 ms |
9424 KB |
Output is correct |
81 |
Correct |
1 ms |
4440 KB |
Output is correct |
82 |
Correct |
1 ms |
4440 KB |
Output is correct |
83 |
Correct |
1 ms |
4440 KB |
Output is correct |
84 |
Correct |
39 ms |
15816 KB |
Output is correct |
85 |
Correct |
54 ms |
19132 KB |
Output is correct |
86 |
Correct |
55 ms |
19144 KB |
Output is correct |
87 |
Correct |
10 ms |
9424 KB |
Output is correct |
88 |
Correct |
10 ms |
9384 KB |
Output is correct |
89 |
Correct |
47 ms |
15908 KB |
Output is correct |
90 |
Correct |
54 ms |
19152 KB |
Output is correct |
91 |
Correct |
57 ms |
19124 KB |
Output is correct |
92 |
Correct |
11 ms |
9424 KB |
Output is correct |
93 |
Correct |
10 ms |
9588 KB |
Output is correct |
94 |
Correct |
1 ms |
4696 KB |
Output is correct |
95 |
Correct |
2 ms |
4696 KB |
Output is correct |
96 |
Correct |
1 ms |
4696 KB |
Output is correct |
97 |
Correct |
1 ms |
4440 KB |
Output is correct |
98 |
Correct |
1 ms |
4440 KB |
Output is correct |
99 |
Correct |
1 ms |
4696 KB |
Output is correct |
100 |
Correct |
1 ms |
4696 KB |
Output is correct |
101 |
Correct |
1 ms |
4696 KB |
Output is correct |
102 |
Correct |
1 ms |
4440 KB |
Output is correct |
103 |
Correct |
1 ms |
4440 KB |
Output is correct |
104 |
Correct |
615 ms |
15092 KB |
Output is correct |
105 |
Correct |
709 ms |
15816 KB |
Output is correct |
106 |
Correct |
779 ms |
15932 KB |
Output is correct |
107 |
Correct |
792 ms |
19120 KB |
Output is correct |
108 |
Correct |
796 ms |
19048 KB |
Output is correct |
109 |
Correct |
808 ms |
19144 KB |
Output is correct |
110 |
Correct |
712 ms |
19144 KB |
Output is correct |
111 |
Correct |
577 ms |
9424 KB |
Output is correct |
112 |
Correct |
642 ms |
9424 KB |
Output is correct |
113 |
Correct |
661 ms |
9424 KB |
Output is correct |
114 |
Correct |
633 ms |
9424 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
275 ms |
7020 KB |
Output is correct |
2 |
Correct |
627 ms |
9424 KB |
Output is correct |
3 |
Correct |
623 ms |
9412 KB |
Output is correct |
4 |
Correct |
577 ms |
9424 KB |
Output is correct |
5 |
Correct |
621 ms |
9400 KB |
Output is correct |
6 |
Correct |
632 ms |
9424 KB |
Output is correct |
7 |
Correct |
687 ms |
9424 KB |
Output is correct |
8 |
Correct |
1 ms |
4440 KB |
Output is correct |
9 |
Correct |
1 ms |
4440 KB |
Output is correct |
10 |
Correct |
1 ms |
4440 KB |
Output is correct |
11 |
Correct |
1 ms |
4440 KB |
Output is correct |
12 |
Correct |
1 ms |
4696 KB |
Output is correct |
13 |
Correct |
1 ms |
4696 KB |
Output is correct |
14 |
Correct |
2 ms |
4696 KB |
Output is correct |
15 |
Correct |
2 ms |
4696 KB |
Output is correct |
16 |
Correct |
1 ms |
4808 KB |
Output is correct |
17 |
Correct |
2 ms |
4696 KB |
Output is correct |
18 |
Correct |
1 ms |
4440 KB |
Output is correct |
19 |
Correct |
1 ms |
4440 KB |
Output is correct |
20 |
Correct |
1 ms |
4440 KB |
Output is correct |
21 |
Correct |
1 ms |
4560 KB |
Output is correct |
22 |
Correct |
0 ms |
4440 KB |
Output is correct |
23 |
Correct |
1 ms |
4440 KB |
Output is correct |
24 |
Correct |
1 ms |
4440 KB |
Output is correct |
25 |
Correct |
1 ms |
4696 KB |
Output is correct |
26 |
Correct |
2 ms |
4696 KB |
Output is correct |
27 |
Correct |
1 ms |
4696 KB |
Output is correct |
28 |
Correct |
1 ms |
4440 KB |
Output is correct |
29 |
Correct |
1 ms |
4440 KB |
Output is correct |
30 |
Correct |
1 ms |
4696 KB |
Output is correct |
31 |
Correct |
1 ms |
4696 KB |
Output is correct |
32 |
Correct |
2 ms |
4696 KB |
Output is correct |
33 |
Correct |
1 ms |
4440 KB |
Output is correct |
34 |
Correct |
1 ms |
4440 KB |
Output is correct |
35 |
Correct |
1 ms |
4440 KB |
Output is correct |
36 |
Correct |
2 ms |
4696 KB |
Output is correct |
37 |
Correct |
2 ms |
4696 KB |
Output is correct |
38 |
Correct |
2 ms |
4696 KB |
Output is correct |
39 |
Correct |
2 ms |
4696 KB |
Output is correct |
40 |
Correct |
2 ms |
4696 KB |
Output is correct |
41 |
Correct |
2 ms |
4696 KB |
Output is correct |
42 |
Correct |
1 ms |
4440 KB |
Output is correct |
43 |
Correct |
1 ms |
4440 KB |
Output is correct |
44 |
Correct |
1 ms |
4440 KB |
Output is correct |
45 |
Correct |
1 ms |
4440 KB |
Output is correct |
46 |
Correct |
27 ms |
11172 KB |
Output is correct |
47 |
Correct |
73 ms |
16072 KB |
Output is correct |
48 |
Correct |
59 ms |
15884 KB |
Output is correct |
49 |
Correct |
127 ms |
19144 KB |
Output is correct |
50 |
Correct |
68 ms |
19144 KB |
Output is correct |
51 |
Correct |
104 ms |
19040 KB |
Output is correct |
52 |
Correct |
63 ms |
19096 KB |
Output is correct |
53 |
Correct |
11 ms |
9424 KB |
Output is correct |
54 |
Correct |
10 ms |
9408 KB |
Output is correct |
55 |
Correct |
10 ms |
9424 KB |
Output is correct |
56 |
Correct |
14 ms |
9424 KB |
Output is correct |
57 |
Correct |
46 ms |
15816 KB |
Output is correct |
58 |
Correct |
60 ms |
19196 KB |
Output is correct |
59 |
Correct |
60 ms |
19144 KB |
Output is correct |
60 |
Correct |
10 ms |
9424 KB |
Output is correct |
61 |
Correct |
16 ms |
9516 KB |
Output is correct |
62 |
Correct |
45 ms |
15816 KB |
Output is correct |
63 |
Correct |
55 ms |
19144 KB |
Output is correct |
64 |
Correct |
54 ms |
19396 KB |
Output is correct |
65 |
Correct |
9 ms |
9424 KB |
Output is correct |
66 |
Correct |
10 ms |
9512 KB |
Output is correct |
67 |
Correct |
71 ms |
15828 KB |
Output is correct |
68 |
Correct |
65 ms |
16072 KB |
Output is correct |
69 |
Correct |
52 ms |
16072 KB |
Output is correct |
70 |
Correct |
60 ms |
19148 KB |
Output is correct |
71 |
Correct |
67 ms |
19044 KB |
Output is correct |
72 |
Correct |
87 ms |
19032 KB |
Output is correct |
73 |
Correct |
69 ms |
19208 KB |
Output is correct |
74 |
Correct |
10 ms |
9424 KB |
Output is correct |
75 |
Correct |
11 ms |
9424 KB |
Output is correct |
76 |
Correct |
10 ms |
9432 KB |
Output is correct |
77 |
Correct |
13 ms |
9424 KB |
Output is correct |
78 |
Correct |
528 ms |
15820 KB |
Output is correct |
79 |
Correct |
772 ms |
16008 KB |
Output is correct |
80 |
Correct |
754 ms |
16072 KB |
Output is correct |
81 |
Correct |
723 ms |
19204 KB |
Output is correct |
82 |
Correct |
738 ms |
18996 KB |
Output is correct |
83 |
Correct |
742 ms |
19144 KB |
Output is correct |
84 |
Correct |
802 ms |
19212 KB |
Output is correct |
85 |
Correct |
649 ms |
9424 KB |
Output is correct |
86 |
Correct |
628 ms |
9424 KB |
Output is correct |
87 |
Correct |
660 ms |
9424 KB |
Output is correct |
88 |
Correct |
663 ms |
9424 KB |
Output is correct |
89 |
Correct |
622 ms |
9424 KB |
Output is correct |
90 |
Correct |
619 ms |
9424 KB |
Output is correct |
91 |
Correct |
1 ms |
4440 KB |
Output is correct |
92 |
Correct |
1 ms |
4440 KB |
Output is correct |
93 |
Correct |
1 ms |
4440 KB |
Output is correct |
94 |
Correct |
39 ms |
15816 KB |
Output is correct |
95 |
Correct |
54 ms |
19132 KB |
Output is correct |
96 |
Correct |
55 ms |
19144 KB |
Output is correct |
97 |
Correct |
10 ms |
9424 KB |
Output is correct |
98 |
Correct |
10 ms |
9384 KB |
Output is correct |
99 |
Correct |
47 ms |
15908 KB |
Output is correct |
100 |
Correct |
54 ms |
19152 KB |
Output is correct |
101 |
Correct |
57 ms |
19124 KB |
Output is correct |
102 |
Correct |
11 ms |
9424 KB |
Output is correct |
103 |
Correct |
10 ms |
9588 KB |
Output is correct |
104 |
Correct |
1 ms |
4696 KB |
Output is correct |
105 |
Correct |
2 ms |
4696 KB |
Output is correct |
106 |
Correct |
1 ms |
4696 KB |
Output is correct |
107 |
Correct |
1 ms |
4440 KB |
Output is correct |
108 |
Correct |
1 ms |
4440 KB |
Output is correct |
109 |
Correct |
1 ms |
4696 KB |
Output is correct |
110 |
Correct |
1 ms |
4696 KB |
Output is correct |
111 |
Correct |
1 ms |
4696 KB |
Output is correct |
112 |
Correct |
1 ms |
4440 KB |
Output is correct |
113 |
Correct |
1 ms |
4440 KB |
Output is correct |
114 |
Incorrect |
189 ms |
8424 KB |
2nd lines differ - on the 1st token, expected: '7063', found: '7197' |
115 |
Halted |
0 ms |
0 KB |
- |