Submission #161269

# Submission time Handle Problem Language Result Execution time Memory
161269 2019-11-01T16:29:20 Z pink_bittern Segments (IZhO18_segments) C++14
75 / 100
3342 ms 20244 KB
#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 + 5e4;
const ll block = 150;
const ll block_sz = (maxn + block - 1) / block + 10;
 
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;
	if (q > block) {
		exit(-1);
	}
	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;
	if (q > block) {
		exit(-1);
	}
 	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) {
		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) {
		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];
	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) {
	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) {
	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 < 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:100: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:114: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:121:8: warning: unused variable 'w' [-Wunused-variable]
  ll q, w;
        ^
segments.cpp: In function 'll slowL(ll, ll, ll)':
segments.cpp:180: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:191: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:232: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:272: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:287:5: warning: unused variable 'q' [-Wunused-variable]
  ll q, w;
     ^
segments.cpp:287:8: warning: unused variable 'w' [-Wunused-variable]
  ll q, w;
        ^
segments.cpp: In function 'int main()':
segments.cpp:298:8: warning: unused variable 'w' [-Wunused-variable]
  ll q, w, e, a, b, c;
        ^
segments.cpp:298:11: warning: unused variable 'e' [-Wunused-variable]
  ll q, w, e, a, b, c;
           ^
segments.cpp:298:17: warning: unused variable 'b' [-Wunused-variable]
  ll q, w, e, a, b, c;
                 ^
segments.cpp:302:5: warning: unused variable 'nxt' [-Wunused-variable]
  ll nxt = 0;
     ^~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 10 ms 504 KB Output is correct
4 Correct 10 ms 604 KB Output is correct
5 Correct 15 ms 820 KB Output is correct
6 Correct 18 ms 760 KB Output is correct
7 Correct 36 ms 632 KB Output is correct
8 Correct 69 ms 772 KB Output is correct
9 Correct 74 ms 760 KB Output is correct
10 Correct 31 ms 888 KB Output is correct
11 Correct 27 ms 760 KB Output is correct
12 Correct 26 ms 764 KB Output is correct
13 Correct 33 ms 888 KB Output is correct
14 Correct 83 ms 760 KB Output is correct
15 Correct 13 ms 632 KB Output is correct
16 Correct 13 ms 528 KB Output is correct
17 Correct 58 ms 760 KB Output is correct
18 Correct 51 ms 860 KB Output is correct
19 Correct 69 ms 632 KB Output is correct
20 Correct 87 ms 632 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1132 ms 4800 KB Output is correct
2 Correct 999 ms 4992 KB Output is correct
3 Correct 990 ms 4884 KB Output is correct
4 Correct 944 ms 5408 KB Output is correct
5 Correct 228 ms 7804 KB Output is correct
6 Correct 162 ms 7976 KB Output is correct
7 Correct 993 ms 4824 KB Output is correct
8 Correct 998 ms 4884 KB Output is correct
9 Correct 1008 ms 4848 KB Output is correct
10 Correct 1232 ms 2856 KB Output is correct
11 Correct 1296 ms 3316 KB Output is correct
12 Correct 709 ms 6188 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 259 ms 2644 KB Output is correct
2 Correct 228 ms 2756 KB Output is correct
3 Correct 340 ms 2780 KB Output is correct
4 Correct 236 ms 2800 KB Output is correct
5 Correct 480 ms 6548 KB Output is correct
6 Correct 607 ms 5596 KB Output is correct
7 Correct 562 ms 5904 KB Output is correct
8 Correct 184 ms 7828 KB Output is correct
9 Correct 665 ms 7828 KB Output is correct
10 Correct 2025 ms 6464 KB Output is correct
11 Correct 1665 ms 2876 KB Output is correct
12 Correct 1988 ms 6332 KB Output is correct
13 Correct 2428 ms 6228 KB Output is correct
14 Correct 3172 ms 3884 KB Output is correct
15 Correct 3113 ms 3616 KB Output is correct
16 Correct 2920 ms 3196 KB Output is correct
17 Correct 718 ms 5000 KB Output is correct
18 Correct 703 ms 4956 KB Output is correct
19 Correct 701 ms 4912 KB Output is correct
20 Correct 714 ms 4960 KB Output is correct
21 Correct 2081 ms 2808 KB Output is correct
22 Correct 3056 ms 4328 KB Output is correct
23 Correct 2855 ms 5856 KB Output is correct
24 Correct 3126 ms 4648 KB Output is correct
25 Correct 284 ms 2772 KB Output is correct
26 Correct 257 ms 2740 KB Output is correct
27 Correct 267 ms 2732 KB Output is correct
28 Correct 267 ms 2740 KB Output is correct
29 Correct 2534 ms 6156 KB Output is correct
30 Correct 2545 ms 6028 KB Output is correct
31 Correct 614 ms 7664 KB Output is correct
32 Correct 2047 ms 6428 KB Output is correct
33 Correct 2239 ms 6136 KB Output is correct
34 Correct 3065 ms 3504 KB Output is correct
35 Correct 2728 ms 5104 KB Output is correct
36 Correct 2119 ms 6440 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 244 ms 2884 KB Output is correct
2 Correct 235 ms 2796 KB Output is correct
3 Correct 238 ms 2740 KB Output is correct
4 Correct 250 ms 2780 KB Output is correct
5 Correct 589 ms 6812 KB Output is correct
6 Correct 1318 ms 2692 KB Output is correct
7 Correct 491 ms 7064 KB Output is correct
8 Correct 1206 ms 2936 KB Output is correct
9 Correct 3242 ms 4412 KB Output is correct
10 Correct 1838 ms 6560 KB Output is correct
11 Correct 2973 ms 2972 KB Output is correct
12 Correct 368 ms 7956 KB Output is correct
13 Correct 2492 ms 6436 KB Output is correct
14 Correct 3342 ms 4320 KB Output is correct
15 Correct 794 ms 7688 KB Output is correct
16 Correct 2291 ms 6400 KB Output is correct
17 Correct 1080 ms 5428 KB Output is correct
18 Correct 1000 ms 5848 KB Output is correct
19 Correct 987 ms 6152 KB Output is correct
20 Correct 992 ms 5968 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 10 ms 504 KB Output is correct
4 Correct 10 ms 604 KB Output is correct
5 Correct 15 ms 820 KB Output is correct
6 Correct 18 ms 760 KB Output is correct
7 Correct 36 ms 632 KB Output is correct
8 Correct 69 ms 772 KB Output is correct
9 Correct 74 ms 760 KB Output is correct
10 Correct 31 ms 888 KB Output is correct
11 Correct 27 ms 760 KB Output is correct
12 Correct 26 ms 764 KB Output is correct
13 Correct 33 ms 888 KB Output is correct
14 Correct 83 ms 760 KB Output is correct
15 Correct 13 ms 632 KB Output is correct
16 Correct 13 ms 528 KB Output is correct
17 Correct 58 ms 760 KB Output is correct
18 Correct 51 ms 860 KB Output is correct
19 Correct 69 ms 632 KB Output is correct
20 Correct 87 ms 632 KB Output is correct
21 Correct 1132 ms 4800 KB Output is correct
22 Correct 999 ms 4992 KB Output is correct
23 Correct 990 ms 4884 KB Output is correct
24 Correct 944 ms 5408 KB Output is correct
25 Correct 228 ms 7804 KB Output is correct
26 Correct 162 ms 7976 KB Output is correct
27 Correct 993 ms 4824 KB Output is correct
28 Correct 998 ms 4884 KB Output is correct
29 Correct 1008 ms 4848 KB Output is correct
30 Correct 1232 ms 2856 KB Output is correct
31 Correct 1296 ms 3316 KB Output is correct
32 Correct 709 ms 6188 KB Output is correct
33 Correct 244 ms 2884 KB Output is correct
34 Correct 235 ms 2796 KB Output is correct
35 Correct 238 ms 2740 KB Output is correct
36 Correct 250 ms 2780 KB Output is correct
37 Correct 589 ms 6812 KB Output is correct
38 Correct 1318 ms 2692 KB Output is correct
39 Correct 491 ms 7064 KB Output is correct
40 Correct 1206 ms 2936 KB Output is correct
41 Correct 3242 ms 4412 KB Output is correct
42 Correct 1838 ms 6560 KB Output is correct
43 Correct 2973 ms 2972 KB Output is correct
44 Correct 368 ms 7956 KB Output is correct
45 Correct 2492 ms 6436 KB Output is correct
46 Correct 3342 ms 4320 KB Output is correct
47 Correct 794 ms 7688 KB Output is correct
48 Correct 2291 ms 6400 KB Output is correct
49 Correct 1080 ms 5428 KB Output is correct
50 Correct 1000 ms 5848 KB Output is correct
51 Correct 987 ms 6152 KB Output is correct
52 Correct 992 ms 5968 KB Output is correct
53 Correct 251 ms 3552 KB Output is correct
54 Correct 251 ms 3512 KB Output is correct
55 Correct 229 ms 3448 KB Output is correct
56 Correct 239 ms 3508 KB Output is correct
57 Correct 1131 ms 4776 KB Output is correct
58 Correct 1125 ms 2800 KB Output is correct
59 Correct 842 ms 6076 KB Output is correct
60 Correct 1143 ms 2496 KB Output is correct
61 Correct 2740 ms 6504 KB Output is correct
62 Correct 990 ms 7816 KB Output is correct
63 Correct 566 ms 8140 KB Output is correct
64 Correct 913 ms 7888 KB Output is correct
65 Correct 3131 ms 3676 KB Output is correct
66 Correct 2967 ms 3432 KB Output is correct
67 Correct 2397 ms 6700 KB Output is correct
68 Correct 2823 ms 5372 KB Output is correct
69 Correct 1171 ms 5416 KB Output is correct
70 Correct 994 ms 5352 KB Output is correct
71 Correct 1006 ms 5436 KB Output is correct
72 Correct 1176 ms 5408 KB Output is correct
73 Correct 3273 ms 3952 KB Output is correct
74 Correct 2967 ms 5352 KB Output is correct
75 Correct 212 ms 8340 KB Output is correct
76 Correct 557 ms 8152 KB Output is correct
77 Correct 248 ms 3152 KB Output is correct
78 Correct 245 ms 3204 KB Output is correct
79 Correct 263 ms 3104 KB Output is correct
80 Correct 240 ms 3128 KB Output is correct
81 Correct 2987 ms 5284 KB Output is correct
82 Correct 3293 ms 3944 KB Output is correct
83 Correct 2872 ms 3332 KB Output is correct
84 Correct 3124 ms 5248 KB Output is correct
85 Correct 2163 ms 6660 KB Output is correct
86 Correct 2039 ms 6476 KB Output is correct
87 Correct 3156 ms 4660 KB Output is correct
88 Correct 3086 ms 3256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 10 ms 504 KB Output is correct
4 Correct 10 ms 604 KB Output is correct
5 Correct 15 ms 820 KB Output is correct
6 Correct 18 ms 760 KB Output is correct
7 Correct 36 ms 632 KB Output is correct
8 Correct 69 ms 772 KB Output is correct
9 Correct 74 ms 760 KB Output is correct
10 Correct 31 ms 888 KB Output is correct
11 Correct 27 ms 760 KB Output is correct
12 Correct 26 ms 764 KB Output is correct
13 Correct 33 ms 888 KB Output is correct
14 Correct 83 ms 760 KB Output is correct
15 Correct 13 ms 632 KB Output is correct
16 Correct 13 ms 528 KB Output is correct
17 Correct 58 ms 760 KB Output is correct
18 Correct 51 ms 860 KB Output is correct
19 Correct 69 ms 632 KB Output is correct
20 Correct 87 ms 632 KB Output is correct
21 Correct 1132 ms 4800 KB Output is correct
22 Correct 999 ms 4992 KB Output is correct
23 Correct 990 ms 4884 KB Output is correct
24 Correct 944 ms 5408 KB Output is correct
25 Correct 228 ms 7804 KB Output is correct
26 Correct 162 ms 7976 KB Output is correct
27 Correct 993 ms 4824 KB Output is correct
28 Correct 998 ms 4884 KB Output is correct
29 Correct 1008 ms 4848 KB Output is correct
30 Correct 1232 ms 2856 KB Output is correct
31 Correct 1296 ms 3316 KB Output is correct
32 Correct 709 ms 6188 KB Output is correct
33 Correct 259 ms 2644 KB Output is correct
34 Correct 228 ms 2756 KB Output is correct
35 Correct 340 ms 2780 KB Output is correct
36 Correct 236 ms 2800 KB Output is correct
37 Correct 480 ms 6548 KB Output is correct
38 Correct 607 ms 5596 KB Output is correct
39 Correct 562 ms 5904 KB Output is correct
40 Correct 184 ms 7828 KB Output is correct
41 Correct 665 ms 7828 KB Output is correct
42 Correct 2025 ms 6464 KB Output is correct
43 Correct 1665 ms 2876 KB Output is correct
44 Correct 1988 ms 6332 KB Output is correct
45 Correct 2428 ms 6228 KB Output is correct
46 Correct 3172 ms 3884 KB Output is correct
47 Correct 3113 ms 3616 KB Output is correct
48 Correct 2920 ms 3196 KB Output is correct
49 Correct 718 ms 5000 KB Output is correct
50 Correct 703 ms 4956 KB Output is correct
51 Correct 701 ms 4912 KB Output is correct
52 Correct 714 ms 4960 KB Output is correct
53 Correct 2081 ms 2808 KB Output is correct
54 Correct 3056 ms 4328 KB Output is correct
55 Correct 2855 ms 5856 KB Output is correct
56 Correct 3126 ms 4648 KB Output is correct
57 Correct 284 ms 2772 KB Output is correct
58 Correct 257 ms 2740 KB Output is correct
59 Correct 267 ms 2732 KB Output is correct
60 Correct 267 ms 2740 KB Output is correct
61 Correct 2534 ms 6156 KB Output is correct
62 Correct 2545 ms 6028 KB Output is correct
63 Correct 614 ms 7664 KB Output is correct
64 Correct 2047 ms 6428 KB Output is correct
65 Correct 2239 ms 6136 KB Output is correct
66 Correct 3065 ms 3504 KB Output is correct
67 Correct 2728 ms 5104 KB Output is correct
68 Correct 2119 ms 6440 KB Output is correct
69 Correct 244 ms 2884 KB Output is correct
70 Correct 235 ms 2796 KB Output is correct
71 Correct 238 ms 2740 KB Output is correct
72 Correct 250 ms 2780 KB Output is correct
73 Correct 589 ms 6812 KB Output is correct
74 Correct 1318 ms 2692 KB Output is correct
75 Correct 491 ms 7064 KB Output is correct
76 Correct 1206 ms 2936 KB Output is correct
77 Correct 3242 ms 4412 KB Output is correct
78 Correct 1838 ms 6560 KB Output is correct
79 Correct 2973 ms 2972 KB Output is correct
80 Correct 368 ms 7956 KB Output is correct
81 Correct 2492 ms 6436 KB Output is correct
82 Correct 3342 ms 4320 KB Output is correct
83 Correct 794 ms 7688 KB Output is correct
84 Correct 2291 ms 6400 KB Output is correct
85 Correct 1080 ms 5428 KB Output is correct
86 Correct 1000 ms 5848 KB Output is correct
87 Correct 987 ms 6152 KB Output is correct
88 Correct 992 ms 5968 KB Output is correct
89 Correct 251 ms 3552 KB Output is correct
90 Correct 251 ms 3512 KB Output is correct
91 Correct 229 ms 3448 KB Output is correct
92 Correct 239 ms 3508 KB Output is correct
93 Correct 1131 ms 4776 KB Output is correct
94 Correct 1125 ms 2800 KB Output is correct
95 Correct 842 ms 6076 KB Output is correct
96 Correct 1143 ms 2496 KB Output is correct
97 Correct 2740 ms 6504 KB Output is correct
98 Correct 990 ms 7816 KB Output is correct
99 Correct 566 ms 8140 KB Output is correct
100 Correct 913 ms 7888 KB Output is correct
101 Correct 3131 ms 3676 KB Output is correct
102 Correct 2967 ms 3432 KB Output is correct
103 Correct 2397 ms 6700 KB Output is correct
104 Correct 2823 ms 5372 KB Output is correct
105 Correct 1171 ms 5416 KB Output is correct
106 Correct 994 ms 5352 KB Output is correct
107 Correct 1006 ms 5436 KB Output is correct
108 Correct 1176 ms 5408 KB Output is correct
109 Correct 3273 ms 3952 KB Output is correct
110 Correct 2967 ms 5352 KB Output is correct
111 Correct 212 ms 8340 KB Output is correct
112 Correct 557 ms 8152 KB Output is correct
113 Correct 248 ms 3152 KB Output is correct
114 Correct 245 ms 3204 KB Output is correct
115 Correct 263 ms 3104 KB Output is correct
116 Correct 240 ms 3128 KB Output is correct
117 Correct 2987 ms 5284 KB Output is correct
118 Correct 3293 ms 3944 KB Output is correct
119 Correct 2872 ms 3332 KB Output is correct
120 Correct 3124 ms 5248 KB Output is correct
121 Correct 2163 ms 6660 KB Output is correct
122 Correct 2039 ms 6476 KB Output is correct
123 Correct 3156 ms 4660 KB Output is correct
124 Correct 3086 ms 3256 KB Output is correct
125 Correct 692 ms 5100 KB Output is correct
126 Correct 693 ms 5240 KB Output is correct
127 Correct 783 ms 5192 KB Output is correct
128 Correct 698 ms 5120 KB Output is correct
129 Correct 674 ms 5136 KB Output is correct
130 Correct 725 ms 5032 KB Output is correct
131 Correct 2760 ms 4244 KB Output is correct
132 Correct 2867 ms 8500 KB Output is correct
133 Runtime error 117 ms 20244 KB Execution killed with signal 11 (could be triggered by violating memory limits)
134 Halted 0 ms 0 KB -