Submission #758601

# Submission time Handle Problem Language Result Execution time Memory
758601 2023-06-15T00:08:01 Z scanhex Segments (IZhO18_segments) C++17
75 / 100
5000 ms 48188 KB
#include <bits/stdc++.h>

using namespace std;
using nagai = long long;

struct dss {
	vector<pair<int,int>> segs;
	void insert(int l, int r) {
		segs.push_back({l, r});
	}
	int get(int l, int r, int k) {
		if (k == 0) return segs.size();
		int res = 0;
		for (auto& x : segs) {
			int ll = max(x.first, l), rr = min(x.second, r); 
			if (rr - ll + 1 >= k)
				++res;
		}
		return res;
	}
};

const int oo = 0x3f3f3f3f;
 
struct static1d {
	vector<int> coords;
	void clear() {
		vector<int>{}.swap(coords);
	}

	void add(int c) {
		coords.push_back(c);
	}

	void finalize() {
	}

	int get(int l, int r) {
		if (l > r) return 0;
		auto itr = upper_bound(coords.begin(), coords.end(), r);
		auto itl = lower_bound(coords.begin(), coords.end(), l);
		//cerr << "coords\n";
		//for(auto& x : coords) 
			//cerr << x << ' ';
		//cerr << '\n';
		//cerr << l << ' ' << r << ' ' << itr - itl << '\n';
		return itr - itl;
	}
};

bool ycmp(pair<int, int> a, pair<int, int> b) {
	if (a.second != b.second)
		return a.second < b.second;
	return a.first < b.first;
}

struct static2d {
	vector<static1d> v;
	static1d all;
	vector<int> xs;

	void add(int x, int y) {
		for (++x; x < v.size(); x = (x | x - 1) + 1)
			v[x].add(y);
	}

	void build(vector<pair<int,int>> pts) {
		xs.clear();
		for (auto& x : v) 
			x.clear();
		for (auto& p : pts) 
			xs.push_back(p.first);
		sort(xs.begin(), xs.end());
		xs.erase(unique(xs.begin(), xs.end()), xs.end());
		v.resize(xs.size() + 1);
		all.clear();
		for (auto p : pts) {
			add(lower_bound(xs.begin(), xs.end(), p.first) - xs.begin(), p.second);
			all.add(p.second);
		}
		for (int i = 0; i < v.size(); ++i) 
			v[i].finalize();
		all.finalize();
	}

	int get(int xr, int y1, int y2) {
		if (xr == oo) 
			return all.get(y1, y2);
		if (xr < 0) return 0;
		++xr;
		int xrr = xr;
		xr = lower_bound(xs.begin(), xs.end(), xr) - xs.begin();
		int res = 0;
		for (; xr; xr &= xr - 1) 
			res += v[xr].get(y1, y2);
		//cerr << xrr << ' ' << y1 << ' ' << y2 << ' ' << res << '\n';
		return res;
	}

	// all inclusive
	int get(int x1, int x2, int y1, int y2) {
		if (x1 > x2) return 0;
		return get(x2, y1, y2) - get(x1 - 1, y1, y2);
	}
};

const int BL = 3000;

struct rofl2d {
	vector<pair<int,int>> all;
	vector<pair<int,int>> block;
	vector<pair<int,int>> erblock;
	vector<pair<int, int>> newall;
	static2d st;

	void check_rebuild() {
		if (block.size() + erblock.size() >= BL) {
			sort(block.begin(), block.end(), ycmp);
			newall.resize(all.size() + block.size());
			merge(all.begin(), all.end(), block.begin(), block.end(), newall.begin(), ycmp);
			sort(erblock.begin(), erblock.end(), ycmp);
			all.clear();
			int ptr = 0; 
			for (auto x : erblock) {
				 while (ptr < newall.size() && ycmp(newall[ptr], x))
					 all.push_back(newall[ptr++]);
				 // always true? 
				 ++ptr;
			}
			while (ptr < newall.size())
				all.push_back(newall[ptr++]);
			block.clear();
			erblock.clear();
			st.build(all);
		}
	}
	
	void insert(int x, int y) {
		block.push_back({x, y});
		check_rebuild();
	}

	void erase(int x, int y) {
		erblock.push_back({x, y});
		check_rebuild();
	}

