#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 = 150;
const ll block_sz = 2500;
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;
struct R {
bool operator()(seg a, seg b) const {
if (a.r == b.r) {
return a.i < b.i;
}
return a.r < b.r;
}
};
struct L {
bool operator()(seg a, seg b) const {
if (a.l == b.l) {
return a.i < b.i;
}
return a.l < b.l;
}
};
vector <seg> lasts;
inline bool cmp(seg a, seg b) {
return (a.r - a.l) < (b.r - b.l);
}
inline bool cmpl(const seg& a, const seg& b) {
return a.l < b.l;
}
inline bool cmpr(const seg& a, const seg& b) {
return a.r < b.r;
}
inline bool cmpsz(const seg& a, const seg& b) {
return a.sz() < b.sz();
}
vector <seg> segs;
vector <seg> R[block];
vector <seg> 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], L[q][w].l);
MXL[q] = max(MXL[q], 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], R[q][w].r);
MXR[q] = max(MXR[q], 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.i] = -1;
if (used[p.i]) {
continue;
}
if (L[blocki].size() > block_sz) {
blocki++;
}
IL[p.i] = blocki;
L[blocki].pb(p);
}
sort(segs.begin(), segs.end(), cmpr);
for (auto p: segs) {
IR[p.i] = -1;
if (used[p.i]) {
continue;
}
if (R[blocki].size() > block_sz) {
blocki++;
}
IR[p.i] = 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);
IL[a.i] = IR[a.i] = -1;
}
inline void del(seg b) {
ll il = IL[b.i], ir = IR[b.i];
if (used[b.i]) {
return;
}
used[b.i] = 1;
if (il == -1) {
return;
}
L[il].erase(find(L[il].begin(), L[il].end(), b));
R[ir].erase(find(R[ir].begin(), R[ir].end(), b));
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 (L[i][q].l >= l && 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 (R[i][q].r <= r && 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;
ll j = (lower_bound(L[i].begin(), L[i].end(), good, cmpsz) - L[i].begin());
return 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;
ll j = (lower_bound(R[i].begin(), R[i].end(), good, cmpsz) - R[i].begin());
return 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:97: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:108: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:115:8: warning: unused variable 'w' [-Wunused-variable]
ll q, w;
^
segments.cpp: In function 'll slowL(ll, ll, ll)':
segments.cpp:179: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:190: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:237: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:277: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:292:5: warning: unused variable 'q' [-Wunused-variable]
ll q, w;
^
segments.cpp:292:8: warning: unused variable 'w' [-Wunused-variable]
ll q, w;
^
segments.cpp: In function 'int main()':
segments.cpp:303:8: warning: unused variable 'w' [-Wunused-variable]
ll q, w, e, a, b, c;
^
segments.cpp:303:11: warning: unused variable 'e' [-Wunused-variable]
ll q, w, e, a, b, c;
^
segments.cpp:303:17: warning: unused variable 'b' [-Wunused-variable]
ll q, w, e, a, b, c;
^
segments.cpp:307:5: warning: unused variable 'nxt' [-Wunused-variable]
ll nxt = 0;
^~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
1528 KB |
Output is correct |
2 |
Correct |
3 ms |
1532 KB |
Output is correct |
3 |
Correct |
12 ms |
1784 KB |
Output is correct |
4 |
Correct |
11 ms |
1784 KB |
Output is correct |
5 |
Correct |
21 ms |
2040 KB |
Output is correct |
6 |
Correct |
26 ms |
2040 KB |
Output is correct |
7 |
Correct |
75 ms |
1784 KB |
Output is correct |
8 |
Correct |
105 ms |
2040 KB |
Output is correct |
9 |
Correct |
122 ms |
1916 KB |
Output is correct |
10 |
Correct |
45 ms |
2172 KB |
Output is correct |
11 |
Correct |
47 ms |
1912 KB |
Output is correct |
12 |
Correct |
69 ms |
2036 KB |
Output is correct |
13 |
Correct |
46 ms |
2168 KB |
Output is correct |
14 |
Correct |
120 ms |
1912 KB |
Output is correct |
15 |
Correct |
11 ms |
1784 KB |
Output is correct |
16 |
Correct |
14 ms |
1784 KB |
Output is correct |
17 |
Correct |
50 ms |
1912 KB |
Output is correct |
18 |
Correct |
122 ms |
2168 KB |
Output is correct |
19 |
Correct |
50 ms |
1920 KB |
Output is correct |
20 |
Correct |
50 ms |
1912 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1287 ms |
6968 KB |
Output is correct |
2 |
Correct |
1285 ms |
7196 KB |
Output is correct |
3 |
Correct |
1372 ms |
7100 KB |
Output is correct |
4 |
Correct |
1276 ms |
7580 KB |
Output is correct |
5 |
Correct |
256 ms |
10508 KB |
Output is correct |
6 |
Correct |
178 ms |
10764 KB |
Output is correct |
7 |
Correct |
1295 ms |
7148 KB |
Output is correct |
8 |
Correct |
1303 ms |
7140 KB |
Output is correct |
9 |
Correct |
1277 ms |
7044 KB |
Output is correct |
10 |
Correct |
1740 ms |
4648 KB |
Output is correct |
11 |
Correct |
1652 ms |
5332 KB |
Output is correct |
12 |
Correct |
866 ms |
8880 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
313 ms |
3812 KB |
Output is correct |
2 |
Correct |
272 ms |
3856 KB |
Output is correct |
3 |
Correct |
398 ms |
4104 KB |
Output is correct |
4 |
Correct |
286 ms |
3852 KB |
Output is correct |
5 |
Correct |
684 ms |
8844 KB |
Output is correct |
6 |
Correct |
871 ms |
7836 KB |
Output is correct |
7 |
Correct |
867 ms |
8328 KB |
Output is correct |
8 |
Correct |
210 ms |
10636 KB |
Output is correct |
9 |
Correct |
950 ms |
10484 KB |
Output is correct |
10 |
Correct |
2892 ms |
8852 KB |
Output is correct |
11 |
Correct |
2020 ms |
4184 KB |
Output is correct |
12 |
Correct |
2893 ms |
8740 KB |
Output is correct |
13 |
Correct |
3437 ms |
8628 KB |
Output is correct |
14 |
Correct |
4619 ms |
5752 KB |
Output is correct |
15 |
Correct |
4500 ms |
5608 KB |
Output is correct |
16 |
Correct |
4125 ms |
5096 KB |
Output is correct |
17 |
Correct |
1060 ms |
7208 KB |
Output is correct |
18 |
Correct |
1060 ms |
7200 KB |
Output is correct |
19 |
Correct |
1073 ms |
7196 KB |
Output is correct |
20 |
Correct |
1061 ms |
7080 KB |
Output is correct |
21 |
Correct |
2765 ms |
4500 KB |
Output is correct |
22 |
Correct |
4449 ms |
6428 KB |
Output is correct |
23 |
Correct |
4271 ms |
8264 KB |
Output is correct |
24 |
Correct |
4446 ms |
6640 KB |
Output is correct |
25 |
Correct |
392 ms |
3968 KB |
Output is correct |
26 |
Correct |
297 ms |
4076 KB |
Output is correct |
27 |
Correct |
483 ms |
3988 KB |
Output is correct |
28 |
Correct |
328 ms |
4128 KB |
Output is correct |
29 |
Correct |
3659 ms |
8620 KB |
Output is correct |
30 |
Correct |
3639 ms |
8612 KB |
Output is correct |
31 |
Correct |
885 ms |
10756 KB |
Output is correct |
32 |
Correct |
3136 ms |
9116 KB |
Output is correct |
33 |
Correct |
3324 ms |
8956 KB |
Output is correct |
34 |
Correct |
4491 ms |
5580 KB |
Output is correct |
35 |
Correct |
3950 ms |
7556 KB |
Output is correct |
36 |
Correct |
3096 ms |
9068 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
284 ms |
3960 KB |
Output is correct |
2 |
Correct |
278 ms |
3708 KB |
Output is correct |
3 |
Correct |
288 ms |
3868 KB |
Output is correct |
4 |
Correct |
301 ms |
3860 KB |
Output is correct |
5 |
Correct |
712 ms |
9216 KB |
Output is correct |
6 |
Correct |
1754 ms |
3904 KB |
Output is correct |
7 |
Correct |
550 ms |
9716 KB |
Output is correct |
8 |
Correct |
1718 ms |
4444 KB |
Output is correct |
9 |
Correct |
4577 ms |
6200 KB |
Output is correct |
10 |
Correct |
2599 ms |
9344 KB |
Output is correct |
11 |
Correct |
4200 ms |
4888 KB |
Output is correct |
12 |
Correct |
521 ms |
11200 KB |
Output is correct |
13 |
Correct |
3501 ms |
8616 KB |
Output is correct |
14 |
Correct |
4634 ms |
6092 KB |
Output is correct |
15 |
Correct |
1055 ms |
10512 KB |
Output is correct |
16 |
Correct |
3211 ms |
8816 KB |
Output is correct |
17 |
Correct |
1290 ms |
7208 KB |
Output is correct |
18 |
Correct |
1292 ms |
7068 KB |
Output is correct |
19 |
Correct |
1305 ms |
7188 KB |
Output is correct |
20 |
Correct |
1294 ms |
7188 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
1528 KB |
Output is correct |
2 |
Correct |
3 ms |
1532 KB |
Output is correct |
3 |
Correct |
12 ms |
1784 KB |
Output is correct |
4 |
Correct |
11 ms |
1784 KB |
Output is correct |
5 |
Correct |
21 ms |
2040 KB |
Output is correct |
6 |
Correct |
26 ms |
2040 KB |
Output is correct |
7 |
Correct |
75 ms |
1784 KB |
Output is correct |
8 |
Correct |
105 ms |
2040 KB |
Output is correct |
9 |
Correct |
122 ms |
1916 KB |
Output is correct |
10 |
Correct |
45 ms |
2172 KB |
Output is correct |
11 |
Correct |
47 ms |
1912 KB |
Output is correct |
12 |
Correct |
69 ms |
2036 KB |
Output is correct |
13 |
Correct |
46 ms |
2168 KB |
Output is correct |
14 |
Correct |
120 ms |
1912 KB |
Output is correct |
15 |
Correct |
11 ms |
1784 KB |
Output is correct |
16 |
Correct |
14 ms |
1784 KB |
Output is correct |
17 |
Correct |
50 ms |
1912 KB |
Output is correct |
18 |
Correct |
122 ms |
2168 KB |
Output is correct |
19 |
Correct |
50 ms |
1920 KB |
Output is correct |
20 |
Correct |
50 ms |
1912 KB |
Output is correct |
21 |
Correct |
1287 ms |
6968 KB |
Output is correct |
22 |
Correct |
1285 ms |
7196 KB |
Output is correct |
23 |
Correct |
1372 ms |
7100 KB |
Output is correct |
24 |
Correct |
1276 ms |
7580 KB |
Output is correct |
25 |
Correct |
256 ms |
10508 KB |
Output is correct |
26 |
Correct |
178 ms |
10764 KB |
Output is correct |
27 |
Correct |
1295 ms |
7148 KB |
Output is correct |
28 |
Correct |
1303 ms |
7140 KB |
Output is correct |
29 |
Correct |
1277 ms |
7044 KB |
Output is correct |
30 |
Correct |
1740 ms |
4648 KB |
Output is correct |
31 |
Correct |
1652 ms |
5332 KB |
Output is correct |
32 |
Correct |
866 ms |
8880 KB |
Output is correct |
33 |
Correct |
284 ms |
3960 KB |
Output is correct |
34 |
Correct |
278 ms |
3708 KB |
Output is correct |
35 |
Correct |
288 ms |
3868 KB |
Output is correct |
36 |
Correct |
301 ms |
3860 KB |
Output is correct |
37 |
Correct |
712 ms |
9216 KB |
Output is correct |
38 |
Correct |
1754 ms |
3904 KB |
Output is correct |
39 |
Correct |
550 ms |
9716 KB |
Output is correct |
40 |
Correct |
1718 ms |
4444 KB |
Output is correct |
41 |
Correct |
4577 ms |
6200 KB |
Output is correct |
42 |
Correct |
2599 ms |
9344 KB |
Output is correct |
43 |
Correct |
4200 ms |
4888 KB |
Output is correct |
44 |
Correct |
521 ms |
11200 KB |
Output is correct |
45 |
Correct |
3501 ms |
8616 KB |
Output is correct |
46 |
Correct |
4634 ms |
6092 KB |
Output is correct |
47 |
Correct |
1055 ms |
10512 KB |
Output is correct |
48 |
Correct |
3211 ms |
8816 KB |
Output is correct |
49 |
Correct |
1290 ms |
7208 KB |
Output is correct |
50 |
Correct |
1292 ms |
7068 KB |
Output is correct |
51 |
Correct |
1305 ms |
7188 KB |
Output is correct |
52 |
Correct |
1294 ms |
7188 KB |
Output is correct |
53 |
Correct |
313 ms |
3880 KB |
Output is correct |
54 |
Correct |
308 ms |
3832 KB |
Output is correct |
55 |
Correct |
289 ms |
3844 KB |
Output is correct |
56 |
Correct |
287 ms |
3880 KB |
Output is correct |
57 |
Correct |
1573 ms |
5552 KB |
Output is correct |
58 |
Correct |
1769 ms |
3688 KB |
Output is correct |
59 |
Correct |
1080 ms |
8092 KB |
Output is correct |
60 |
Correct |
1789 ms |
3544 KB |
Output is correct |
61 |
Correct |
3631 ms |
8744 KB |
Output is correct |
62 |
Correct |
1317 ms |
10448 KB |
Output is correct |
63 |
Correct |
741 ms |
10888 KB |
Output is correct |
64 |
Correct |
1259 ms |
10640 KB |
Output is correct |
65 |
Correct |
4405 ms |
5092 KB |
Output is correct |
66 |
Correct |
4290 ms |
4948 KB |
Output is correct |
67 |
Correct |
3082 ms |
8992 KB |
Output is correct |
68 |
Correct |
4112 ms |
7536 KB |
Output is correct |
69 |
Correct |
1308 ms |
7220 KB |
Output is correct |
70 |
Correct |
1302 ms |
7144 KB |
Output is correct |
71 |
Correct |
1311 ms |
7196 KB |
Output is correct |
72 |
Correct |
1330 ms |
7324 KB |
Output is correct |
73 |
Correct |
4720 ms |
5576 KB |
Output is correct |
74 |
Correct |
4131 ms |
7284 KB |
Output is correct |
75 |
Correct |
269 ms |
11276 KB |
Output is correct |
76 |
Correct |
688 ms |
11020 KB |
Output is correct |
77 |
Correct |
302 ms |
4184 KB |
Output is correct |
78 |
Correct |
367 ms |
4224 KB |
Output is correct |
79 |
Correct |
312 ms |
4336 KB |
Output is correct |
80 |
Correct |
295 ms |
4064 KB |
Output is correct |
81 |
Correct |
4307 ms |
7080 KB |
Output is correct |
82 |
Execution timed out |
5014 ms |
5508 KB |
Time limit exceeded |
83 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
1528 KB |
Output is correct |
2 |
Correct |
3 ms |
1532 KB |
Output is correct |
3 |
Correct |
12 ms |
1784 KB |
Output is correct |
4 |
Correct |
11 ms |
1784 KB |
Output is correct |
5 |
Correct |
21 ms |
2040 KB |
Output is correct |
6 |
Correct |
26 ms |
2040 KB |
Output is correct |
7 |
Correct |
75 ms |
1784 KB |
Output is correct |
8 |
Correct |
105 ms |
2040 KB |
Output is correct |
9 |
Correct |
122 ms |
1916 KB |
Output is correct |
10 |
Correct |
45 ms |
2172 KB |
Output is correct |
11 |
Correct |
47 ms |
1912 KB |
Output is correct |
12 |
Correct |
69 ms |
2036 KB |
Output is correct |
13 |
Correct |
46 ms |
2168 KB |
Output is correct |
14 |
Correct |
120 ms |
1912 KB |
Output is correct |
15 |
Correct |
11 ms |
1784 KB |
Output is correct |
16 |
Correct |
14 ms |
1784 KB |
Output is correct |
17 |
Correct |
50 ms |
1912 KB |
Output is correct |
18 |
Correct |
122 ms |
2168 KB |
Output is correct |
19 |
Correct |
50 ms |
1920 KB |
Output is correct |
20 |
Correct |
50 ms |
1912 KB |
Output is correct |
21 |
Correct |
1287 ms |
6968 KB |
Output is correct |
22 |
Correct |
1285 ms |
7196 KB |
Output is correct |
23 |
Correct |
1372 ms |
7100 KB |
Output is correct |
24 |
Correct |
1276 ms |
7580 KB |
Output is correct |
25 |
Correct |
256 ms |
10508 KB |
Output is correct |
26 |
Correct |
178 ms |
10764 KB |
Output is correct |
27 |
Correct |
1295 ms |
7148 KB |
Output is correct |
28 |
Correct |
1303 ms |
7140 KB |
Output is correct |
29 |
Correct |
1277 ms |
7044 KB |
Output is correct |
30 |
Correct |
1740 ms |
4648 KB |
Output is correct |
31 |
Correct |
1652 ms |
5332 KB |
Output is correct |
32 |
Correct |
866 ms |
8880 KB |
Output is correct |
33 |
Correct |
313 ms |
3812 KB |
Output is correct |
34 |
Correct |
272 ms |
3856 KB |
Output is correct |
35 |
Correct |
398 ms |
4104 KB |
Output is correct |
36 |
Correct |
286 ms |
3852 KB |
Output is correct |
37 |
Correct |
684 ms |
8844 KB |
Output is correct |
38 |
Correct |
871 ms |
7836 KB |
Output is correct |
39 |
Correct |
867 ms |
8328 KB |
Output is correct |
40 |
Correct |
210 ms |
10636 KB |
Output is correct |
41 |
Correct |
950 ms |
10484 KB |
Output is correct |
42 |
Correct |
2892 ms |
8852 KB |
Output is correct |
43 |
Correct |
2020 ms |
4184 KB |
Output is correct |
44 |
Correct |
2893 ms |
8740 KB |
Output is correct |
45 |
Correct |
3437 ms |
8628 KB |
Output is correct |
46 |
Correct |
4619 ms |
5752 KB |
Output is correct |
47 |
Correct |
4500 ms |
5608 KB |
Output is correct |
48 |
Correct |
4125 ms |
5096 KB |
Output is correct |
49 |
Correct |
1060 ms |
7208 KB |
Output is correct |
50 |
Correct |
1060 ms |
7200 KB |
Output is correct |
51 |
Correct |
1073 ms |
7196 KB |
Output is correct |
52 |
Correct |
1061 ms |
7080 KB |
Output is correct |
53 |
Correct |
2765 ms |
4500 KB |
Output is correct |
54 |
Correct |
4449 ms |
6428 KB |
Output is correct |
55 |
Correct |
4271 ms |
8264 KB |
Output is correct |
56 |
Correct |
4446 ms |
6640 KB |
Output is correct |
57 |
Correct |
392 ms |
3968 KB |
Output is correct |
58 |
Correct |
297 ms |
4076 KB |
Output is correct |
59 |
Correct |
483 ms |
3988 KB |
Output is correct |
60 |
Correct |
328 ms |
4128 KB |
Output is correct |
61 |
Correct |
3659 ms |
8620 KB |
Output is correct |
62 |
Correct |
3639 ms |
8612 KB |
Output is correct |
63 |
Correct |
885 ms |
10756 KB |
Output is correct |
64 |
Correct |
3136 ms |
9116 KB |
Output is correct |
65 |
Correct |
3324 ms |
8956 KB |
Output is correct |
66 |
Correct |
4491 ms |
5580 KB |
Output is correct |
67 |
Correct |
3950 ms |
7556 KB |
Output is correct |
68 |
Correct |
3096 ms |
9068 KB |
Output is correct |
69 |
Correct |
284 ms |
3960 KB |
Output is correct |
70 |
Correct |
278 ms |
3708 KB |
Output is correct |
71 |
Correct |
288 ms |
3868 KB |
Output is correct |
72 |
Correct |
301 ms |
3860 KB |
Output is correct |
73 |
Correct |
712 ms |
9216 KB |
Output is correct |
74 |
Correct |
1754 ms |
3904 KB |
Output is correct |
75 |
Correct |
550 ms |
9716 KB |
Output is correct |
76 |
Correct |
1718 ms |
4444 KB |
Output is correct |
77 |
Correct |
4577 ms |
6200 KB |
Output is correct |
78 |
Correct |
2599 ms |
9344 KB |
Output is correct |
79 |
Correct |
4200 ms |
4888 KB |
Output is correct |
80 |
Correct |
521 ms |
11200 KB |
Output is correct |
81 |
Correct |
3501 ms |
8616 KB |
Output is correct |
82 |
Correct |
4634 ms |
6092 KB |
Output is correct |
83 |
Correct |
1055 ms |
10512 KB |
Output is correct |
84 |
Correct |
3211 ms |
8816 KB |
Output is correct |
85 |
Correct |
1290 ms |
7208 KB |
Output is correct |
86 |
Correct |
1292 ms |
7068 KB |
Output is correct |
87 |
Correct |
1305 ms |
7188 KB |
Output is correct |
88 |
Correct |
1294 ms |
7188 KB |
Output is correct |
89 |
Correct |
313 ms |
3880 KB |
Output is correct |
90 |
Correct |
308 ms |
3832 KB |
Output is correct |
91 |
Correct |
289 ms |
3844 KB |
Output is correct |
92 |
Correct |
287 ms |
3880 KB |
Output is correct |
93 |
Correct |
1573 ms |
5552 KB |
Output is correct |
94 |
Correct |
1769 ms |
3688 KB |
Output is correct |
95 |
Correct |
1080 ms |
8092 KB |
Output is correct |
96 |
Correct |
1789 ms |
3544 KB |
Output is correct |
97 |
Correct |
3631 ms |
8744 KB |
Output is correct |
98 |
Correct |
1317 ms |
10448 KB |
Output is correct |
99 |
Correct |
741 ms |
10888 KB |
Output is correct |
100 |
Correct |
1259 ms |
10640 KB |
Output is correct |
101 |
Correct |
4405 ms |
5092 KB |
Output is correct |
102 |
Correct |
4290 ms |
4948 KB |
Output is correct |
103 |
Correct |
3082 ms |
8992 KB |
Output is correct |
104 |
Correct |
4112 ms |
7536 KB |
Output is correct |
105 |
Correct |
1308 ms |
7220 KB |
Output is correct |
106 |
Correct |
1302 ms |
7144 KB |
Output is correct |
107 |
Correct |
1311 ms |
7196 KB |
Output is correct |
108 |
Correct |
1330 ms |
7324 KB |
Output is correct |
109 |
Correct |
4720 ms |
5576 KB |
Output is correct |
110 |
Correct |
4131 ms |
7284 KB |
Output is correct |
111 |
Correct |
269 ms |
11276 KB |
Output is correct |
112 |
Correct |
688 ms |
11020 KB |
Output is correct |
113 |
Correct |
302 ms |
4184 KB |
Output is correct |
114 |
Correct |
367 ms |
4224 KB |
Output is correct |
115 |
Correct |
312 ms |
4336 KB |
Output is correct |
116 |
Correct |
295 ms |
4064 KB |
Output is correct |
117 |
Correct |
4307 ms |
7080 KB |
Output is correct |
118 |
Execution timed out |
5014 ms |
5508 KB |
Time limit exceeded |
119 |
Halted |
0 ms |
0 KB |
- |