#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
#define ii pair<int, int>
#define pl pair<ll, ll>
#define f1 first
#define s2 second
const int MAX = 250069;
const int STMAX = 1 << 20;
const ll inf = 1e18 + 69;
struct Segtree1
{
int n;
ll st[STMAX], lz1[STMAX], lz2[STMAX];
Segtree1(int _n) : n(_n) {}
inline void propagate(int node, int l, int r)
{
assert(node < (STMAX));
st[node] = max(st[node] + lz1[node], lz2[node]);
if (l < r)
{
lz1[node << 1] += lz1[node];
lz2[node << 1] += lz1[node];
lz2[node << 1] = max(lz2[node << 1], lz2[node]);
lz1[node << 1 | 1] += lz1[node];
lz2[node << 1 | 1] += lz1[node];
lz2[node << 1 | 1] = max(lz2[node << 1 | 1], lz2[node]);
}
lz1[node] = lz2[node] = 0;
}
inline void add(int p, int q, ll val)
{
const auto add_ = [&](const auto &self, int node, int l, int r) -> void
{
propagate(node, l, r);
if (l > q || r < p)
return;
if (p <= l && r <= q)
{
lz1[node] += val; lz2[node] += val;
propagate(node, l, r);
return;
}
int mid = (l + r) >> 1;
self(self, node << 1, l, mid);
self(self, node << 1 | 1, mid+1, r);
st[node] = max(st[node << 1], st[node << 1 | 1]);
};
add_(add_, 1, 1, n);
}
// Ai = max(Ai, val) for i in [p <= i <= q]
inline void update(int p, int q, ll val)
{
const auto update_ = [&](const auto &self, int node, int l, int r) -> void
{
propagate(node, l, r);
if (l > q || r < p)
return;
if (p <= l && r <= q)
{
lz2[node] = max(lz2[node], (ll)val);
propagate(node, l, r);
return;
}
int mid = (l + r) >> 1;
self(self, node << 1, l, mid);
self(self, node << 1 | 1, mid+1, r);
st[node] = max(st[node << 1], st[node << 1 | 1]);
};
update_(update_, 1, 1, n);
}
inline ll query(ll p)
{
const auto query_ = [&](const auto &self, int node, int l, int r) -> ll
{
propagate(node, l, r);
if (l > p || r < p)
return -1;
if (p <= l && r <= p)
return st[node];
int mid = (l + r) >> 1;
return max(self(self, node << 1, l, mid), self(self, node << 1 | 1, mid+1, r));
};
return query_(query_, 1, 1, n);
}
};
struct Segtree2
{
int n;
ll st[STMAX], lz[STMAX];
Segtree2 (int _n) : n(_n) {}
inline void propagate(int node, int l, int r)
{
assert(node < (STMAX));
st[node] += lz[node];
if (l < r)
{
lz[node << 1] += lz[node];
lz[node << 1 | 1] += lz[node];
}
lz[node] = 0;
}
inline void add(int p, int q, ll val)
{
const auto add_ = [&](const auto &self, int node, int l, int r) -> void
{
propagate(node, l, r);
if (l > q || r < p)
return;
if (p <= l && r <= q)
{
lz[node] += val;
propagate(node, l, r);
return;
}
int mid = (l + r) >> 1;
self(self, node << 1, l, mid);
self(self, node << 1 | 1, mid+1, r);
st[node] = min(st[node << 1], st[node << 1 | 1]);
};
add_(add_, 1, 0, n-1);
}
inline void modify(int p, ll val)
{
const auto modify_ = [&](const auto &self, int node, int l, int r) -> void
{
propagate(node, l, r);
if (l > p || r < p)
return;
if (p <= l && r <= p)
{
st[node] = val;
return;
}
int mid = (l + r) >> 1;
self(self, node << 1, l, mid);
self(self, node << 1 | 1, mid+1, r);
st[node] = min(st[node << 1], st[node << 1 | 1]);
};
modify_(modify_, 1, 0, n-1);
}
inline int query()
{
const auto query_ = [&](const auto &self, int node, int l, int r) -> int
{
propagate(node, l, r);
if (l == r)
return l;
int mid = (l + r) >> 1;
propagate(node << 1, l, mid);
if (st[node << 1] <= 0)
return self(self, node << 1, l, mid);
return self(self, node << 1 | 1, mid+1, r);
};
return query_(query_, 1, 0, n-1);
}
};
int main()
{
ios :: sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int N, M, Q;
cin >> N >> M >> Q;
int ty[MAX], L[MAX], R[MAX];
ll A[MAX], B[MAX];
for (int i = 0; i < Q; ++i)
{
cin >> ty[i];
if (ty[i] == 1) cin >> L[i] >> R[i] >> B[i] >> A[i];
else if (ty[i] == 2) cin >> L[i] >> R[i] >> A[i];
else cin >> A[i] >> B[i];
}
int askQ = 0;
ll ans[MAX];
vector<pair<pl, int>> query;
Segtree1 st1(N), All(N);
for (int i = 0; i < Q; ++i)
{
if (ty[i] == 1)
{
st1.add(L[i], R[i], A[i]);
All.add(L[i], R[i], A[i]);
}
else if (ty[i] == 2)
{
st1.add(L[i], R[i], -A[i]);
st1.update(L[i], R[i], 0);
}
else
{
ll cur = st1.query(A[i]);
ll tot = All.query(A[i]);
if (cur >= B[i]) query.pb({{A[i], tot - cur + B[i]}, askQ++});
else ans[askQ++] = 0;
}
}
sort(query.begin(), query.end());
// cerr << "query: \n";
// for (int i = 0; i < (int)query.size(); ++i)
// cerr << query[i].f1.f1 << " " << query[i].f1.s2 << " " << query[i].s2 << '\n';
// cerr << '\n';
Segtree2 st2((int)query.size());
for (int i = 0; i < (int)query.size(); ++i)
st2.modify(i, query[i].f1.s2);
for (int i = 0; i < Q; ++i)
{
if (ty[i] == 1)
{
int l = (int)(lower_bound(query.begin(), query.end(), mp(mp((ll)L[i], 0ll), 0)) - query.begin());
int r = -1 + (int)(upper_bound(query.begin(), query.end(), mp(mp((ll)R[i], inf), 0)) - query.begin());
if (l <= r)
st2.add(l, r, -A[i]);
while (st2.st[1] <= 0)
{
int id = st2.query();
ans[query[id].s2] = B[i];
st2.modify(id, inf);
}
}
}
for (int i = 0; i < askQ; ++i)
cout << ans[i] << '\n';
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
32 ms |
74828 KB |
Output is correct |
2 |
Correct |
31 ms |
74732 KB |
Output is correct |
3 |
Correct |
30 ms |
74664 KB |
Output is correct |
4 |
Correct |
32 ms |
74712 KB |
Output is correct |
5 |
Correct |
30 ms |
74776 KB |
Output is correct |
6 |
Correct |
30 ms |
74708 KB |
Output is correct |
7 |
Correct |
31 ms |
74708 KB |
Output is correct |
8 |
Correct |
32 ms |
74700 KB |
Output is correct |
9 |
Correct |
32 ms |
74752 KB |
Output is correct |
10 |
Correct |
36 ms |
74708 KB |
Output is correct |
11 |
Correct |
33 ms |
74788 KB |
Output is correct |
12 |
Correct |
33 ms |
74748 KB |
Output is correct |
13 |
Correct |
31 ms |
74688 KB |
Output is correct |
14 |
Correct |
29 ms |
74712 KB |
Output is correct |
15 |
Correct |
32 ms |
74752 KB |
Output is correct |
16 |
Correct |
31 ms |
74744 KB |
Output is correct |
17 |
Correct |
30 ms |
74700 KB |
Output is correct |
18 |
Correct |
33 ms |
74824 KB |
Output is correct |
19 |
Correct |
32 ms |
74764 KB |
Output is correct |
20 |
Correct |
32 ms |
74692 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
32 ms |
74828 KB |
Output is correct |
2 |
Correct |
31 ms |
74732 KB |
Output is correct |
3 |
Correct |
30 ms |
74664 KB |
Output is correct |
4 |
Correct |
32 ms |
74712 KB |
Output is correct |
5 |
Correct |
30 ms |
74776 KB |
Output is correct |
6 |
Correct |
30 ms |
74708 KB |
Output is correct |
7 |
Correct |
31 ms |
74708 KB |
Output is correct |
8 |
Correct |
32 ms |
74700 KB |
Output is correct |
9 |
Correct |
32 ms |
74752 KB |
Output is correct |
10 |
Correct |
36 ms |
74708 KB |
Output is correct |
11 |
Correct |
33 ms |
74788 KB |
Output is correct |
12 |
Correct |
33 ms |
74748 KB |
Output is correct |
13 |
Correct |
31 ms |
74688 KB |
Output is correct |
14 |
Correct |
29 ms |
74712 KB |
Output is correct |
15 |
Correct |
32 ms |
74752 KB |
Output is correct |
16 |
Correct |
31 ms |
74744 KB |
Output is correct |
17 |
Correct |
30 ms |
74700 KB |
Output is correct |
18 |
Correct |
33 ms |
74824 KB |
Output is correct |
19 |
Correct |
32 ms |
74764 KB |
Output is correct |
20 |
Correct |
32 ms |
74692 KB |
Output is correct |
21 |
Correct |
32 ms |
74708 KB |
Output is correct |
22 |
Correct |
32 ms |
74700 KB |
Output is correct |
23 |
Correct |
32 ms |
74812 KB |
Output is correct |
24 |
Correct |
34 ms |
74748 KB |
Output is correct |
25 |
Correct |
29 ms |
74804 KB |
Output is correct |
26 |
Correct |
30 ms |
74868 KB |
Output is correct |
27 |
Correct |
33 ms |
74784 KB |
Output is correct |
28 |
Correct |
32 ms |
74752 KB |
Output is correct |
29 |
Correct |
32 ms |
74764 KB |
Output is correct |
30 |
Correct |
31 ms |
74728 KB |
Output is correct |
31 |
Correct |
35 ms |
74712 KB |
Output is correct |
32 |
Correct |
32 ms |
74772 KB |
Output is correct |
33 |
Correct |
30 ms |
74752 KB |
Output is correct |
34 |
Correct |
29 ms |
74708 KB |
Output is correct |
35 |
Correct |
38 ms |
74748 KB |
Output is correct |
36 |
Correct |
30 ms |
74736 KB |
Output is correct |
37 |
Correct |
30 ms |
74820 KB |
Output is correct |
38 |
Correct |
31 ms |
74792 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
184 ms |
74768 KB |
Output is correct |
2 |
Correct |
132 ms |
74784 KB |
Output is correct |
3 |
Correct |
138 ms |
74776 KB |
Output is correct |
4 |
Correct |
134 ms |
74768 KB |
Output is correct |
5 |
Correct |
137 ms |
74768 KB |
Output is correct |
6 |
Correct |
137 ms |
74768 KB |
Output is correct |
7 |
Correct |
50 ms |
75148 KB |
Output is correct |
8 |
Correct |
52 ms |
75088 KB |
Output is correct |
9 |
Correct |
137 ms |
74780 KB |
Output is correct |
10 |
Correct |
133 ms |
74784 KB |
Output is correct |
11 |
Correct |
160 ms |
74784 KB |
Output is correct |
12 |
Correct |
131 ms |
74708 KB |
Output is correct |
13 |
Correct |
121 ms |
75024 KB |
Output is correct |
14 |
Correct |
138 ms |
75008 KB |
Output is correct |
15 |
Correct |
131 ms |
74768 KB |
Output is correct |
16 |
Correct |
127 ms |
74836 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
769 ms |
76596 KB |
Output is correct |
2 |
Correct |
612 ms |
80628 KB |
Output is correct |
3 |
Correct |
805 ms |
82340 KB |
Output is correct |
4 |
Correct |
622 ms |
80120 KB |
Output is correct |
5 |
Correct |
644 ms |
80276 KB |
Output is correct |
6 |
Correct |
886 ms |
82612 KB |
Output is correct |
7 |
Correct |
163 ms |
80504 KB |
Output is correct |
8 |
Correct |
177 ms |
80640 KB |
Output is correct |
9 |
Correct |
853 ms |
83972 KB |
Output is correct |
10 |
Correct |
865 ms |
84024 KB |
Output is correct |
11 |
Correct |
793 ms |
82500 KB |
Output is correct |
12 |
Correct |
888 ms |
82552 KB |
Output is correct |
13 |
Correct |
838 ms |
82508 KB |
Output is correct |
14 |
Correct |
809 ms |
82452 KB |
Output is correct |
15 |
Correct |
809 ms |
82536 KB |
Output is correct |
16 |
Correct |
888 ms |
82324 KB |
Output is correct |
17 |
Correct |
804 ms |
82456 KB |
Output is correct |
18 |
Correct |
829 ms |
82480 KB |
Output is correct |
19 |
Correct |
804 ms |
82596 KB |
Output is correct |
20 |
Correct |
816 ms |
82480 KB |
Output is correct |
21 |
Correct |
805 ms |
82516 KB |
Output is correct |
22 |
Correct |
837 ms |
82484 KB |
Output is correct |
23 |
Correct |
837 ms |
82444 KB |
Output is correct |
24 |
Correct |
807 ms |
82628 KB |
Output is correct |
25 |
Correct |
660 ms |
82212 KB |
Output is correct |
26 |
Correct |
739 ms |
82320 KB |
Output is correct |
27 |
Correct |
586 ms |
81424 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
32 ms |
74828 KB |
Output is correct |
2 |
Correct |
31 ms |
74732 KB |
Output is correct |
3 |
Correct |
30 ms |
74664 KB |
Output is correct |
4 |
Correct |
32 ms |
74712 KB |
Output is correct |
5 |
Correct |
30 ms |
74776 KB |
Output is correct |
6 |
Correct |
30 ms |
74708 KB |
Output is correct |
7 |
Correct |
31 ms |
74708 KB |
Output is correct |
8 |
Correct |
32 ms |
74700 KB |
Output is correct |
9 |
Correct |
32 ms |
74752 KB |
Output is correct |
10 |
Correct |
36 ms |
74708 KB |
Output is correct |
11 |
Correct |
33 ms |
74788 KB |
Output is correct |
12 |
Correct |
33 ms |
74748 KB |
Output is correct |
13 |
Correct |
31 ms |
74688 KB |
Output is correct |
14 |
Correct |
29 ms |
74712 KB |
Output is correct |
15 |
Correct |
32 ms |
74752 KB |
Output is correct |
16 |
Correct |
31 ms |
74744 KB |
Output is correct |
17 |
Correct |
30 ms |
74700 KB |
Output is correct |
18 |
Correct |
33 ms |
74824 KB |
Output is correct |
19 |
Correct |
32 ms |
74764 KB |
Output is correct |
20 |
Correct |
32 ms |
74692 KB |
Output is correct |
21 |
Correct |
184 ms |
74768 KB |
Output is correct |
22 |
Correct |
132 ms |
74784 KB |
Output is correct |
23 |
Correct |
138 ms |
74776 KB |
Output is correct |
24 |
Correct |
134 ms |
74768 KB |
Output is correct |
25 |
Correct |
137 ms |
74768 KB |
Output is correct |
26 |
Correct |
137 ms |
74768 KB |
Output is correct |
27 |
Correct |
50 ms |
75148 KB |
Output is correct |
28 |
Correct |
52 ms |
75088 KB |
Output is correct |
29 |
Correct |
137 ms |
74780 KB |
Output is correct |
30 |
Correct |
133 ms |
74784 KB |
Output is correct |
31 |
Correct |
160 ms |
74784 KB |
Output is correct |
32 |
Correct |
131 ms |
74708 KB |
Output is correct |
33 |
Correct |
121 ms |
75024 KB |
Output is correct |
34 |
Correct |
138 ms |
75008 KB |
Output is correct |
35 |
Correct |
131 ms |
74768 KB |
Output is correct |
36 |
Correct |
127 ms |
74836 KB |
Output is correct |
37 |
Correct |
164 ms |
75280 KB |
Output is correct |
38 |
Correct |
156 ms |
75228 KB |
Output is correct |
39 |
Correct |
49 ms |
75220 KB |
Output is correct |
40 |
Correct |
61 ms |
75228 KB |
Output is correct |
41 |
Correct |
177 ms |
75396 KB |
Output is correct |
42 |
Correct |
181 ms |
75252 KB |
Output is correct |
43 |
Correct |
182 ms |
75284 KB |
Output is correct |
44 |
Correct |
179 ms |
75292 KB |
Output is correct |
45 |
Correct |
181 ms |
75220 KB |
Output is correct |
46 |
Correct |
176 ms |
75220 KB |
Output is correct |
47 |
Correct |
84 ms |
75328 KB |
Output is correct |
48 |
Correct |
173 ms |
75436 KB |
Output is correct |
49 |
Correct |
142 ms |
75060 KB |
Output is correct |
50 |
Correct |
156 ms |
75088 KB |
Output is correct |
51 |
Correct |
190 ms |
75332 KB |
Output is correct |
52 |
Correct |
180 ms |
75212 KB |
Output is correct |
53 |
Correct |
105 ms |
74732 KB |
Output is correct |
54 |
Correct |
121 ms |
74768 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
187 ms |
75736 KB |
Output is correct |
2 |
Correct |
186 ms |
75616 KB |
Output is correct |
3 |
Correct |
201 ms |
75580 KB |
Output is correct |
4 |
Correct |
140 ms |
75292 KB |
Output is correct |
5 |
Correct |
166 ms |
75624 KB |
Output is correct |
6 |
Correct |
186 ms |
75640 KB |
Output is correct |
7 |
Correct |
66 ms |
75668 KB |
Output is correct |
8 |
Correct |
66 ms |
75660 KB |
Output is correct |
9 |
Correct |
99 ms |
75584 KB |
Output is correct |
10 |
Correct |
137 ms |
75344 KB |
Output is correct |
11 |
Correct |
184 ms |
75684 KB |
Output is correct |
12 |
Correct |
179 ms |
75612 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
32 ms |
74828 KB |
Output is correct |
2 |
Correct |
31 ms |
74732 KB |
Output is correct |
3 |
Correct |
30 ms |
74664 KB |
Output is correct |
4 |
Correct |
32 ms |
74712 KB |
Output is correct |
5 |
Correct |
30 ms |
74776 KB |
Output is correct |
6 |
Correct |
30 ms |
74708 KB |
Output is correct |
7 |
Correct |
31 ms |
74708 KB |
Output is correct |
8 |
Correct |
32 ms |
74700 KB |
Output is correct |
9 |
Correct |
32 ms |
74752 KB |
Output is correct |
10 |
Correct |
36 ms |
74708 KB |
Output is correct |
11 |
Correct |
33 ms |
74788 KB |
Output is correct |
12 |
Correct |
33 ms |
74748 KB |
Output is correct |
13 |
Correct |
31 ms |
74688 KB |
Output is correct |
14 |
Correct |
29 ms |
74712 KB |
Output is correct |
15 |
Correct |
32 ms |
74752 KB |
Output is correct |
16 |
Correct |
31 ms |
74744 KB |
Output is correct |
17 |
Correct |
30 ms |
74700 KB |
Output is correct |
18 |
Correct |
33 ms |
74824 KB |
Output is correct |
19 |
Correct |
32 ms |
74764 KB |
Output is correct |
20 |
Correct |
32 ms |
74692 KB |
Output is correct |
21 |
Correct |
32 ms |
74708 KB |
Output is correct |
22 |
Correct |
32 ms |
74700 KB |
Output is correct |
23 |
Correct |
32 ms |
74812 KB |
Output is correct |
24 |
Correct |
34 ms |
74748 KB |
Output is correct |
25 |
Correct |
29 ms |
74804 KB |
Output is correct |
26 |
Correct |
30 ms |
74868 KB |
Output is correct |
27 |
Correct |
33 ms |
74784 KB |
Output is correct |
28 |
Correct |
32 ms |
74752 KB |
Output is correct |
29 |
Correct |
32 ms |
74764 KB |
Output is correct |
30 |
Correct |
31 ms |
74728 KB |
Output is correct |
31 |
Correct |
35 ms |
74712 KB |
Output is correct |
32 |
Correct |
32 ms |
74772 KB |
Output is correct |
33 |
Correct |
30 ms |
74752 KB |
Output is correct |
34 |
Correct |
29 ms |
74708 KB |
Output is correct |
35 |
Correct |
38 ms |
74748 KB |
Output is correct |
36 |
Correct |
30 ms |
74736 KB |
Output is correct |
37 |
Correct |
30 ms |
74820 KB |
Output is correct |
38 |
Correct |
31 ms |
74792 KB |
Output is correct |
39 |
Correct |
184 ms |
74768 KB |
Output is correct |
40 |
Correct |
132 ms |
74784 KB |
Output is correct |
41 |
Correct |
138 ms |
74776 KB |
Output is correct |
42 |
Correct |
134 ms |
74768 KB |
Output is correct |
43 |
Correct |
137 ms |
74768 KB |
Output is correct |
44 |
Correct |
137 ms |
74768 KB |
Output is correct |
45 |
Correct |
50 ms |
75148 KB |
Output is correct |
46 |
Correct |
52 ms |
75088 KB |
Output is correct |
47 |
Correct |
137 ms |
74780 KB |
Output is correct |
48 |
Correct |
133 ms |
74784 KB |
Output is correct |
49 |
Correct |
160 ms |
74784 KB |
Output is correct |
50 |
Correct |
131 ms |
74708 KB |
Output is correct |
51 |
Correct |
121 ms |
75024 KB |
Output is correct |
52 |
Correct |
138 ms |
75008 KB |
Output is correct |
53 |
Correct |
131 ms |
74768 KB |
Output is correct |
54 |
Correct |
127 ms |
74836 KB |
Output is correct |
55 |
Correct |
164 ms |
75280 KB |
Output is correct |
56 |
Correct |
156 ms |
75228 KB |
Output is correct |
57 |
Correct |
49 ms |
75220 KB |
Output is correct |
58 |
Correct |
61 ms |
75228 KB |
Output is correct |
59 |
Correct |
177 ms |
75396 KB |
Output is correct |
60 |
Correct |
181 ms |
75252 KB |
Output is correct |
61 |
Correct |
182 ms |
75284 KB |
Output is correct |
62 |
Correct |
179 ms |
75292 KB |
Output is correct |
63 |
Correct |
181 ms |
75220 KB |
Output is correct |
64 |
Correct |
176 ms |
75220 KB |
Output is correct |
65 |
Correct |
84 ms |
75328 KB |
Output is correct |
66 |
Correct |
173 ms |
75436 KB |
Output is correct |
67 |
Correct |
142 ms |
75060 KB |
Output is correct |
68 |
Correct |
156 ms |
75088 KB |
Output is correct |
69 |
Correct |
190 ms |
75332 KB |
Output is correct |
70 |
Correct |
180 ms |
75212 KB |
Output is correct |
71 |
Correct |
105 ms |
74732 KB |
Output is correct |
72 |
Correct |
121 ms |
74768 KB |
Output is correct |
73 |
Correct |
187 ms |
75736 KB |
Output is correct |
74 |
Correct |
186 ms |
75616 KB |
Output is correct |
75 |
Correct |
201 ms |
75580 KB |
Output is correct |
76 |
Correct |
140 ms |
75292 KB |
Output is correct |
77 |
Correct |
166 ms |
75624 KB |
Output is correct |
78 |
Correct |
186 ms |
75640 KB |
Output is correct |
79 |
Correct |
66 ms |
75668 KB |
Output is correct |
80 |
Correct |
66 ms |
75660 KB |
Output is correct |
81 |
Correct |
99 ms |
75584 KB |
Output is correct |
82 |
Correct |
137 ms |
75344 KB |
Output is correct |
83 |
Correct |
184 ms |
75684 KB |
Output is correct |
84 |
Correct |
179 ms |
75612 KB |
Output is correct |
85 |
Correct |
162 ms |
75312 KB |
Output is correct |
86 |
Correct |
180 ms |
75264 KB |
Output is correct |
87 |
Correct |
173 ms |
75276 KB |
Output is correct |
88 |
Correct |
200 ms |
75420 KB |
Output is correct |
89 |
Correct |
129 ms |
75100 KB |
Output is correct |
90 |
Correct |
195 ms |
75296 KB |
Output is correct |
91 |
Correct |
150 ms |
75216 KB |
Output is correct |
92 |
Correct |
155 ms |
75196 KB |
Output is correct |
93 |
Correct |
184 ms |
75216 KB |
Output is correct |
94 |
Correct |
181 ms |
75264 KB |
Output is correct |
95 |
Correct |
182 ms |
75288 KB |
Output is correct |
96 |
Correct |
189 ms |
75244 KB |
Output is correct |
97 |
Correct |
188 ms |
75212 KB |
Output is correct |
98 |
Correct |
187 ms |
75292 KB |
Output is correct |
99 |
Correct |
100 ms |
75268 KB |
Output is correct |
100 |
Correct |
147 ms |
75336 KB |
Output is correct |
101 |
Correct |
197 ms |
75328 KB |
Output is correct |
102 |
Correct |
145 ms |
75088 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
32 ms |
74828 KB |
Output is correct |
2 |
Correct |
31 ms |
74732 KB |
Output is correct |
3 |
Correct |
30 ms |
74664 KB |
Output is correct |
4 |
Correct |
32 ms |
74712 KB |
Output is correct |
5 |
Correct |
30 ms |
74776 KB |
Output is correct |
6 |
Correct |
30 ms |
74708 KB |
Output is correct |
7 |
Correct |
31 ms |
74708 KB |
Output is correct |
8 |
Correct |
32 ms |
74700 KB |
Output is correct |
9 |
Correct |
32 ms |
74752 KB |
Output is correct |
10 |
Correct |
36 ms |
74708 KB |
Output is correct |
11 |
Correct |
33 ms |
74788 KB |
Output is correct |
12 |
Correct |
33 ms |
74748 KB |
Output is correct |
13 |
Correct |
31 ms |
74688 KB |
Output is correct |
14 |
Correct |
29 ms |
74712 KB |
Output is correct |
15 |
Correct |
32 ms |
74752 KB |
Output is correct |
16 |
Correct |
31 ms |
74744 KB |
Output is correct |
17 |
Correct |
30 ms |
74700 KB |
Output is correct |
18 |
Correct |
33 ms |
74824 KB |
Output is correct |
19 |
Correct |
32 ms |
74764 KB |
Output is correct |
20 |
Correct |
32 ms |
74692 KB |
Output is correct |
21 |
Correct |
32 ms |
74708 KB |
Output is correct |
22 |
Correct |
32 ms |
74700 KB |
Output is correct |
23 |
Correct |
32 ms |
74812 KB |
Output is correct |
24 |
Correct |
34 ms |
74748 KB |
Output is correct |
25 |
Correct |
29 ms |
74804 KB |
Output is correct |
26 |
Correct |
30 ms |
74868 KB |
Output is correct |
27 |
Correct |
33 ms |
74784 KB |
Output is correct |
28 |
Correct |
32 ms |
74752 KB |
Output is correct |
29 |
Correct |
32 ms |
74764 KB |
Output is correct |
30 |
Correct |
31 ms |
74728 KB |
Output is correct |
31 |
Correct |
35 ms |
74712 KB |
Output is correct |
32 |
Correct |
32 ms |
74772 KB |
Output is correct |
33 |
Correct |
30 ms |
74752 KB |
Output is correct |
34 |
Correct |
29 ms |
74708 KB |
Output is correct |
35 |
Correct |
38 ms |
74748 KB |
Output is correct |
36 |
Correct |
30 ms |
74736 KB |
Output is correct |
37 |
Correct |
30 ms |
74820 KB |
Output is correct |
38 |
Correct |
31 ms |
74792 KB |
Output is correct |
39 |
Correct |
184 ms |
74768 KB |
Output is correct |
40 |
Correct |
132 ms |
74784 KB |
Output is correct |
41 |
Correct |
138 ms |
74776 KB |
Output is correct |
42 |
Correct |
134 ms |
74768 KB |
Output is correct |
43 |
Correct |
137 ms |
74768 KB |
Output is correct |
44 |
Correct |
137 ms |
74768 KB |
Output is correct |
45 |
Correct |
50 ms |
75148 KB |
Output is correct |
46 |
Correct |
52 ms |
75088 KB |
Output is correct |
47 |
Correct |
137 ms |
74780 KB |
Output is correct |
48 |
Correct |
133 ms |
74784 KB |
Output is correct |
49 |
Correct |
160 ms |
74784 KB |
Output is correct |
50 |
Correct |
131 ms |
74708 KB |
Output is correct |
51 |
Correct |
121 ms |
75024 KB |
Output is correct |
52 |
Correct |
138 ms |
75008 KB |
Output is correct |
53 |
Correct |
131 ms |
74768 KB |
Output is correct |
54 |
Correct |
127 ms |
74836 KB |
Output is correct |
55 |
Correct |
769 ms |
76596 KB |
Output is correct |
56 |
Correct |
612 ms |
80628 KB |
Output is correct |
57 |
Correct |
805 ms |
82340 KB |
Output is correct |
58 |
Correct |
622 ms |
80120 KB |
Output is correct |
59 |
Correct |
644 ms |
80276 KB |
Output is correct |
60 |
Correct |
886 ms |
82612 KB |
Output is correct |
61 |
Correct |
163 ms |
80504 KB |
Output is correct |
62 |
Correct |
177 ms |
80640 KB |
Output is correct |
63 |
Correct |
853 ms |
83972 KB |
Output is correct |
64 |
Correct |
865 ms |
84024 KB |
Output is correct |
65 |
Correct |
793 ms |
82500 KB |
Output is correct |
66 |
Correct |
888 ms |
82552 KB |
Output is correct |
67 |
Correct |
838 ms |
82508 KB |
Output is correct |
68 |
Correct |
809 ms |
82452 KB |
Output is correct |
69 |
Correct |
809 ms |
82536 KB |
Output is correct |
70 |
Correct |
888 ms |
82324 KB |
Output is correct |
71 |
Correct |
804 ms |
82456 KB |
Output is correct |
72 |
Correct |
829 ms |
82480 KB |
Output is correct |
73 |
Correct |
804 ms |
82596 KB |
Output is correct |
74 |
Correct |
816 ms |
82480 KB |
Output is correct |
75 |
Correct |
805 ms |
82516 KB |
Output is correct |
76 |
Correct |
837 ms |
82484 KB |
Output is correct |
77 |
Correct |
837 ms |
82444 KB |
Output is correct |
78 |
Correct |
807 ms |
82628 KB |
Output is correct |
79 |
Correct |
660 ms |
82212 KB |
Output is correct |
80 |
Correct |
739 ms |
82320 KB |
Output is correct |
81 |
Correct |
586 ms |
81424 KB |
Output is correct |
82 |
Correct |
164 ms |
75280 KB |
Output is correct |
83 |
Correct |
156 ms |
75228 KB |
Output is correct |
84 |
Correct |
49 ms |
75220 KB |
Output is correct |
85 |
Correct |
61 ms |
75228 KB |
Output is correct |
86 |
Correct |
177 ms |
75396 KB |
Output is correct |
87 |
Correct |
181 ms |
75252 KB |
Output is correct |
88 |
Correct |
182 ms |
75284 KB |
Output is correct |
89 |
Correct |
179 ms |
75292 KB |
Output is correct |
90 |
Correct |
181 ms |
75220 KB |
Output is correct |
91 |
Correct |
176 ms |
75220 KB |
Output is correct |
92 |
Correct |
84 ms |
75328 KB |
Output is correct |
93 |
Correct |
173 ms |
75436 KB |
Output is correct |
94 |
Correct |
142 ms |
75060 KB |
Output is correct |
95 |
Correct |
156 ms |
75088 KB |
Output is correct |
96 |
Correct |
190 ms |
75332 KB |
Output is correct |
97 |
Correct |
180 ms |
75212 KB |
Output is correct |
98 |
Correct |
105 ms |
74732 KB |
Output is correct |
99 |
Correct |
121 ms |
74768 KB |
Output is correct |
100 |
Correct |
187 ms |
75736 KB |
Output is correct |
101 |
Correct |
186 ms |
75616 KB |
Output is correct |
102 |
Correct |
201 ms |
75580 KB |
Output is correct |
103 |
Correct |
140 ms |
75292 KB |
Output is correct |
104 |
Correct |
166 ms |
75624 KB |
Output is correct |
105 |
Correct |
186 ms |
75640 KB |
Output is correct |
106 |
Correct |
66 ms |
75668 KB |
Output is correct |
107 |
Correct |
66 ms |
75660 KB |
Output is correct |
108 |
Correct |
99 ms |
75584 KB |
Output is correct |
109 |
Correct |
137 ms |
75344 KB |
Output is correct |
110 |
Correct |
184 ms |
75684 KB |
Output is correct |
111 |
Correct |
179 ms |
75612 KB |
Output is correct |
112 |
Correct |
162 ms |
75312 KB |
Output is correct |
113 |
Correct |
180 ms |
75264 KB |
Output is correct |
114 |
Correct |
173 ms |
75276 KB |
Output is correct |
115 |
Correct |
200 ms |
75420 KB |
Output is correct |
116 |
Correct |
129 ms |
75100 KB |
Output is correct |
117 |
Correct |
195 ms |
75296 KB |
Output is correct |
118 |
Correct |
150 ms |
75216 KB |
Output is correct |
119 |
Correct |
155 ms |
75196 KB |
Output is correct |
120 |
Correct |
184 ms |
75216 KB |
Output is correct |
121 |
Correct |
181 ms |
75264 KB |
Output is correct |
122 |
Correct |
182 ms |
75288 KB |
Output is correct |
123 |
Correct |
189 ms |
75244 KB |
Output is correct |
124 |
Correct |
188 ms |
75212 KB |
Output is correct |
125 |
Correct |
187 ms |
75292 KB |
Output is correct |
126 |
Correct |
100 ms |
75268 KB |
Output is correct |
127 |
Correct |
147 ms |
75336 KB |
Output is correct |
128 |
Correct |
197 ms |
75328 KB |
Output is correct |
129 |
Correct |
145 ms |
75088 KB |
Output is correct |
130 |
Correct |
879 ms |
82976 KB |
Output is correct |
131 |
Correct |
559 ms |
80964 KB |
Output is correct |
132 |
Correct |
793 ms |
82856 KB |
Output is correct |
133 |
Correct |
905 ms |
82896 KB |
Output is correct |
134 |
Correct |
751 ms |
82152 KB |
Output is correct |
135 |
Correct |
974 ms |
83112 KB |
Output is correct |
136 |
Correct |
904 ms |
84660 KB |
Output is correct |
137 |
Correct |
871 ms |
84788 KB |
Output is correct |
138 |
Correct |
800 ms |
83060 KB |
Output is correct |
139 |
Correct |
827 ms |
82936 KB |
Output is correct |
140 |
Correct |
885 ms |
82840 KB |
Output is correct |
141 |
Correct |
906 ms |
82836 KB |
Output is correct |
142 |
Correct |
924 ms |
82804 KB |
Output is correct |
143 |
Correct |
822 ms |
82744 KB |
Output is correct |
144 |
Correct |
871 ms |
82932 KB |
Output is correct |
145 |
Correct |
797 ms |
82884 KB |
Output is correct |
146 |
Correct |
850 ms |
83048 KB |
Output is correct |
147 |
Correct |
861 ms |
83056 KB |
Output is correct |
148 |
Correct |
817 ms |
82880 KB |
Output is correct |
149 |
Correct |
822 ms |
82832 KB |
Output is correct |
150 |
Correct |
282 ms |
82268 KB |
Output is correct |
151 |
Correct |
737 ms |
82560 KB |
Output is correct |
152 |
Correct |
688 ms |
82752 KB |
Output is correct |
153 |
Correct |
580 ms |
82264 KB |
Output is correct |