	int get(int x1, int x2, int y1, int y2) {
		int res = st.get(x1, x2, y1, y2);
		for (auto p : block) 
			if (x1 <= p.first && p.first <= x2 && y1 <= p.second && p.second <= y2) 
				++res;
		for (auto p : erblock) 
			if (x1 <= p.first && p.first <= x2 && y1 <= p.second && p.second <= y2) 
				--res;
		return res;
	}
};


struct ds {
	int tot = 0;
	rofl2d rofl_l, rofl_r;
	rofl2d rofl_len;
	void insert(int l, int r) {
		++tot;
		rofl_l.insert(l, r - l);
		rofl_r.insert(r, r - l);
		//rofl_len.insert(0, r - l);
	}
	void erase(int l, int r) {
		--tot;
		rofl_l.erase(l, r - l);
		rofl_r.erase(r, r - l);
		//rofl_len.erase(0, r - l);
	}
	int get(int l, int r, int k) {
		if (r - l + 1 < k) return 0;
		if (k == 0) return tot;
		int res = tot;
		//cerr << "rofl_l" << '\n';
		res -= rofl_l.get(r - k + 2, oo, k - 1, oo);
		//cerr << "rofl_r" << '\n';
		res -= rofl_r.get(0, l + k - 2, k - 1, oo);
		//cerr << "rofl_len" << '\n';
		res -= rofl_l.get(0, oo, 0, k - 2);
		return res;
	}
};

void stress() {
	int C = 5;
	for (int i = 0; i < 10000; ++i) {
		ds smart;
		dss stupid;
		stringstream ss;
		for (int i = 0; i < 10; ++i) {
			int x = rand() % C, y = rand() % C;
			if (x > y) swap(x, y);
			ss << "1 " << x << ' ' << y << '\n';
			smart.insert(x, y);
			stupid.insert(x, y);

			int a = rand() % C, b = rand() % C, k = rand() % C;
			if (a > b) swap(a, b);
			if (smart.get(a, b, k) != stupid.get(a, b, k)) {
				ss << smart.get(a, b, k) << ' ' << stupid.get(a, b, k) << '\n';
				ss << "3 " << a << ' ' << b << ' ' << k << '\n';
				cerr << ss.str();
				exit(1);
			}
		}
	}
	exit(0);
}


int main() {
	//stress();
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n, t; 
	cin >> n >> t; 
	int lastans = 0;
	vector<pair<int, int>> segs;
	ds add;
	while (n--) {
		int tt;
		cin >> tt; 
		if (tt == 1) {
			int a, b;
			cin >> a >> b; 
			a ^= t * lastans;
			b ^= t * lastans;
			if (a > b) swap(a, b);
			segs.push_back({a, b});
			add.insert(a, b);
		}
		else if (tt == 2) {
			int id; 
			cin >> id; 
			--id;
			add.erase(segs[id].first, segs[id].second);
		}
		else {
			int a, b, k;
			cin >> a >> b >> k;
			a ^= t * lastans;
			b ^= t * lastans;
			if (a > b) swap(a, b);
			lastans = add.get(a, b, k);
			cout << lastans << '\n';
		}
	}
}

Compilation message

segments.cpp: In member function 'void static2d::add(int, int)':
segments.cpp:63:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<static1d>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   63 |   for (++x; x < v.size(); x = (x | x - 1) + 1)
      |             ~~^~~~~~~~~~
segments.cpp:63:38: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
   63 |   for (++x; x < v.size(); x = (x | x - 1) + 1)
      |                                    ~~^~~
segments.cpp: In member function 'void static2d::build(std::vector<std::pair<int, int> >)':
segments.cpp:81:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<static1d>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   81 |   for (int i = 0; i < v.size(); ++i)
      |                   ~~^~~~~~~~~~
segments.cpp: In member function 'int static2d::get(int, int, int)':
segments.cpp:91:7: warning: unused variable 'xrr' [-Wunused-variable]
   91 |   int xrr = xr;
      |       ^~~
segments.cpp: In member function 'void rofl2d::check_rebuild()':
segments.cpp:125:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  125 |      while (ptr < newall.size() && ycmp(newall[ptr], x))
      |             ~~~~^~~~~~~~~~~~~~~
segments.cpp:130:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  130 |    while (ptr < newall.size())
      |           ~~~~^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 20 ms 368 KB Output is correct
