#include <bits/stdc++.h>
#define pb push_back
#define pll pair <ll, ll>
#define MOMI using namespace std;
#define mp make_pair
#define pyshnapyshnakaa ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
#pragma optimize("TKACHENKO-GORYACHENKO")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
typedef int ll;
typedef long double ld;
using namespace std;
const ll inf = 2e9 + 500;
const ll maxn = 2e5 + 100;
const ll block = 100;
const ll block_sz = (maxn + block - 1) / block;
ll n, m, k, t;
struct seg{
ll l;
ll r;
inline ll sz() const {
return r - l + 1;
}
ll i;
};
inline bool operator==(seg a, seg b) {
return a.i == b.i;
}
vector <seg> S;
vector <seg> lasts;
inline bool cmpl(const ll& a, const ll& b) {
return S[a].l < S[b].l;
}
inline bool cmpr(const ll& a, const ll& b) {
return S[a].r < S[b].r;
}
inline bool cmpsz(const ll& a, const ll& b) {
return S[a].sz() < S[b].sz();
}
vector <ll> segs;
vector <ll> R[block];
vector <ll> L[block];
ll MNL[block];
ll MXL[block];
ll MNR[block];
ll MXR[block];
ll IL[maxn];
ll IR[maxn];
bool used[maxn];
inline void buildL(ll q) {
ll w;
sort(L[q].begin(), L[q].end(), cmpsz);
MNL[q] = inf;
MXL[q] = -inf;
for (w = 0; w < L[q].size(); w++) {
MNL[q] = min(MNL[q], S[L[q][w]].l);
MXL[q] = max(MXL[q], S[L[q][w]].l);
}
}
inline void buildR(ll q) {
ll w;
MNR[q] = inf;
MXR[q] = -inf;
sort(R[q].begin(), R[q].end(), cmpsz);
for (w = 0; w < R[q].size(); w++) {
MNR[q] = min(MNR[q], S[R[q][w]].r);
MXR[q] = max(MXR[q], S[R[q][w]].r);
}
}
inline void rebuild() {
ll q, w;
lasts.clear();
ll blocki = 0;
for (q = 0; q < block; q++) {
R[q].clear();
L[q].clear();
}
sort(segs.begin(), segs.end(), cmpl);
for (auto p : segs) {
IL[p] = -1;
if (used[p]) {
continue;
}
if (L[blocki].size() > block_sz) {
blocki++;
}
IL[p] = blocki;
L[blocki].pb(p);
}
blocki = 0;
sort(segs.begin(), segs.end(), cmpr);
for (auto p: segs) {
IR[p] = -1;
if (used[p]) {
continue;
}
if (R[blocki].size() > block_sz) {
blocki++;
}
IR[p] = blocki;
R[blocki].pb(p);
}
for (q = 0; q < block; q++) {
buildL(q);
}
for (q = 0; q < block; q++) {
buildR(q);
}
}
inline void add(seg a) {
lasts.pb(a);
S.pb(a);
segs.push_back(a.i);
IL[a.i] = IR[a.i] = -1;
}
inline void del(seg b) {
ll il = IL[b.i], ir = IR[b.i];
used[b.i] = 1;
if (il == -1) {
return;
}
L[il].erase(find(L[il].begin(), L[il].end(), b.i));
R[ir].erase(find(R[ir].begin(), R[ir].end(), b.i));
buildL(il);
buildR(ir);
}
inline ll slowL(ll i, ll x, ll l) {
ll q;
ll ans = 0;
for (q = 0; q < L[i].size(); q++) {
if (S[L[i][q]].l >= l && S[L[i][q]].sz() >= x) {
ans++;
}
}
return ans;
}
inline ll slowR(ll i, ll x, ll r) {
ll q;
ll ans = 0;
for (q = 0; q < R[i].size(); q++) {
if (S[R[i][q]].r <= r && S[R[i][q]].sz() >= x) {
ans++;
}
}
return ans;
}
inline ll fastL(ll i, ll x) {
if (L[i].empty()) {
return 0;
}
seg good;
good.l = 0; good.r = x - 1;
S.pb(good);
ll j = (lower_bound(L[i].begin(), L[i].end(), S.size() - 1, cmpsz) - L[i].begin());
S.pop_back();
return (ll)L[i].size() - j;
}
inline ll fastR(ll i, ll x) {
if (R[i].empty()) {
return 0;
}
seg good;
good.l = 0; good.r = x - 1;
S.pb(good);
ll j = (lower_bound(R[i].begin(), R[i].end(), S.size() - 1, cmpsz) - R[i].begin());
S.pop_back();
return (ll)R[i].size() - j;
}
inline ll getansL(ll x, ll l) {
ll q;
ll ans = 0;
for (q = 0; q < block; q++) {
if (MNL[q] == inf) {
continue;
}
if (MNL[q] >= l) {
ans += fastL(q, x);
continue;
}
if (MXL[q] < l) {
continue;
}
if (MNL[q] < l) {
ans += slowL(q, x, l);
}
}
for (q = 0; q < lasts.size(); q++) {
if (used[lasts[q].i]) {
continue;
}
if (lasts[q].l >= l && lasts[q].sz() >= x) {
ans++;
}
}
return ans;
}
inline ll getansR(ll x, ll r) {
ll q;
ll ans = 0;
ll cnt = 0;
for (q = 0; q < block; q++) {
if (MNR[q] == inf) {
continue;
}
// if (q > 1) {
// if (MXR[q - 1] > MNR[q]) {
// exit(-1);
// }
// }
if (MXR[q] <= r) {
ll dans = fastR(q, x);
ans += dans;
continue;
}
if (MNR[q] > r) {
continue;
}
/// MXR[q] > r && MNR[q] <= r,
ll dans = slowR(q, x, r);
ans += dans;
cnt++;
}
// if (cnt > 5) {
// exit(-1);
// }
for (q = 0; q < lasts.size(); q++) {
if (used[lasts[q].i]) {
continue;
}
if (lasts[q].r <= r && lasts[q].sz() >= x) {
ans++;
}
}
return ans;
}
inline ll answer(seg c, ll k) {
if (c.sz() < k) {
return 0;
}
ll q, w;
ll ans = 0;
ll lk = c.r - k + 2, rk = c.l + k - 2;
ll allans = getansR(k, inf);
ll dansl = getansL(k, lk);
ll dansr = getansR(k, rk);
ans = allans - dansr - dansl;
return ans;
}
signed main() {
ll q, w, e, a, b, c;
pyshnapyshnakaa;
cin >> n >> t;
// cout << block_sz * block << endl;
ll nxt = 0;
ll lastans = 0;
ll cnt3 = 0;
for (q = 0; q < block; q++) {
L[q].reserve(block_sz);
R[q].reserve(block_sz);
}
for (q = 0; q < n; q++) {
ll comm;
cin >> comm;
ll l, r;
seg x;
if (comm == 1) {
cin >> l >> r;
l ^= (lastans * t);
r ^= (lastans * t);
if (l > r) {
swap(l, r);
}
x.l = l; x.r = r;
x.i = S.size();
add(x);
}
if (comm == 2) {
cin >> a;
a--;
del(S[a]);
}
// if (cnt3 > 8e4 && n > 1e5) {
// exit(-1);
// }
if (comm == 3) {
cnt3++;
cin >> l >> r;
l ^= (lastans * t);
r ^= (lastans * t);
if (lasts.size() >= block_sz) {
rebuild();
}
if (l > r) {
swap(l, r);
}
x.l = l; x.r = r;
cin >> c;
lastans = answer(x, c);
cout << lastans << '\n';
}
}
return 0;
}
Compilation message
segments.cpp:7:0: warning: ignoring #pragma optimize [-Wunknown-pragmas]
#pragma optimize("TKACHENKO-GORYACHENKO")
segments.cpp: In function 'void buildL(ll)':
segments.cpp:75:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (w = 0; w < L[q].size(); w++) {
~~^~~~~~~~~~~~~
segments.cpp: In function 'void buildR(ll)':
segments.cpp:86:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (w = 0; w < R[q].size(); w++) {
~~^~~~~~~~~~~~~
segments.cpp: In function 'void rebuild()':
segments.cpp:93:8: warning: unused variable 'w' [-Wunused-variable]
ll q, w;
^
segments.cpp: In function 'll slowL(ll, ll, ll)':
segments.cpp:155:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (q = 0; q < L[i].size(); q++) {
~~^~~~~~~~~~~~~
segments.cpp: In function 'll slowR(ll, ll, ll)':
segments.cpp:166:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (q = 0; q < R[i].size(); q++) {
~~^~~~~~~~~~~~~
segments.cpp: In function 'll getansL(ll, ll)':
segments.cpp:217:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (q = 0; q < lasts.size(); q++) {
~~^~~~~~~~~~~~~~
segments.cpp: In function 'll getansR(ll, ll)':
segments.cpp:257:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (q = 0; q < lasts.size(); q++) {
~~^~~~~~~~~~~~~~
segments.cpp: In function 'll answer(seg, ll)':
segments.cpp:272:5: warning: unused variable 'q' [-Wunused-variable]
ll q, w;
^
segments.cpp:272:8: warning: unused variable 'w' [-Wunused-variable]
ll q, w;
^
segments.cpp: In function 'int main()':
segments.cpp:283:8: warning: unused variable 'w' [-Wunused-variable]
ll q, w, e, a, b, c;
^
segments.cpp:283:11: warning: unused variable 'e' [-Wunused-variable]
ll q, w, e, a, b, c;
^
segments.cpp:283:17: warning: unused variable 'b' [-Wunused-variable]
ll q, w, e, a, b, c;
^
segments.cpp:287:5: warning: unused variable 'nxt' [-Wunused-variable]
ll nxt = 0;
^~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
1144 KB |
Output is correct |
2 |
Correct |
3 ms |
1148 KB |
Output is correct |
3 |
Correct |
9 ms |
1272 KB |
Output is correct |
4 |
Correct |
9 ms |
1400 KB |
Output is correct |
5 |
Correct |
21 ms |
1532 KB |
Output is correct |
6 |
Correct |
25 ms |
1400 KB |
Output is correct |
7 |
Correct |
40 ms |
1400 KB |
Output is correct |
8 |
Correct |
88 ms |
1404 KB |
Output is correct |
9 |
Correct |
98 ms |
1528 KB |
Output is correct |
10 |
Correct |
41 ms |
1628 KB |
Output is correct |
11 |
Correct |
38 ms |
1400 KB |
Output is correct |
12 |
Correct |
38 ms |
1400 KB |
Output is correct |
13 |
Correct |
42 ms |
1528 KB |
Output is correct |
14 |
Correct |
107 ms |
1400 KB |
Output is correct |
15 |
Correct |
9 ms |
1400 KB |
Output is correct |
16 |
Correct |
12 ms |
1400 KB |
Output is correct |
17 |
Correct |
104 ms |
1432 KB |
Output is correct |
18 |
Correct |
77 ms |
1512 KB |
Output is correct |
19 |
Correct |
63 ms |
1528 KB |
Output is correct |
20 |
Correct |
74 ms |
1400 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1807 ms |
4672 KB |
Output is correct |
2 |
Correct |
1818 ms |
4808 KB |
Output is correct |
3 |
Correct |
1815 ms |
4916 KB |
Output is correct |
4 |
Correct |
1889 ms |
4908 KB |
Output is correct |
5 |
Correct |
356 ms |
6564 KB |
Output is correct |
6 |
Correct |
227 ms |
6436 KB |
Output is correct |
7 |
Correct |
1838 ms |
4796 KB |
Output is correct |
8 |
Correct |
1815 ms |
4904 KB |
Output is correct |
9 |
Correct |
1841 ms |
5040 KB |
Output is correct |
10 |
Correct |
2013 ms |
3692 KB |
Output is correct |
11 |
Correct |
2138 ms |
4004 KB |
Output is correct |
12 |
Correct |
1264 ms |
5536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
280 ms |
3104 KB |
Output is correct |
2 |
Correct |
323 ms |
3392 KB |
Output is correct |
3 |
Correct |
389 ms |
3468 KB |
Output is correct |
4 |
Correct |
254 ms |
3468 KB |
Output is correct |
5 |
Correct |
913 ms |
5668 KB |
Output is correct |
6 |
Correct |
1202 ms |
5164 KB |
Output is correct |
7 |
Correct |
1105 ms |
5408 KB |
Output is correct |
8 |
Correct |
273 ms |
6564 KB |
Output is correct |
9 |
Correct |
972 ms |
6432 KB |
Output is correct |
10 |
Correct |
2870 ms |
5784 KB |
Output is correct |
11 |
Correct |
2173 ms |
3648 KB |
Output is correct |
12 |
Correct |
2772 ms |
5644 KB |
Output is correct |
13 |
Correct |
3464 ms |
5684 KB |
Output is correct |
14 |
Correct |
4556 ms |
4388 KB |
Output is correct |
15 |
Correct |
4406 ms |
4072 KB |
Output is correct |
16 |
Correct |
4137 ms |
3900 KB |
Output is correct |
17 |
Correct |
1428 ms |
4920 KB |
Output is correct |
18 |
Correct |
1736 ms |
4904 KB |
Output is correct |
19 |
Correct |
1453 ms |
4712 KB |
Output is correct |
20 |
Correct |
1462 ms |
4684 KB |
Output is correct |
21 |
Correct |
2683 ms |
3760 KB |
Output is correct |
22 |
Correct |
4453 ms |
4532 KB |
Output is correct |
23 |
Correct |
3990 ms |
5676 KB |
Output is correct |
24 |
Correct |
4370 ms |
4544 KB |
Output is correct |
25 |
Correct |
302 ms |
3344 KB |
Output is correct |
26 |
Correct |
257 ms |
3208 KB |
Output is correct |
27 |
Correct |
289 ms |
3440 KB |
Output is correct |
28 |
Correct |
268 ms |
3248 KB |
Output is correct |
29 |
Correct |
3713 ms |
5636 KB |
Output is correct |
30 |
Correct |
3732 ms |
5672 KB |
Output is correct |
31 |
Correct |
871 ms |
6496 KB |
Output is correct |
32 |
Correct |
2955 ms |
5800 KB |
Output is correct |
33 |
Correct |
3202 ms |
5836 KB |
Output is correct |
34 |
Correct |
4471 ms |
4164 KB |
Output is correct |
35 |
Correct |
3881 ms |
4980 KB |
Output is correct |
36 |
Correct |
2956 ms |
5736 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
249 ms |
3088 KB |
Output is correct |
2 |
Correct |
252 ms |
3572 KB |
Output is correct |
3 |
Correct |
264 ms |
3448 KB |
Output is correct |
4 |
Correct |
277 ms |
3468 KB |
Output is correct |
5 |
Correct |
1175 ms |
6104 KB |
Output is correct |
6 |
Correct |
1982 ms |
3292 KB |
Output is correct |
7 |
Correct |
801 ms |
6176 KB |
Output is correct |
8 |
Correct |
2151 ms |
3764 KB |
Output is correct |
9 |
Correct |
4636 ms |
4524 KB |
Output is correct |
10 |
Correct |
2570 ms |
5764 KB |
Output is correct |
11 |
Correct |
4041 ms |
3908 KB |
Output is correct |
12 |
Correct |
494 ms |
6660 KB |
Output is correct |
13 |
Correct |
3431 ms |
5772 KB |
Output is correct |
14 |
Correct |
4750 ms |
4312 KB |
Output is correct |
15 |
Correct |
1046 ms |
6432 KB |
Output is correct |
16 |
Correct |
3195 ms |
5808 KB |
Output is correct |
17 |
Correct |
1817 ms |
4964 KB |
Output is correct |
18 |
Correct |
1863 ms |
4908 KB |
Output is correct |
19 |
Correct |
1800 ms |
4916 KB |
Output is correct |
20 |
Correct |
1852 ms |
4916 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
1144 KB |
Output is correct |
2 |
Correct |
3 ms |
1148 KB |
Output is correct |
3 |
Correct |
9 ms |
1272 KB |
Output is correct |
4 |
Correct |
9 ms |
1400 KB |
Output is correct |
5 |
Correct |
21 ms |
1532 KB |
Output is correct |
6 |
Correct |
25 ms |
1400 KB |
Output is correct |
7 |
Correct |
40 ms |
1400 KB |
Output is correct |
8 |
Correct |
88 ms |
1404 KB |
Output is correct |
9 |
Correct |
98 ms |
1528 KB |
Output is correct |
10 |
Correct |
41 ms |
1628 KB |
Output is correct |
11 |
Correct |
38 ms |
1400 KB |
Output is correct |
12 |
Correct |
38 ms |
1400 KB |
Output is correct |
13 |
Correct |
42 ms |
1528 KB |
Output is correct |
14 |
Correct |
107 ms |
1400 KB |
Output is correct |
15 |
Correct |
9 ms |
1400 KB |
Output is correct |
16 |
Correct |
12 ms |
1400 KB |
Output is correct |
17 |
Correct |
104 ms |
1432 KB |
Output is correct |
18 |
Correct |
77 ms |
1512 KB |
Output is correct |
19 |
Correct |
63 ms |
1528 KB |
Output is correct |
20 |
Correct |
74 ms |
1400 KB |
Output is correct |
21 |
Correct |
1807 ms |
4672 KB |
Output is correct |
22 |
Correct |
1818 ms |
4808 KB |
Output is correct |
23 |
Correct |
1815 ms |
4916 KB |
Output is correct |
24 |
Correct |
1889 ms |
4908 KB |
Output is correct |
25 |
Correct |
356 ms |
6564 KB |
Output is correct |
26 |
Correct |
227 ms |
6436 KB |
Output is correct |
27 |
Correct |
1838 ms |
4796 KB |
Output is correct |
28 |
Correct |
1815 ms |
4904 KB |
Output is correct |
29 |
Correct |
1841 ms |
5040 KB |
Output is correct |
30 |
Correct |
2013 ms |
3692 KB |
Output is correct |
31 |
Correct |
2138 ms |
4004 KB |
Output is correct |
32 |
Correct |
1264 ms |
5536 KB |
Output is correct |
33 |
Correct |
249 ms |
3088 KB |
Output is correct |
34 |
Correct |
252 ms |
3572 KB |
Output is correct |
35 |
Correct |
264 ms |
3448 KB |
Output is correct |
36 |
Correct |
277 ms |
3468 KB |
Output is correct |
37 |
Correct |
1175 ms |
6104 KB |
Output is correct |
38 |
Correct |
1982 ms |
3292 KB |
Output is correct |
39 |
Correct |
801 ms |
6176 KB |
Output is correct |
40 |
Correct |
2151 ms |
3764 KB |
Output is correct |
41 |
Correct |
4636 ms |
4524 KB |
Output is correct |
42 |
Correct |
2570 ms |
5764 KB |
Output is correct |
43 |
Correct |
4041 ms |
3908 KB |
Output is correct |
44 |
Correct |
494 ms |
6660 KB |
Output is correct |
45 |
Correct |
3431 ms |
5772 KB |
Output is correct |
46 |
Correct |
4750 ms |
4312 KB |
Output is correct |
47 |
Correct |
1046 ms |
6432 KB |
Output is correct |
48 |
Correct |
3195 ms |
5808 KB |
Output is correct |
49 |
Correct |
1817 ms |
4964 KB |
Output is correct |
50 |
Correct |
1863 ms |
4908 KB |
Output is correct |
51 |
Correct |
1800 ms |
4916 KB |
Output is correct |
52 |
Correct |
1852 ms |
4916 KB |
Output is correct |
53 |
Correct |
282 ms |
3340 KB |
Output is correct |
54 |
Correct |
280 ms |
3480 KB |
Output is correct |
55 |
Correct |
242 ms |
3432 KB |
Output is correct |
56 |
Correct |
282 ms |
3536 KB |
Output is correct |
57 |
Correct |
2119 ms |
4136 KB |
Output is correct |
58 |
Correct |
1882 ms |
3180 KB |
Output is correct |
59 |
Correct |
1535 ms |
5004 KB |
Output is correct |
60 |
Correct |
1753 ms |
3156 KB |
Output is correct |
61 |
Correct |
3518 ms |
5600 KB |
Output is correct |
62 |
Correct |
1339 ms |
6140 KB |
Output is correct |
63 |
Correct |
774 ms |
6432 KB |
Output is correct |
64 |
Correct |
1281 ms |
6308 KB |
Output is correct |
65 |
Correct |
4351 ms |
3856 KB |
Output is correct |
66 |
Correct |
4145 ms |
4024 KB |
Output is correct |
67 |
Correct |
3112 ms |
5672 KB |
Output is correct |
68 |
Correct |
4162 ms |
4648 KB |
Output is correct |
69 |
Correct |
1857 ms |
4576 KB |
Output is correct |
70 |
Correct |
1839 ms |
4716 KB |
Output is correct |
71 |
Correct |
1794 ms |
4524 KB |
Output is correct |
72 |
Correct |
1832 ms |
4676 KB |
Output is correct |
73 |
Correct |
4532 ms |
3932 KB |
Output is correct |
74 |
Correct |
4101 ms |
4776 KB |
Output is correct |
75 |
Correct |
279 ms |
6432 KB |
Output is correct |
76 |
Correct |
714 ms |
6432 KB |
Output is correct |
77 |
Correct |
266 ms |
3212 KB |
Output is correct |
78 |
Correct |
260 ms |
3348 KB |
Output is correct |
79 |
Correct |
285 ms |
3368 KB |
Output is correct |
80 |
Correct |
263 ms |
3340 KB |
Output is correct |
81 |
Correct |
4241 ms |
4676 KB |
Output is correct |
82 |
Correct |
4735 ms |
3984 KB |
Output is correct |
83 |
Correct |
3935 ms |
3708 KB |
Output is correct |
84 |
Correct |
4317 ms |
4648 KB |
Output is correct |
85 |
Correct |
3072 ms |
5764 KB |
Output is correct |
86 |
Correct |
2884 ms |
5320 KB |
Output is correct |
87 |
Correct |
4470 ms |
4144 KB |
Output is correct |
88 |
Correct |
4035 ms |
3704 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
1144 KB |
Output is correct |
2 |
Correct |
3 ms |
1148 KB |
Output is correct |
3 |
Correct |
9 ms |
1272 KB |
Output is correct |
4 |
Correct |
9 ms |
1400 KB |
Output is correct |
5 |
Correct |
21 ms |
1532 KB |
Output is correct |
6 |
Correct |
25 ms |
1400 KB |
Output is correct |
7 |
Correct |
40 ms |
1400 KB |
Output is correct |
8 |
Correct |
88 ms |
1404 KB |
Output is correct |
9 |
Correct |
98 ms |
1528 KB |
Output is correct |
10 |
Correct |
41 ms |
1628 KB |
Output is correct |
11 |
Correct |
38 ms |
1400 KB |
Output is correct |
12 |
Correct |
38 ms |
1400 KB |
Output is correct |
13 |
Correct |
42 ms |
1528 KB |
Output is correct |
14 |
Correct |
107 ms |
1400 KB |
Output is correct |
15 |
Correct |
9 ms |
1400 KB |
Output is correct |
16 |
Correct |
12 ms |
1400 KB |
Output is correct |
17 |
Correct |
104 ms |
1432 KB |
Output is correct |
18 |
Correct |
77 ms |
1512 KB |
Output is correct |
19 |
Correct |
63 ms |
1528 KB |
Output is correct |
20 |
Correct |
74 ms |
1400 KB |
Output is correct |
21 |
Correct |
1807 ms |
4672 KB |
Output is correct |
22 |
Correct |
1818 ms |
4808 KB |
Output is correct |
23 |
Correct |
1815 ms |
4916 KB |
Output is correct |
24 |
Correct |
1889 ms |
4908 KB |
Output is correct |
25 |
Correct |
356 ms |
6564 KB |
Output is correct |
26 |
Correct |
227 ms |
6436 KB |
Output is correct |
27 |
Correct |
1838 ms |
4796 KB |
Output is correct |
28 |
Correct |
1815 ms |
4904 KB |
Output is correct |
29 |
Correct |
1841 ms |
5040 KB |
Output is correct |
30 |
Correct |
2013 ms |
3692 KB |
Output is correct |
31 |
Correct |
2138 ms |
4004 KB |
Output is correct |
32 |
Correct |
1264 ms |
5536 KB |
Output is correct |
33 |
Correct |
280 ms |
3104 KB |
Output is correct |
34 |
Correct |
323 ms |
3392 KB |
Output is correct |
35 |
Correct |
389 ms |
3468 KB |
Output is correct |
36 |
Correct |
254 ms |
3468 KB |
Output is correct |
37 |
Correct |
913 ms |
5668 KB |
Output is correct |
38 |
Correct |
1202 ms |
5164 KB |
Output is correct |
39 |
Correct |
1105 ms |
5408 KB |
Output is correct |
40 |
Correct |
273 ms |
6564 KB |
Output is correct |
41 |
Correct |
972 ms |
6432 KB |
Output is correct |
42 |
Correct |
2870 ms |
5784 KB |
Output is correct |
43 |
Correct |
2173 ms |
3648 KB |
Output is correct |
44 |
Correct |
2772 ms |
5644 KB |
Output is correct |
45 |
Correct |
3464 ms |
5684 KB |
Output is correct |
46 |
Correct |
4556 ms |
4388 KB |
Output is correct |
47 |
Correct |
4406 ms |
4072 KB |
Output is correct |
48 |
Correct |
4137 ms |
3900 KB |
Output is correct |
49 |
Correct |
1428 ms |
4920 KB |
Output is correct |
50 |
Correct |
1736 ms |
4904 KB |
Output is correct |
51 |
Correct |
1453 ms |
4712 KB |
Output is correct |
52 |
Correct |
1462 ms |
4684 KB |
Output is correct |
53 |
Correct |
2683 ms |
3760 KB |
Output is correct |
54 |
Correct |
4453 ms |
4532 KB |
Output is correct |
55 |
Correct |
3990 ms |
5676 KB |
Output is correct |
56 |
Correct |
4370 ms |
4544 KB |
Output is correct |
57 |
Correct |
302 ms |
3344 KB |
Output is correct |
58 |
Correct |
257 ms |
3208 KB |
Output is correct |
59 |
Correct |
289 ms |
3440 KB |
Output is correct |
60 |
Correct |
268 ms |
3248 KB |
Output is correct |
61 |
Correct |
3713 ms |
5636 KB |
Output is correct |
62 |
Correct |
3732 ms |
5672 KB |
Output is correct |
63 |
Correct |
871 ms |
6496 KB |
Output is correct |
64 |
Correct |
2955 ms |
5800 KB |
Output is correct |
65 |
Correct |
3202 ms |
5836 KB |
Output is correct |
66 |
Correct |
4471 ms |
4164 KB |
Output is correct |
67 |
Correct |
3881 ms |
4980 KB |
Output is correct |
68 |
Correct |
2956 ms |
5736 KB |
Output is correct |
69 |
Correct |
249 ms |
3088 KB |
Output is correct |
70 |
Correct |
252 ms |
3572 KB |
Output is correct |
71 |
Correct |
264 ms |
3448 KB |
Output is correct |
72 |
Correct |
277 ms |
3468 KB |
Output is correct |
73 |
Correct |
1175 ms |
6104 KB |
Output is correct |
74 |
Correct |
1982 ms |
3292 KB |
Output is correct |
75 |
Correct |
801 ms |
6176 KB |
Output is correct |
76 |
Correct |
2151 ms |
3764 KB |
Output is correct |
77 |
Correct |
4636 ms |
4524 KB |
Output is correct |
78 |
Correct |
2570 ms |
5764 KB |
Output is correct |
79 |
Correct |
4041 ms |
3908 KB |
Output is correct |
80 |
Correct |
494 ms |
6660 KB |
Output is correct |
81 |
Correct |
3431 ms |
5772 KB |
Output is correct |
82 |
Correct |
4750 ms |
4312 KB |
Output is correct |
83 |
Correct |
1046 ms |
6432 KB |
Output is correct |
84 |
Correct |
3195 ms |
5808 KB |
Output is correct |
85 |
Correct |
1817 ms |
4964 KB |
Output is correct |
86 |
Correct |
1863 ms |
4908 KB |
Output is correct |
87 |
Correct |
1800 ms |
4916 KB |
Output is correct |
88 |
Correct |
1852 ms |
4916 KB |
Output is correct |
89 |
Correct |
282 ms |
3340 KB |
Output is correct |
90 |
Correct |
280 ms |
3480 KB |
Output is correct |
91 |
Correct |
242 ms |
3432 KB |
Output is correct |
92 |
Correct |
282 ms |
3536 KB |
Output is correct |
93 |
Correct |
2119 ms |
4136 KB |
Output is correct |
94 |
Correct |
1882 ms |
3180 KB |
Output is correct |
95 |
Correct |
1535 ms |
5004 KB |
Output is correct |
96 |
Correct |
1753 ms |
3156 KB |
Output is correct |
97 |
Correct |
3518 ms |
5600 KB |
Output is correct |
98 |
Correct |
1339 ms |
6140 KB |
Output is correct |
99 |
Correct |
774 ms |
6432 KB |
Output is correct |
100 |
Correct |
1281 ms |
6308 KB |
Output is correct |
101 |
Correct |
4351 ms |
3856 KB |
Output is correct |
102 |
Correct |
4145 ms |
4024 KB |
Output is correct |
103 |
Correct |
3112 ms |
5672 KB |
Output is correct |
104 |
Correct |
4162 ms |
4648 KB |
Output is correct |
105 |
Correct |
1857 ms |
4576 KB |
Output is correct |
106 |
Correct |
1839 ms |
4716 KB |
Output is correct |
107 |
Correct |
1794 ms |
4524 KB |
Output is correct |
108 |
Correct |
1832 ms |
4676 KB |
Output is correct |
109 |
Correct |
4532 ms |
3932 KB |
Output is correct |
110 |
Correct |
4101 ms |
4776 KB |
Output is correct |
111 |
Correct |
279 ms |
6432 KB |
Output is correct |
112 |
Correct |
714 ms |
6432 KB |
Output is correct |
113 |
Correct |
266 ms |
3212 KB |
Output is correct |
114 |
Correct |
260 ms |
3348 KB |
Output is correct |
115 |
Correct |
285 ms |
3368 KB |
Output is correct |
116 |
Correct |
263 ms |
3340 KB |
Output is correct |
117 |
Correct |
4241 ms |
4676 KB |
Output is correct |
118 |
Correct |
4735 ms |
3984 KB |
Output is correct |
119 |
Correct |
3935 ms |
3708 KB |
Output is correct |
120 |
Correct |
4317 ms |
4648 KB |
Output is correct |
121 |
Correct |
3072 ms |
5764 KB |
Output is correct |
122 |
Correct |
2884 ms |
5320 KB |
Output is correct |
123 |
Correct |
4470 ms |
4144 KB |
Output is correct |
124 |
Correct |
4035 ms |
3704 KB |
Output is correct |
125 |
Correct |
792 ms |
4860 KB |
Output is correct |
126 |
Correct |
811 ms |
5048 KB |
Output is correct |
127 |
Correct |
935 ms |
4892 KB |
Output is correct |
128 |
Correct |
828 ms |
5008 KB |
Output is correct |
129 |
Correct |
749 ms |
4936 KB |
Output is correct |
130 |
Correct |
866 ms |
4996 KB |
Output is correct |
131 |
Correct |
4593 ms |
4248 KB |
Output is correct |
132 |
Correct |
4892 ms |
7196 KB |
Output is correct |
133 |
Correct |
3702 ms |
8800 KB |
Output is correct |
134 |
Execution timed out |
5065 ms |
4660 KB |
Time limit exceeded |
135 |
Halted |
0 ms |
0 KB |
- |