#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define all(a) (a).begin(), (a).end()
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
using ld = long double;
template<typename T1, typename T2> bool chkmin(T1& x, T2 y) {
return y < x ? (x = y, true) : false;
}
template<typename T1, typename T2> bool chkmax(T1& x, T2 y) {
return y > x ? (x = y, true) : false;
}
void debug_out() {
cerr << endl;
}
template<typename T1, typename... T2> void debug_out(T1 A, T2... B) {
cerr << ' ' << A;
debug_out(B...);
}
template<typename T> void mdebug_out(T* a, int n) {
for (int i = 0; i < n; ++i) cerr << a[i];
cerr << endl;
}
template<typename T> ostream& operator << (ostream& stream, const vector<T>& v) {
for (auto& x : v) {
stream << x << ' ';
}
return stream;
}
template<typename T1, typename T2> ostream& operator << (ostream& stream, const pair<T1, T2>& p) {
return stream << p.first << ' ' << p.second;
}
#ifdef DEBUG
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#define mdebug(a, n) cerr << #a << ": ", mdebug_out(a, n)
#else
#define debug(...) 1337
#define mdebug(a, n) 1337
#endif
const ll INF64 = 1e18;
const int maxN = 250005;
int N, M, Q;
int VL[maxN], VR[maxN], VM[maxN];
vector<int> qb[maxN];
namespace sgt1 {
const int logN = 18;
const int N = 1 << logN;
ll sz[2 * N];
ll fa[2 * N], fb[2 * N];
void apply1(int v, ll d) {
sz[v] += d;
}
void apply2(int v, ll a, ll b) {
ll c = fa[v];
ll d = fb[v];
fa[v] = c + a;
fb[v] = max(d + a, b);
}
void push(int v) {
for (int u : {v << 1, v << 1 | 1}) {
apply1(u, sz[v]);
apply2(u, fa[v], fb[v]);
}
sz[v] = 0;
fa[v] = 0;
fb[v] = -INF64;
}
void apply1(int v, int vl, int vr, int l, int r, ll k) {
if (l > r || vr < l || r < vl) return;
if (l <= vl && vr <= r) {
apply1(v, k);
apply2(v, k, -INF64);
return;
}
int vm = (vl + vr) >> 1;
push(v);
apply1(v << 1, vl, vm, l, r, k);
apply1(v << 1 | 1, vm + 1, vr, l, r, k);
}
void apply2(int v, int vl, int vr, int l, int r, ll k) {
if (l > r || vr < l || r < vl) return;
if (l <= vl && vr <= r) {
apply2(v, -k, 0);
return;
}
int vm = (vl + vr) >> 1;
push(v);
apply2(v << 1, vl, vm, l, r, k);
apply2(v << 1 | 1, vm + 1, vr, l, r, k);
}
pll gt(int v, int vl, int vr, int i) {
if (vl == vr) {
return {sz[v], max(fa[v], fb[v])};
}
int vm = (vl + vr) >> 1;
push(v);
if (i <= vm) {
return gt(v << 1, vl, vm, i);
} else {
return gt(v << 1 | 1, vm + 1, vr, i);
}
}
}
struct Query1 {
int l, r, c, k;
Query1() {}
void read() {
cin >> l >> r >> c >> k;
}
} qr1[maxN];
int qr1_t[maxN];
struct Query3 {
int i;
ll k;
} qr3[maxN];
int qr3_t[maxN];
namespace fnw {
ll f[maxN];
void reset() {
fill(f, f + N + 1, 0);
}
void add(int i, ll d) {
for (; i <= N; i += i & -i) {
f[i] += d;
}
}
void add(int l, int r, ll d) {
add(l, d);
add(r + 1, -d);
}
ll gt(int i) {
ll ans = 0;
for (; i >= 1; i -= i & -i) {
ans += f[i];
}
return ans;
}
}
int32_t main() {
#ifdef DEBUG
freopen("in", "r", stdin);
#endif
ios::sync_with_stdio(0);
cin.tie(0);
cin >> N >> M >> Q;
int T = 0;
int Q1 = 0;
for (int qi = 0; qi < Q; ++qi) {
int tp;
cin >> tp;
if (tp == 1) {
auto& q = qr1[Q1];
q.read();
qr1_t[Q1++] = T;
sgt1::apply1(1, 1, N, q.l, q.r, q.k);
} else if (tp == 2) {
int l, r, k;
cin >> l >> r >> k;
sgt1::apply2(1, 1, N, l, r, k);
} else {
auto& q = qr3[T];
cin >> q.i >> q.k;
--q.k;
qr3_t[T++] = Q1;
auto f = sgt1::gt(1, 1, N, q.i);
q.k += f.fi - f.se;
}
}
for (int i = 0; i < T; ++i) {
VL[i] = -1;
VR[i] = qr3_t[i];
}
while (true) {
bool found = false;
for (int i = 0; i < T; ++i) {
if (VR[i] - VL[i] > 1) {
found = true;
VM[i] = (VL[i] + VR[i]) / 2;
qb[VM[i]].push_back(i);
}
}
if (!found) {
break;
}
fnw::reset();
for (int j = 0; j < Q1; ++j) {
auto& q = qr1[j];
fnw::add(q.l, q.r, q.k);
for (int i : qb[j]) {
if (fnw::gt(qr3[i].i) <= qr3[i].k) {
VL[i] = VM[i];
} else {
VR[i] = VM[i];
}
}
qb[j].clear();
}
}
for (int i = 0; i < T; ++i) {
if (VR[i] == qr3_t[i]) {
cout << "0\n";
} else {
cout << qr1[VR[i]].c << '\n';
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
6348 KB |
Output is correct |
2 |
Correct |
6 ms |
6348 KB |
Output is correct |
3 |
Correct |
5 ms |
6348 KB |
Output is correct |
4 |
Correct |
6 ms |
6348 KB |
Output is correct |
5 |
Correct |
5 ms |
6220 KB |
Output is correct |
6 |
Correct |
6 ms |
6220 KB |
Output is correct |
7 |
Correct |
6 ms |
6444 KB |
Output is correct |
8 |
Correct |
6 ms |
6348 KB |
Output is correct |
9 |
Correct |
6 ms |
6348 KB |
Output is correct |
10 |
Correct |
6 ms |
6348 KB |
Output is correct |
11 |
Correct |
7 ms |
6348 KB |
Output is correct |
12 |
Correct |
6 ms |
6348 KB |
Output is correct |
13 |
Correct |
5 ms |
6348 KB |
Output is correct |
14 |
Correct |
5 ms |
6356 KB |
Output is correct |
15 |
Correct |
5 ms |
6348 KB |
Output is correct |
16 |
Correct |
6 ms |
6376 KB |
Output is correct |
17 |
Correct |
6 ms |
6348 KB |
Output is correct |
18 |
Correct |
6 ms |
6312 KB |
Output is correct |
19 |
Correct |
7 ms |
6348 KB |
Output is correct |
20 |
Correct |
6 ms |
6348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
6348 KB |
Output is correct |
2 |
Correct |
6 ms |
6348 KB |
Output is correct |
3 |
Correct |
5 ms |
6348 KB |
Output is correct |
4 |
Correct |
6 ms |
6348 KB |
Output is correct |
5 |
Correct |
5 ms |
6220 KB |
Output is correct |
6 |
Correct |
6 ms |
6220 KB |
Output is correct |
7 |
Correct |
6 ms |
6444 KB |
Output is correct |
8 |
Correct |
6 ms |
6348 KB |
Output is correct |
9 |
Correct |
6 ms |
6348 KB |
Output is correct |
10 |
Correct |
6 ms |
6348 KB |
Output is correct |
11 |
Correct |
7 ms |
6348 KB |
Output is correct |
12 |
Correct |
6 ms |
6348 KB |
Output is correct |
13 |
Correct |
5 ms |
6348 KB |
Output is correct |
14 |
Correct |
5 ms |
6356 KB |
Output is correct |
15 |
Correct |
5 ms |
6348 KB |
Output is correct |
16 |
Correct |
6 ms |
6376 KB |
Output is correct |
17 |
Correct |
6 ms |
6348 KB |
Output is correct |
18 |
Correct |
6 ms |
6312 KB |
Output is correct |
19 |
Correct |
7 ms |
6348 KB |
Output is correct |
20 |
Correct |
6 ms |
6348 KB |
Output is correct |
21 |
Correct |
6 ms |
6348 KB |
Output is correct |
22 |
Correct |
6 ms |
6348 KB |
Output is correct |
23 |
Correct |
6 ms |
6348 KB |
Output is correct |
24 |
Correct |
6 ms |
6352 KB |
Output is correct |
25 |
Correct |
5 ms |
6220 KB |
Output is correct |
26 |
Correct |
5 ms |
6220 KB |
Output is correct |
27 |
Correct |
6 ms |
6348 KB |
Output is correct |
28 |
Correct |
8 ms |
6348 KB |
Output is correct |
29 |
Correct |
6 ms |
6348 KB |
Output is correct |
30 |
Correct |
6 ms |
6348 KB |
Output is correct |
31 |
Correct |
6 ms |
6348 KB |
Output is correct |
32 |
Correct |
6 ms |
6348 KB |
Output is correct |
33 |
Correct |
5 ms |
6352 KB |
Output is correct |
34 |
Correct |
5 ms |
6348 KB |
Output is correct |
35 |
Correct |
6 ms |
6348 KB |
Output is correct |
36 |
Correct |
6 ms |
6348 KB |
Output is correct |
37 |
Correct |
6 ms |
6348 KB |
Output is correct |
38 |
Correct |
7 ms |
6348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
90 ms |
11872 KB |
Output is correct |
2 |
Correct |
95 ms |
13252 KB |
Output is correct |
3 |
Correct |
95 ms |
12948 KB |
Output is correct |
4 |
Correct |
93 ms |
13036 KB |
Output is correct |
5 |
Correct |
99 ms |
13244 KB |
Output is correct |
6 |
Correct |
98 ms |
13252 KB |
Output is correct |
7 |
Correct |
35 ms |
8788 KB |
Output is correct |
8 |
Correct |
42 ms |
8924 KB |
Output is correct |
9 |
Correct |
96 ms |
13372 KB |
Output is correct |
10 |
Correct |
91 ms |
12980 KB |
Output is correct |
11 |
Correct |
100 ms |
13252 KB |
Output is correct |
12 |
Correct |
115 ms |
12996 KB |
Output is correct |
13 |
Correct |
88 ms |
12844 KB |
Output is correct |
14 |
Correct |
99 ms |
13436 KB |
Output is correct |
15 |
Correct |
102 ms |
13888 KB |
Output is correct |
16 |
Correct |
108 ms |
14016 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
483 ms |
27160 KB |
Output is correct |
2 |
Correct |
378 ms |
29932 KB |
Output is correct |
3 |
Correct |
553 ms |
34024 KB |
Output is correct |
4 |
Correct |
440 ms |
30940 KB |
Output is correct |
5 |
Correct |
438 ms |
30728 KB |
Output is correct |
6 |
Correct |
633 ms |
35012 KB |
Output is correct |
7 |
Correct |
147 ms |
17860 KB |
Output is correct |
8 |
Correct |
157 ms |
17860 KB |
Output is correct |
9 |
Correct |
709 ms |
37604 KB |
Output is correct |
10 |
Correct |
723 ms |
37616 KB |
Output is correct |
11 |
Correct |
589 ms |
35624 KB |
Output is correct |
12 |
Correct |
600 ms |
33728 KB |
Output is correct |
13 |
Correct |
546 ms |
35524 KB |
Output is correct |
14 |
Correct |
556 ms |
33896 KB |
Output is correct |
15 |
Correct |
569 ms |
33860 KB |
Output is correct |
16 |
Correct |
552 ms |
34276 KB |
Output is correct |
17 |
Correct |
559 ms |
33672 KB |
Output is correct |
18 |
Correct |
560 ms |
34596 KB |
Output is correct |
19 |
Correct |
551 ms |
33604 KB |
Output is correct |
20 |
Correct |
550 ms |
34696 KB |
Output is correct |
21 |
Correct |
560 ms |
33576 KB |
Output is correct |
22 |
Correct |
544 ms |
33696 KB |
Output is correct |
23 |
Correct |
561 ms |
33868 KB |
Output is correct |
24 |
Correct |
554 ms |
33596 KB |
Output is correct |
25 |
Correct |
434 ms |
33092 KB |
Output is correct |
26 |
Correct |
467 ms |
33752 KB |
Output is correct |
27 |
Correct |
509 ms |
35780 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
6348 KB |
Output is correct |
2 |
Correct |
6 ms |
6348 KB |
Output is correct |
3 |
Correct |
5 ms |
6348 KB |
Output is correct |
4 |
Correct |
6 ms |
6348 KB |
Output is correct |
5 |
Correct |
5 ms |
6220 KB |
Output is correct |
6 |
Correct |
6 ms |
6220 KB |
Output is correct |
7 |
Correct |
6 ms |
6444 KB |
Output is correct |
8 |
Correct |
6 ms |
6348 KB |
Output is correct |
9 |
Correct |
6 ms |
6348 KB |
Output is correct |
10 |
Correct |
6 ms |
6348 KB |
Output is correct |
11 |
Correct |
7 ms |
6348 KB |
Output is correct |
12 |
Correct |
6 ms |
6348 KB |
Output is correct |
13 |
Correct |
5 ms |
6348 KB |
Output is correct |
14 |
Correct |
5 ms |
6356 KB |
Output is correct |
15 |
Correct |
5 ms |
6348 KB |
Output is correct |
16 |
Correct |
6 ms |
6376 KB |
Output is correct |
17 |
Correct |
6 ms |
6348 KB |
Output is correct |
18 |
Correct |
6 ms |
6312 KB |
Output is correct |
19 |
Correct |
7 ms |
6348 KB |
Output is correct |
20 |
Correct |
6 ms |
6348 KB |
Output is correct |
21 |
Correct |
90 ms |
11872 KB |
Output is correct |
22 |
Correct |
95 ms |
13252 KB |
Output is correct |
23 |
Correct |
95 ms |
12948 KB |
Output is correct |
24 |
Correct |
93 ms |
13036 KB |
Output is correct |
25 |
Correct |
99 ms |
13244 KB |
Output is correct |
26 |
Correct |
98 ms |
13252 KB |
Output is correct |
27 |
Correct |
35 ms |
8788 KB |
Output is correct |
28 |
Correct |
42 ms |
8924 KB |
Output is correct |
29 |
Correct |
96 ms |
13372 KB |
Output is correct |
30 |
Correct |
91 ms |
12980 KB |
Output is correct |
31 |
Correct |
100 ms |
13252 KB |
Output is correct |
32 |
Correct |
115 ms |
12996 KB |
Output is correct |
33 |
Correct |
88 ms |
12844 KB |
Output is correct |
34 |
Correct |
99 ms |
13436 KB |
Output is correct |
35 |
Correct |
102 ms |
13888 KB |
Output is correct |
36 |
Correct |
108 ms |
14016 KB |
Output is correct |
37 |
Correct |
87 ms |
12416 KB |
Output is correct |
38 |
Correct |
88 ms |
12356 KB |
Output is correct |
39 |
Correct |
28 ms |
8256 KB |
Output is correct |
40 |
Correct |
35 ms |
8600 KB |
Output is correct |
41 |
Correct |
101 ms |
13332 KB |
Output is correct |
42 |
Correct |
101 ms |
12740 KB |
Output is correct |
43 |
Correct |
102 ms |
12736 KB |
Output is correct |
44 |
Correct |
103 ms |
13000 KB |
Output is correct |
45 |
Correct |
103 ms |
12740 KB |
Output is correct |
46 |
Correct |
101 ms |
12740 KB |
Output is correct |
47 |
Correct |
59 ms |
12760 KB |
Output is correct |
48 |
Correct |
93 ms |
12848 KB |
Output is correct |
49 |
Correct |
70 ms |
11716 KB |
Output is correct |
50 |
Correct |
99 ms |
12216 KB |
Output is correct |
51 |
Correct |
99 ms |
12636 KB |
Output is correct |
52 |
Correct |
108 ms |
12656 KB |
Output is correct |
53 |
Correct |
87 ms |
12960 KB |
Output is correct |
54 |
Correct |
109 ms |
14020 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
113 ms |
12404 KB |
Output is correct |
2 |
Correct |
119 ms |
14216 KB |
Output is correct |
3 |
Correct |
132 ms |
14388 KB |
Output is correct |
4 |
Correct |
92 ms |
12992 KB |
Output is correct |
5 |
Correct |
108 ms |
13660 KB |
Output is correct |
6 |
Correct |
125 ms |
14324 KB |
Output is correct |
7 |
Correct |
50 ms |
10012 KB |
Output is correct |
8 |
Correct |
47 ms |
9672 KB |
Output is correct |
9 |
Correct |
92 ms |
14308 KB |
Output is correct |
10 |
Correct |
81 ms |
12868 KB |
Output is correct |
11 |
Correct |
116 ms |
14404 KB |
Output is correct |
12 |
Correct |
120 ms |
14332 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
6348 KB |
Output is correct |
2 |
Correct |
6 ms |
6348 KB |
Output is correct |
3 |
Correct |
5 ms |
6348 KB |
Output is correct |
4 |
Correct |
6 ms |
6348 KB |
Output is correct |
5 |
Correct |
5 ms |
6220 KB |
Output is correct |
6 |
Correct |
6 ms |
6220 KB |
Output is correct |
7 |
Correct |
6 ms |
6444 KB |
Output is correct |
8 |
Correct |
6 ms |
6348 KB |
Output is correct |
9 |
Correct |
6 ms |
6348 KB |
Output is correct |
10 |
Correct |
6 ms |
6348 KB |
Output is correct |
11 |
Correct |
7 ms |
6348 KB |
Output is correct |
12 |
Correct |
6 ms |
6348 KB |
Output is correct |
13 |
Correct |
5 ms |
6348 KB |
Output is correct |
14 |
Correct |
5 ms |
6356 KB |
Output is correct |
15 |
Correct |
5 ms |
6348 KB |
Output is correct |
16 |
Correct |
6 ms |
6376 KB |
Output is correct |
17 |
Correct |
6 ms |
6348 KB |
Output is correct |
18 |
Correct |
6 ms |
6312 KB |
Output is correct |
19 |
Correct |
7 ms |
6348 KB |
Output is correct |
20 |
Correct |
6 ms |
6348 KB |
Output is correct |
21 |
Correct |
6 ms |
6348 KB |
Output is correct |
22 |
Correct |
6 ms |
6348 KB |
Output is correct |
23 |
Correct |
6 ms |
6348 KB |
Output is correct |
24 |
Correct |
6 ms |
6352 KB |
Output is correct |
25 |
Correct |
5 ms |
6220 KB |
Output is correct |
26 |
Correct |
5 ms |
6220 KB |
Output is correct |
27 |
Correct |
6 ms |
6348 KB |
Output is correct |
28 |
Correct |
8 ms |
6348 KB |
Output is correct |
29 |
Correct |
6 ms |
6348 KB |
Output is correct |
30 |
Correct |
6 ms |
6348 KB |
Output is correct |
31 |
Correct |
6 ms |
6348 KB |
Output is correct |
32 |
Correct |
6 ms |
6348 KB |
Output is correct |
33 |
Correct |
5 ms |
6352 KB |
Output is correct |
34 |
Correct |
5 ms |
6348 KB |
Output is correct |
35 |
Correct |
6 ms |
6348 KB |
Output is correct |
36 |
Correct |
6 ms |
6348 KB |
Output is correct |
37 |
Correct |
6 ms |
6348 KB |
Output is correct |
38 |
Correct |
7 ms |
6348 KB |
Output is correct |
39 |
Correct |
90 ms |
11872 KB |
Output is correct |
40 |
Correct |
95 ms |
13252 KB |
Output is correct |
41 |
Correct |
95 ms |
12948 KB |
Output is correct |
42 |
Correct |
93 ms |
13036 KB |
Output is correct |
43 |
Correct |
99 ms |
13244 KB |
Output is correct |
44 |
Correct |
98 ms |
13252 KB |
Output is correct |
45 |
Correct |
35 ms |
8788 KB |
Output is correct |
46 |
Correct |
42 ms |
8924 KB |
Output is correct |
47 |
Correct |
96 ms |
13372 KB |
Output is correct |
48 |
Correct |
91 ms |
12980 KB |
Output is correct |
49 |
Correct |
100 ms |
13252 KB |
Output is correct |
50 |
Correct |
115 ms |
12996 KB |
Output is correct |
51 |
Correct |
88 ms |
12844 KB |
Output is correct |
52 |
Correct |
99 ms |
13436 KB |
Output is correct |
53 |
Correct |
102 ms |
13888 KB |
Output is correct |
54 |
Correct |
108 ms |
14016 KB |
Output is correct |
55 |
Correct |
87 ms |
12416 KB |
Output is correct |
56 |
Correct |
88 ms |
12356 KB |
Output is correct |
57 |
Correct |
28 ms |
8256 KB |
Output is correct |
58 |
Correct |
35 ms |
8600 KB |
Output is correct |
59 |
Correct |
101 ms |
13332 KB |
Output is correct |
60 |
Correct |
101 ms |
12740 KB |
Output is correct |
61 |
Correct |
102 ms |
12736 KB |
Output is correct |
62 |
Correct |
103 ms |
13000 KB |
Output is correct |
63 |
Correct |
103 ms |
12740 KB |
Output is correct |
64 |
Correct |
101 ms |
12740 KB |
Output is correct |
65 |
Correct |
59 ms |
12760 KB |
Output is correct |
66 |
Correct |
93 ms |
12848 KB |
Output is correct |
67 |
Correct |
70 ms |
11716 KB |
Output is correct |
68 |
Correct |
99 ms |
12216 KB |
Output is correct |
69 |
Correct |
99 ms |
12636 KB |
Output is correct |
70 |
Correct |
108 ms |
12656 KB |
Output is correct |
71 |
Correct |
87 ms |
12960 KB |
Output is correct |
72 |
Correct |
109 ms |
14020 KB |
Output is correct |
73 |
Correct |
113 ms |
12404 KB |
Output is correct |
74 |
Correct |
119 ms |
14216 KB |
Output is correct |
75 |
Correct |
132 ms |
14388 KB |
Output is correct |
76 |
Correct |
92 ms |
12992 KB |
Output is correct |
77 |
Correct |
108 ms |
13660 KB |
Output is correct |
78 |
Correct |
125 ms |
14324 KB |
Output is correct |
79 |
Correct |
50 ms |
10012 KB |
Output is correct |
80 |
Correct |
47 ms |
9672 KB |
Output is correct |
81 |
Correct |
92 ms |
14308 KB |
Output is correct |
82 |
Correct |
81 ms |
12868 KB |
Output is correct |
83 |
Correct |
116 ms |
14404 KB |
Output is correct |
84 |
Correct |
120 ms |
14332 KB |
Output is correct |
85 |
Correct |
106 ms |
12868 KB |
Output is correct |
86 |
Correct |
102 ms |
13300 KB |
Output is correct |
87 |
Correct |
104 ms |
13140 KB |
Output is correct |
88 |
Correct |
116 ms |
13644 KB |
Output is correct |
89 |
Correct |
75 ms |
12332 KB |
Output is correct |
90 |
Correct |
108 ms |
13252 KB |
Output is correct |
91 |
Correct |
86 ms |
12484 KB |
Output is correct |
92 |
Correct |
80 ms |
12320 KB |
Output is correct |
93 |
Correct |
102 ms |
13252 KB |
Output is correct |
94 |
Correct |
109 ms |
13552 KB |
Output is correct |
95 |
Correct |
119 ms |
13184 KB |
Output is correct |
96 |
Correct |
105 ms |
13260 KB |
Output is correct |
97 |
Correct |
110 ms |
13292 KB |
Output is correct |
98 |
Correct |
95 ms |
12620 KB |
Output is correct |
99 |
Correct |
65 ms |
13220 KB |
Output is correct |
100 |
Correct |
91 ms |
12636 KB |
Output is correct |
101 |
Correct |
108 ms |
13260 KB |
Output is correct |
102 |
Correct |
109 ms |
13884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
6348 KB |
Output is correct |
2 |
Correct |
6 ms |
6348 KB |
Output is correct |
3 |
Correct |
5 ms |
6348 KB |
Output is correct |
4 |
Correct |
6 ms |
6348 KB |
Output is correct |
5 |
Correct |
5 ms |
6220 KB |
Output is correct |
6 |
Correct |
6 ms |
6220 KB |
Output is correct |
7 |
Correct |
6 ms |
6444 KB |
Output is correct |
8 |
Correct |
6 ms |
6348 KB |
Output is correct |
9 |
Correct |
6 ms |
6348 KB |
Output is correct |
10 |
Correct |
6 ms |
6348 KB |
Output is correct |
11 |
Correct |
7 ms |
6348 KB |
Output is correct |
12 |
Correct |
6 ms |
6348 KB |
Output is correct |
13 |
Correct |
5 ms |
6348 KB |
Output is correct |
14 |
Correct |
5 ms |
6356 KB |
Output is correct |
15 |
Correct |
5 ms |
6348 KB |
Output is correct |
16 |
Correct |
6 ms |
6376 KB |
Output is correct |
17 |
Correct |
6 ms |
6348 KB |
Output is correct |
18 |
Correct |
6 ms |
6312 KB |
Output is correct |
19 |
Correct |
7 ms |
6348 KB |
Output is correct |
20 |
Correct |
6 ms |
6348 KB |
Output is correct |
21 |
Correct |
6 ms |
6348 KB |
Output is correct |
22 |
Correct |
6 ms |
6348 KB |
Output is correct |
23 |
Correct |
6 ms |
6348 KB |
Output is correct |
24 |
Correct |
6 ms |
6352 KB |
Output is correct |
25 |
Correct |
5 ms |
6220 KB |
Output is correct |
26 |
Correct |
5 ms |
6220 KB |
Output is correct |
27 |
Correct |
6 ms |
6348 KB |
Output is correct |
28 |
Correct |
8 ms |
6348 KB |
Output is correct |
29 |
Correct |
6 ms |
6348 KB |
Output is correct |
30 |
Correct |
6 ms |
6348 KB |
Output is correct |
31 |
Correct |
6 ms |
6348 KB |
Output is correct |
32 |
Correct |
6 ms |
6348 KB |
Output is correct |
33 |
Correct |
5 ms |
6352 KB |
Output is correct |
34 |
Correct |
5 ms |
6348 KB |
Output is correct |
35 |
Correct |
6 ms |
6348 KB |
Output is correct |
36 |
Correct |
6 ms |
6348 KB |
Output is correct |
37 |
Correct |
6 ms |
6348 KB |
Output is correct |
38 |
Correct |
7 ms |
6348 KB |
Output is correct |
39 |
Correct |
90 ms |
11872 KB |
Output is correct |
40 |
Correct |
95 ms |
13252 KB |
Output is correct |
41 |
Correct |
95 ms |
12948 KB |
Output is correct |
42 |
Correct |
93 ms |
13036 KB |
Output is correct |
43 |
Correct |
99 ms |
13244 KB |
Output is correct |
44 |
Correct |
98 ms |
13252 KB |
Output is correct |
45 |
Correct |
35 ms |
8788 KB |
Output is correct |
46 |
Correct |
42 ms |
8924 KB |
Output is correct |
47 |
Correct |
96 ms |
13372 KB |
Output is correct |
48 |
Correct |
91 ms |
12980 KB |
Output is correct |
49 |
Correct |
100 ms |
13252 KB |
Output is correct |
50 |
Correct |
115 ms |
12996 KB |
Output is correct |
51 |
Correct |
88 ms |
12844 KB |
Output is correct |
52 |
Correct |
99 ms |
13436 KB |
Output is correct |
53 |
Correct |
102 ms |
13888 KB |
Output is correct |
54 |
Correct |
108 ms |
14016 KB |
Output is correct |
55 |
Correct |
483 ms |
27160 KB |
Output is correct |
56 |
Correct |
378 ms |
29932 KB |
Output is correct |
57 |
Correct |
553 ms |
34024 KB |
Output is correct |
58 |
Correct |
440 ms |
30940 KB |
Output is correct |
59 |
Correct |
438 ms |
30728 KB |
Output is correct |
60 |
Correct |
633 ms |
35012 KB |
Output is correct |
61 |
Correct |
147 ms |
17860 KB |
Output is correct |
62 |
Correct |
157 ms |
17860 KB |
Output is correct |
63 |
Correct |
709 ms |
37604 KB |
Output is correct |
64 |
Correct |
723 ms |
37616 KB |
Output is correct |
65 |
Correct |
589 ms |
35624 KB |
Output is correct |
66 |
Correct |
600 ms |
33728 KB |
Output is correct |
67 |
Correct |
546 ms |
35524 KB |
Output is correct |
68 |
Correct |
556 ms |
33896 KB |
Output is correct |
69 |
Correct |
569 ms |
33860 KB |
Output is correct |
70 |
Correct |
552 ms |
34276 KB |
Output is correct |
71 |
Correct |
559 ms |
33672 KB |
Output is correct |
72 |
Correct |
560 ms |
34596 KB |
Output is correct |
73 |
Correct |
551 ms |
33604 KB |
Output is correct |
74 |
Correct |
550 ms |
34696 KB |
Output is correct |
75 |
Correct |
560 ms |
33576 KB |
Output is correct |
76 |
Correct |
544 ms |
33696 KB |
Output is correct |
77 |
Correct |
561 ms |
33868 KB |
Output is correct |
78 |
Correct |
554 ms |
33596 KB |
Output is correct |
79 |
Correct |
434 ms |
33092 KB |
Output is correct |
80 |
Correct |
467 ms |
33752 KB |
Output is correct |
81 |
Correct |
509 ms |
35780 KB |
Output is correct |
82 |
Correct |
87 ms |
12416 KB |
Output is correct |
83 |
Correct |
88 ms |
12356 KB |
Output is correct |
84 |
Correct |
28 ms |
8256 KB |
Output is correct |
85 |
Correct |
35 ms |
8600 KB |
Output is correct |
86 |
Correct |
101 ms |
13332 KB |
Output is correct |
87 |
Correct |
101 ms |
12740 KB |
Output is correct |
88 |
Correct |
102 ms |
12736 KB |
Output is correct |
89 |
Correct |
103 ms |
13000 KB |
Output is correct |
90 |
Correct |
103 ms |
12740 KB |
Output is correct |
91 |
Correct |
101 ms |
12740 KB |
Output is correct |
92 |
Correct |
59 ms |
12760 KB |
Output is correct |
93 |
Correct |
93 ms |
12848 KB |
Output is correct |
94 |
Correct |
70 ms |
11716 KB |
Output is correct |
95 |
Correct |
99 ms |
12216 KB |
Output is correct |
96 |
Correct |
99 ms |
12636 KB |
Output is correct |
97 |
Correct |
108 ms |
12656 KB |
Output is correct |
98 |
Correct |
87 ms |
12960 KB |
Output is correct |
99 |
Correct |
109 ms |
14020 KB |
Output is correct |
100 |
Correct |
113 ms |
12404 KB |
Output is correct |
101 |
Correct |
119 ms |
14216 KB |
Output is correct |
102 |
Correct |
132 ms |
14388 KB |
Output is correct |
103 |
Correct |
92 ms |
12992 KB |
Output is correct |
104 |
Correct |
108 ms |
13660 KB |
Output is correct |
105 |
Correct |
125 ms |
14324 KB |
Output is correct |
106 |
Correct |
50 ms |
10012 KB |
Output is correct |
107 |
Correct |
47 ms |
9672 KB |
Output is correct |
108 |
Correct |
92 ms |
14308 KB |
Output is correct |
109 |
Correct |
81 ms |
12868 KB |
Output is correct |
110 |
Correct |
116 ms |
14404 KB |
Output is correct |
111 |
Correct |
120 ms |
14332 KB |
Output is correct |
112 |
Correct |
106 ms |
12868 KB |
Output is correct |
113 |
Correct |
102 ms |
13300 KB |
Output is correct |
114 |
Correct |
104 ms |
13140 KB |
Output is correct |
115 |
Correct |
116 ms |
13644 KB |
Output is correct |
116 |
Correct |
75 ms |
12332 KB |
Output is correct |
117 |
Correct |
108 ms |
13252 KB |
Output is correct |
118 |
Correct |
86 ms |
12484 KB |
Output is correct |
119 |
Correct |
80 ms |
12320 KB |
Output is correct |
120 |
Correct |
102 ms |
13252 KB |
Output is correct |
121 |
Correct |
109 ms |
13552 KB |
Output is correct |
122 |
Correct |
119 ms |
13184 KB |
Output is correct |
123 |
Correct |
105 ms |
13260 KB |
Output is correct |
124 |
Correct |
110 ms |
13292 KB |
Output is correct |
125 |
Correct |
95 ms |
12620 KB |
Output is correct |
126 |
Correct |
65 ms |
13220 KB |
Output is correct |
127 |
Correct |
91 ms |
12636 KB |
Output is correct |
128 |
Correct |
108 ms |
13260 KB |
Output is correct |
129 |
Correct |
109 ms |
13884 KB |
Output is correct |
130 |
Correct |
568 ms |
34488 KB |
Output is correct |
131 |
Correct |
386 ms |
30160 KB |
Output is correct |
132 |
Correct |
546 ms |
34764 KB |
Output is correct |
133 |
Correct |
631 ms |
35104 KB |
Output is correct |
134 |
Correct |
563 ms |
33408 KB |
Output is correct |
135 |
Correct |
709 ms |
35972 KB |
Output is correct |
136 |
Correct |
791 ms |
38416 KB |
Output is correct |
137 |
Correct |
737 ms |
38328 KB |
Output is correct |
138 |
Correct |
632 ms |
36420 KB |
Output is correct |
139 |
Correct |
613 ms |
34424 KB |
Output is correct |
140 |
Correct |
593 ms |
36368 KB |
Output is correct |
141 |
Correct |
555 ms |
34412 KB |
Output is correct |
142 |
Correct |
596 ms |
34892 KB |
Output is correct |
143 |
Correct |
583 ms |
34296 KB |
Output is correct |
144 |
Correct |
588 ms |
35176 KB |
Output is correct |
145 |
Correct |
772 ms |
34324 KB |
Output is correct |
146 |
Correct |
574 ms |
35292 KB |
Output is correct |
147 |
Correct |
695 ms |
34268 KB |
Output is correct |
148 |
Correct |
603 ms |
34484 KB |
Output is correct |
149 |
Correct |
609 ms |
34244 KB |
Output is correct |
150 |
Correct |
313 ms |
34012 KB |
Output is correct |
151 |
Correct |
492 ms |
34388 KB |
Output is correct |
152 |
Correct |
466 ms |
34452 KB |
Output is correct |
153 |
Correct |
664 ms |
36684 KB |
Output is correct |