4 Correct 22 ms 384 KB Output is correct
5 Correct 14 ms 980 KB Output is correct
6 Correct 15 ms 980 KB Output is correct
7 Correct 23 ms 596 KB Output is correct
8 Correct 10 ms 956 KB Output is correct
9 Correct 10 ms 980 KB Output is correct
10 Correct 6 ms 980 KB Output is correct
11 Correct 55 ms 436 KB Output is correct
12 Correct 56 ms 440 KB Output is correct
13 Correct 7 ms 980 KB Output is correct
14 Correct 16 ms 852 KB Output is correct
15 Correct 21 ms 436 KB Output is correct
16 Correct 22 ms 440 KB Output is correct
17 Correct 25 ms 644 KB Output is correct
18 Correct 9 ms 980 KB Output is correct
19 Correct 18 ms 596 KB Output is correct
20 Correct 15 ms 648 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1322 ms 11812 KB Output is correct
2 Correct 1310 ms 12168 KB Output is correct
3 Correct 1308 ms 12012 KB Output is correct
4 Correct 878 ms 14104 KB Output is correct
5 Correct 1291 ms 23932 KB Output is correct
6 Correct 1265 ms 24948 KB Output is correct
7 Correct 1244 ms 11820 KB Output is correct
8 Correct 1292 ms 11744 KB Output is correct
9 Correct 1181 ms 11780 KB Output is correct
10 Correct 1139 ms 4892 KB Output is correct
11 Correct 355 ms 6816 KB Output is correct
12 Correct 1084 ms 18064 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 392 ms 1248 KB Output is correct
2 Correct 402 ms 1228 KB Output is correct
3 Correct 359 ms 1168 KB Output is correct
4 Correct 347 ms 1216 KB Output is correct
5 Correct 1180 ms 18736 KB Output is correct
6 Correct 622 ms 14632 KB Output is correct
7 Correct 1184 ms 15540 KB Output is correct
8 Correct 1234 ms 24040 KB Output is correct
9 Correct 1289 ms 23516 KB Output is correct
10 Correct 1044 ms 15788 KB Output is correct
11 Correct 408 ms 2016 KB Output is correct
12 Correct 1058 ms 18588 KB Output is correct
13 Correct 985 ms 14256 KB Output is correct
14 Correct 669 ms 7372 KB Output is correct
15 Correct 557 ms 6788 KB Output is correct
16 Correct 495 ms 4460 KB Output is correct
17 Correct 1087 ms 12436 KB Output is correct
18 Correct 1053 ms 11636 KB Output is correct
19 Correct 1057 ms 11688 KB Output is correct
20 Correct 1057 ms 12128 KB Output is correct
21 Correct 429 ms 2416 KB Output is correct
22 Correct 788 ms 9884 KB Output is correct
23 Correct 917 ms 13200 KB Output is correct
24 Correct 798 ms 10708 KB Output is correct
25 Correct 369 ms 1256 KB Output is correct
26 Correct 370 ms 1260 KB Output is correct
27 Correct 373 ms 1172 KB Output is correct
28 Correct 360 ms 1212 KB Output is correct
29 Correct 992 ms 14664 KB Output is correct
30 Correct 974 ms 14676 KB Output is correct
31 Correct 1367 ms 23292 KB Output is correct
32 Correct 1064 ms 16092 KB Output is correct
33 Correct 968 ms 14528 KB Output is correct
34 Correct 579 ms 6556 KB Output is correct
35 Correct 857 ms 12404 KB Output is correct
36 Correct 1036 ms 15508 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 449 ms 1256 KB Output is correct
2 Correct 462 ms 1168 KB Output is correct
3 Correct 483 ms 1144 KB Output is correct
4 Correct 465 ms 1248 KB Output is correct
5 Correct 1224 ms 20216 KB Output is correct
6 Correct 1484 ms 3480 KB Output is correct
7 Correct 1233 ms 20992 KB Output is correct
8 Correct 2005 ms 4916 KB Output is correct
9 Correct 859 ms 9860 KB Output is correct
10 Correct 1214 ms 20192 KB Output is correct
11 Correct 632 ms 4228 KB Output is correct
12 Correct 1317 ms 24408 KB Output is correct
13 Correct 965 ms 14460 KB Output is correct
14 Correct 734 ms 8004 KB Output is correct
15 Correct 1323 ms 22068 KB Output is correct
16 Correct 1108 ms 14996 KB Output is correct
17 Correct 1293 ms 12800 KB Output is correct
18 Correct 1332 ms 12048 KB Output is correct
19 Correct 1303 ms 12304 KB Output is correct
20 Correct 1373 ms 12392 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 20 ms 368 KB Output is correct
4 Correct 22 ms 384 KB Output is correct
5 Correct 14 ms 980 KB Output is correct
6 Correct 15 ms 980 KB Output is correct
7 Correct 23 ms 596 KB Output is correct
8 Correct 10 ms 956 KB Output is correct
9 Correct 10 ms 980 KB Output is correct
10 Correct 6 ms 980 KB Output is correct
11 Correct 55 ms 436 KB Output is correct
12 Correct 56 ms 440 KB Output is correct
13 Correct 7 ms 980 KB Output is correct
14 Correct 16 ms 852 KB Output is correct
15 Correct 21 ms 436 KB Output is correct
16 Correct 22 ms 440 KB Output is correct
17 Correct 25 ms 644 KB Output is correct
18 Correct 9 ms 980 KB Output is correct
19 Correct 18 ms 596 KB Output is correct
20 Correct 15 ms 648 KB Output is correct
21 Correct 1322 ms 11812 KB Output is correct
22 Correct 1310 ms 12168 KB Output is correct
23 Correct 1308 ms 12012 KB Output is correct
24 Correct 878 ms 14104 KB Output is correct
25 Correct 1291 ms 23932 KB Output is correct
26 Correct 1265 ms 24948 KB Output is correct
27 Correct 1244 ms 11820 KB Output is correct
28 Correct 1292 ms 11744 KB Output is correct
29 Correct 1181 ms 11780 KB Output is correct
30 Correct 1139 ms 4892 KB Output is correct
31 Correct 355 ms 6816 KB Output is correct
32 Correct 1084 ms 18064 KB Output is correct
33 Correct 449 ms 1256 KB Output is correct
34 Correct 462 ms 1168 KB Output is correct
35 Correct 483 ms 1144 KB Output is correct
36 Correct 465 ms 1248 KB Output is correct
37 Correct 1224 ms 20216 KB Output is correct
38 Correct 1484 ms 3480 KB Output is correct
39 Correct 1233 ms 20992 KB Output is correct
40 Correct 2005 ms 4916 KB Output is correct
41 Correct 859 ms 9860 KB Output is correct
42 Correct 1214 ms 20192 KB Output is correct
43 Correct 632 ms 4228 KB Output is correct
44 Correct 1317 ms 24408 KB Output is correct
45 Correct 965 ms 14460 KB Output is correct
46 Correct 734 ms 8004 KB Output is correct
47 Correct 1323 ms 22068 KB Output is correct
48 Correct 1108 ms 14996 KB Output is correct
49 Correct 1293 ms 12800 KB Output is correct
50 Correct 1332 ms 12048 KB Output is correct
51 Correct 1303 ms 12304 KB Output is correct
52 Correct 1373 ms 12392 KB Output is correct
53 Correct 467 ms 1276 KB Output is correct
54 Correct 459 ms 1228 KB Output is correct
55 Correct 462 ms 1164 KB Output is correct
56 Correct 451 ms 1160 KB Output is correct
57 Correct 1364 ms 7596 KB Output is correct
58 Correct 207 ms 2836 KB Output is correct
59 Correct 990 ms 14868 KB Output is correct
60 Correct 1225 ms 2204 KB Output is correct
61 Correct 1072 ms 14692 KB Output is correct
62 Correct 1221 ms 22204 KB Output is correct
63 Correct 1351 ms 23288 KB Output is correct
64 Correct 1277 ms 23228 KB Output is correct
65 Correct 614 ms 5504 KB Output is correct
66 Correct 535 ms 4260 KB Output is correct
67 Correct 1073 ms 15456 KB Output is correct
68 Correct 963 ms 11988 KB Output is correct
69 Correct 1282 ms 11776 KB Output is correct
70 Correct 1240 ms 11496 KB Output is correct
71 Correct 1301 ms 12140 KB Output is correct
72 Correct 1299 ms 11768 KB Output is correct
73 Correct 726 ms 6456 KB Output is correct
74 Correct 932 ms 11964 KB Output is correct
75 Correct 1341 ms 28260 KB Output is correct
76 Correct 1278 ms 23840 KB Output is correct
77 Correct 486 ms 1216 KB Output is correct
78 Correct 468 ms 1172 KB Output is correct
79 Correct 480 ms 1216 KB Output is correct
80 Correct 451 ms 1240 KB Output is correct
81 Correct 932 ms 11476 KB Output is correct
82 Correct 720 ms 6348 KB Output is correct
83 Correct 601 ms 3728 KB Output is correct
84 Correct 946 ms 11896 KB Output is correct
85 Correct 1004 ms 15604 KB Output is correct
86 Correct 1144 ms 17316 KB Output is correct
87 Correct 821 ms 9288 KB Output is correct
88 Correct 532 ms 3892 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 20 ms 368 KB Output is correct
4 Correct 22 ms 384 KB Output is correct
5 Correct 14 ms 980 KB Output is correct
6 Correct 15 ms 980 KB Output is correct
7 Correct 23 ms 596 KB Output is correct
8 Correct 10 ms 956 KB Output is correct
9 Correct 10 ms 980 KB Output is correct
10 Correct 6 ms 980 KB Output is correct
11 Correct 55 ms 436 KB Output is correct
12 Correct 56 ms 440 KB Output is correct
13 Correct 7 ms 980 KB Output is correct
14 Correct 16 ms 852 KB Output is correct
15 Correct 21 ms 436 KB Output is correct
16 Correct 22 ms 440 KB Output is correct
17 Correct 25 ms 644 KB Output is correct
18 Correct 9 ms 980 KB Output is correct
19 Correct 18 ms 596 KB Output is correct
20 Correct 15 ms 648 KB Output is correct
21 Correct 1322 ms 11812 KB Output is correct
22 Correct 1310 ms 12168 KB Output is correct
23 Correct 1308 ms 12012 KB Output is correct
24 Correct 878 ms 14104 KB Output is correct
25 Correct 1291 ms 23932 KB Output is correct
26 Correct 1265 ms 24948 KB Output is correct
27 Correct 1244 ms 11820 KB Output is correct
28 Correct 1292 ms 11744 KB Output is correct
29 Correct 1181 ms 11780 KB Output is correct
30 Correct 1139 ms 4892 KB Output is correct
31 Correct 355 ms 6816 KB Output is correct
32 Correct 1084 ms 18064 KB Output is correct
33 Correct 392 ms 1248 KB Output is correct
34 Correct 402 ms 1228 KB Output is correct
35 Correct 359 ms 1168 KB Output is correct
36 Correct 347 ms 1216 KB Output is correct
37 Correct 1180 ms 18736 KB Output is correct
38 Correct 622 ms 14632 KB Output is correct
39 Correct 1184 ms 15540 KB Output is correct
40 Correct 1234 ms 24040 KB Output is correct
41 Correct 1289 ms 23516 KB Output is correct
42 Correct 1044 ms 15788 KB Output is correct
43 Correct 408 ms 2016 KB Output is correct
44 Correct 1058 ms 18588 KB Output is correct
45 Correct 985 ms 14256 KB Output is correct
46 Correct 669 ms 7372 KB Output is correct
47 Correct 557 ms 6788 KB Output is correct
48 Correct 495 ms 4460 KB Output is correct
49 Correct 1087 ms 12436 KB Output is correct
50 Correct 1053 ms 11636 KB Output is correct
51 Correct 1057 ms 11688 KB Output is correct
52 Correct 1057 ms 12128 KB Output is correct
53 Correct 429 ms 2416 KB Output is correct
54 Correct 788 ms 9884 KB Output is correct
55 Correct 917 ms 13200 KB Output is correct
56 Correct 798 ms 10708 KB Output is correct
57 Correct 369 ms 1256 KB Output is correct
58 Correct 370 ms 1260 KB Output is correct
59 Correct 373 ms 1172 KB Output is correct
60 Correct 360 ms 1212 KB Output is correct
61 Correct 992 ms 14664 KB Output is correct
62 Correct 974 ms 14676 KB Output is correct
63 Correct 1367 ms 23292 KB Output is correct
64 Correct 1064 ms 16092 KB Output is correct
65 Correct 968 ms 14528 KB Output is correct
66 Correct 579 ms 6556 KB Output is correct
67 Correct 857 ms 12404 KB Output is correct
68 Correct 1036 ms 15508 KB Output is correct
69 Correct 449 ms 1256 KB Output is correct
70 Correct 462 ms 1168 KB Output is correct
71 Correct 483 ms 1144 KB Output is correct
72 Correct 465 ms 1248 KB Output is correct
73 Correct 1224 ms 20216 KB Output is correct
74 Correct 1484 ms 3480 KB Output is correct
75 Correct 1233 ms 20992 KB Output is correct
76 Correct 2005 ms 4916 KB Output is correct
77 Correct 859 ms 9860 KB Output is correct
78 Correct 1214 ms 20192 KB Output is correct
79 Correct 632 ms 4228 KB Output is correct
80 Correct 1317 ms 24408 KB Output is correct
81 Correct 965 ms 14460 KB Output is correct
82 Correct 734 ms 8004 KB Output is correct
83 Correct 1323 ms 22068 KB Output is correct
84 Correct 1108 ms 14996 KB Output is correct
85 Correct 1293 ms 12800 KB Output is correct
86 Correct 1332 ms 12048 KB Output is correct
87 Correct 1303 ms 12304 KB Output is correct
88 Correct 1373 ms 12392 KB Output is correct
89 Correct 467 ms 1276 KB Output is correct
90 Correct 459 ms 1228 KB Output is correct
91 Correct 462 ms 1164 KB Output is correct
92 Correct 451 ms 1160 KB Output is correct
93 Correct 1364 ms 7596 KB Output is correct
94 Correct 207 ms 2836 KB Output is correct
95 Correct 990 ms 14868 KB Output is correct
96 Correct 1225 ms 2204 KB Output is correct
97 Correct 1072 ms 14692 KB Output is correct
98 Correct 1221 ms 22204 KB Output is correct
99 Correct 1351 ms 23288 KB Output is correct
100 Correct 1277 ms 23228 KB Output is correct
101 Correct 614 ms 5504 KB Output is correct
102 Correct 535 ms 4260 KB Output is correct
103 Correct 1073 ms 15456 KB Output is correct
104 Correct 963 ms 11988 KB Output is correct
105 Correct 1282 ms 11776 KB Output is correct
106 Correct 1240 ms 11496 KB Output is correct
107 Correct 1301 ms 12140 KB Output is correct
108 Correct 1299 ms 11768 KB Output is correct
109 Correct 726 ms 6456 KB Output is correct
110 Correct 932 ms 11964 KB Output is correct
111 Correct 1341 ms 28260 KB Output is correct
112 Correct 1278 ms 23840 KB Output is correct
113 Correct 486 ms 1216 KB Output is correct
114 Correct 468 ms 1172 KB Output is correct
115 Correct 480 ms 1216 KB Output is correct
116 Correct 451 ms 1240 KB Output is correct
117 Correct 932 ms 11476 KB Output is correct
118 Correct 720 ms 6348 KB Output is correct
119 Correct 601 ms 3728 KB Output is correct
120 Correct 946 ms 11896 KB Output is correct
121 Correct 1004 ms 15604 KB Output is correct
122 Correct 1144 ms 17316 KB Output is correct
123 Correct 821 ms 9288 KB Output is correct
124 Correct 532 ms 3892 KB Output is correct
125 Correct 918 ms 1692 KB Output is correct
126 Correct 929 ms 1884 KB Output is correct
127 Correct 924 ms 1892 KB Output is correct
128 Correct 931 ms 1752 KB Output is correct
129 Correct 906 ms 1896 KB Output is correct
130 Correct 923 ms 1852 KB Output is correct
131 Correct 3267 ms 5424 KB Output is correct
132 Correct 2001 ms 22780 KB Output is correct
133 Correct 3247 ms 32772 KB Output is correct
134 Correct 4152 ms 8112 KB Output is correct
135 Correct 3961 ms 37784 KB Output is correct
136 Correct 946 ms 1812 KB Output is correct
137 Execution timed out 5051 ms 48188 KB Time limit exceeded
138 Halted 0 ms 0 KB -