답안 #571694

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
571694 2022-06-02T14:39:06 Z 8e7 IOI 바이러스 (JOI21_fever) C++17
37 / 100
5000 ms 65564 KB
//Challenge: Accepted
#include <bits/stdc++.h>
using namespace std;
#ifdef zisk 
void debug(){cout << endl;}
template<class T, class ... U> void debug(T a, U ... b){cout << a << " ", debug(b...);}
template<class T> void pary(T l, T r) {
	while (l != r) cout << *l << " ", l++;
	cout << endl;
}
#else
#define debug(...) 0
#define pary(...) 0
#endif
#define ll long long
#define maxn 200005
#define pii pair<int, int>
#define x first
#define y second
#define ff first
#define ss second
#define io ios_base::sync_with_stdio(0);cin.tie(0);
const ll inf = 1e9 + 7;
pii a[maxn];
unordered_map<int, set<pii> > horz[4], vert[4], ru[4], rd[4];
unordered_map<ll, int> mp;
ll h(pii p) {
	return (ll)inf * p.x + p.y;
}
struct pnt{
	pii p;
	int t, d;
	pnt(){t = d = 0;}
	pnt(pii P, int ti, int di){p = P, t = ti, d = di;}
};
int mov[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
int movru[4][2] = {{1, 1}, {1, 1}, {-1, -1}, {-1, -1}};
int movrd[4][2] = {{1, -1}, {-1, 1}, {-1, 1}, {1, -1}};

int mind[maxn][3], di[maxn];
bool vis[maxn];
int main() {
	io
	int n;
	cin >> n;
	for (int i = 0;i < n;i++) {
		cin >> a[i].x >> a[i].y;
		a[i].x *= 2, a[i].y *= 2;
		mp[h(a[i])] = i;		
	}
	int ans = 0;
	for (int init_d = 0;init_d < 4;init_d++) {
		for (int i = 0;i < 4;i++) {
			horz[i].clear(), vert[i].clear(), ru[i].clear(), rd[i].clear();
		}
		for (int i = 0;i < n;i++) {
			mind[i][0] = mind[i][1] = mind[i][2] = inf;
			vis[i] = 0;
			if (i == 0) continue;
			int dx = a[i].x - a[0].x, dy = a[i].y - a[0].y;
			if (abs(dx) > abs(dy)) {
				di[i] = dx > 0 ? 2 : 0;
			} else if (abs(dx) < abs(dy)) {
				di[i] = dy > 0 ? 3 : 1;
			} else {
				pii tmp = {dx, dy};		
				for (int j = 0;j < 4 - init_d;j++) tmp = {-tmp.y, tmp.x};
				if (tmp.x > 0) di[i] = tmp.y > 0 ? 3 : 1;
				else di[i] = 0;
				di[i] = (di[i] + init_d)%4;
			}
			if (di[i] % 2) {
				vert[di[i]][a[i].x].insert(a[i]);
			} else {
				horz[di[i]][a[i].y].insert(a[i]);
			}
			ru[di[i]][a[i].x - a[i].y].insert(a[i]);
			rd[di[i]][a[i].x + a[i].y].insert(a[i]);
		}
		mind[0][0] = 0;
		di[0] = init_d;


		auto col = [&] (int i, int j) {
			int dx = a[j].x - a[i].x, dy = a[j].y - a[i].y;			
			int divx = mov[di[i]][0] - mov[di[j]][0], divy = mov[di[i]][1] - mov[di[j]][1];
			if (dx && divx == 0) return -1;	
			if (dy && divy == 0) return -1;	
			if (dx == 0) {
				if (abs(di[i] - di[j]) == 2) return dy / divy;
				return -1;
			}
			if (dy == 0) {
				if (abs(di[i] - di[j]) == 2) return dx / divx;
				return -1;
			}
			if (dx * divy != dy * divx) return -1;
			return dx / divx;
		};
		

		priority_queue<pii, vector<pii>, greater<pii> > pq;
		pq.push({0, 0});
		pii cur;
		int id, prv = 0, ti;

		auto relax = [&](pii p, int d, int val) {
			int ind = mp[h(p)];
			if (val >= ti && val < mind[ind][d]) {
				mind[ind][d] = val;
				pq.push({val, ind * 3 + d});
			}
		};
		auto upd = [&] (set<pii> &se, auto it, int d, bool type) {
			pii p;
			if (type == 0) {
				if (it != se.begin()) {
					p = *prev(it);
				} else {
					return;
				}
			} else {
				if (it != se.end()) {
					p = *it;
				} else {
					return;
				}
			}
			relax(p, d, col(id, mp[h(p)]));
		};
		auto to = [&] (set<pii> &se, bool type) { //0:prev, 1:next
			auto it = se.lower_bound(cur);
			pii q;	
			if (type && next(it) != se.end()) {
				q = *next(it);	
			} else if (type == 0 && it != se.begin()) {
				q = *prev(it);
			}
			int val = (abs(q.y - cur.y) + abs(q.x - cur.x)) / 2;
			relax(q, prv, ti + val);
		};

		auto cl = [&] (set<pii> &se, auto it, int d, bool type) {
			auto iter = se.begin();
			vector<pii> tmp;
			if (type == 0) {
				while (iter != it) {
					tmp.push_back(*iter);
					iter = next(iter);
				}
			} else {
				iter = it;
				while (iter != se.end()) {
					tmp.push_back(*iter);
					iter = next(iter);
				}
			}
			for (auto p:tmp) relax(p, d, col(id, mp[h(p)]));
		};
		while (pq.size()) {
			id = pq.top().ss / 3, prv = pq.top().ss % 3;
			ti = pq.top().ff;
			pq.pop();
			if (ti != mind[id][prv]) continue;
			debug("cur", id, prv, ti, di[id]);
			cur = a[id];
			vis[id] = 1;
			int dir = di[id];
			pii pos = {cur.x + mov[dir][0] * ti, cur.y + mov[dir][1] * ti};
			if (dir % 2 == 0) {
				auto se = horz[(dir+2)%4][pos.y];
				if (dir == 0) cl(se, se.lower_bound(pos), 0, 1);
				else cl(se, se.upper_bound(pos), 0, 0);
			} else {
				auto se = vert[(dir+2)%4][pos.x];
				if (dir == 1) cl(se, se.lower_bound(pos), 0, 1);
				else cl(se, se.upper_bound(pos), 0, 0);
			}
			pos = {cur.x + movru[dir][0] * ti, cur.y + movru[dir][1] * ti};
			auto se = ru[(3 - dir)][pos.x - pos.y];
			if (dir < 2) upd(se, se.lower_bound(pos), 1, 1);
			else upd(se, se.upper_bound(pos), 1, 0);

			pos = {cur.x + movrd[dir][0] * ti, cur.y + movrd[dir][1] * ti};
			se = rd[(dir < 2 ? 1 - dir : 5 - dir)][pos.x + pos.y];
			if (dir == 0 || dir == 3) upd(se, se.lower_bound(pos), 2, 1);	
			else upd(se, se.upper_bound(pos), 2, 0);	
			
			if (id == 0) continue;
			if (prv == 0) {
				if (dir % 2 == 0) to(horz[dir][cur.y], dir == 2);
				else to(vert[dir][cur.x], dir == 3);
			} else if (prv == 1) {
				to(ru[dir][cur.x - cur.y], dir >= 2);
			} else {
				to(rd[dir][cur.x + cur.y], dir == 1 || dir == 2);
			}
		}
		int cnt = 0;
		for (int i = 0;i < n;i++) {
			if (vis[i]) cnt++;
		}
		ans = max(ans, cnt);
	}
	cout << ans << "\n";
}

Compilation message

fever.cpp: In function 'int main()':
fever.cpp:12:20: warning: statement has no effect [-Wunused-value]
   12 | #define debug(...) 0
      |                    ^
fever.cpp:165:4: note: in expansion of macro 'debug'
  165 |    debug("cur", id, prv, ti, di[id]);
      |    ^~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 0 ms 340 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 0 ms 340 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 0 ms 340 KB Output is correct
31 Correct 0 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 0 ms 340 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 0 ms 340 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 0 ms 340 KB Output is correct
31 Correct 0 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 0 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 0 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 0 ms 340 KB Output is correct
44 Correct 0 ms 340 KB Output is correct
45 Correct 0 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 0 ms 340 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 0 ms 340 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 0 ms 340 KB Output is correct
31 Correct 0 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 0 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 0 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 0 ms 340 KB Output is correct
44 Correct 0 ms 340 KB Output is correct
45 Correct 0 ms 340 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 0 ms 340 KB Output is correct
48 Correct 1 ms 340 KB Output is correct
49 Correct 1 ms 340 KB Output is correct
50 Correct 1 ms 340 KB Output is correct
51 Correct 1 ms 340 KB Output is correct
52 Correct 1 ms 340 KB Output is correct
53 Correct 1 ms 340 KB Output is correct
54 Correct 1 ms 340 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 1 ms 340 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 1 ms 340 KB Output is correct
61 Correct 1 ms 340 KB Output is correct
62 Correct 1 ms 340 KB Output is correct
63 Correct 1 ms 340 KB Output is correct
64 Correct 1 ms 340 KB Output is correct
65 Correct 1 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 0 ms 340 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 0 ms 340 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 0 ms 340 KB Output is correct
31 Correct 0 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 0 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 0 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 0 ms 340 KB Output is correct
44 Correct 0 ms 340 KB Output is correct
45 Correct 0 ms 340 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 0 ms 340 KB Output is correct
48 Correct 1 ms 340 KB Output is correct
49 Correct 1 ms 340 KB Output is correct
50 Correct 1 ms 340 KB Output is correct
51 Correct 1 ms 340 KB Output is correct
52 Correct 1 ms 340 KB Output is correct
53 Correct 1 ms 340 KB Output is correct
54 Correct 1 ms 340 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 1 ms 340 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 1 ms 340 KB Output is correct
61 Correct 1 ms 340 KB Output is correct
62 Correct 1 ms 340 KB Output is correct
63 Correct 1 ms 340 KB Output is correct
64 Correct 1 ms 340 KB Output is correct
65 Correct 1 ms 340 KB Output is correct
66 Correct 6 ms 1620 KB Output is correct
67 Correct 6 ms 1620 KB Output is correct
68 Correct 7 ms 1816 KB Output is correct
69 Correct 56 ms 1108 KB Output is correct
70 Correct 11 ms 1236 KB Output is correct
71 Correct 7 ms 1236 KB Output is correct
72 Correct 6 ms 1620 KB Output is correct
73 Correct 7 ms 1832 KB Output is correct
74 Correct 10 ms 2260 KB Output is correct
75 Correct 200 ms 2260 KB Output is correct
76 Correct 13 ms 1748 KB Output is correct
77 Correct 10 ms 1644 KB Output is correct
78 Correct 8 ms 1896 KB Output is correct
79 Correct 9 ms 1956 KB Output is correct
80 Correct 6 ms 1748 KB Output is correct
81 Correct 8 ms 1876 KB Output is correct
82 Correct 117 ms 2292 KB Output is correct
83 Correct 587 ms 2380 KB Output is correct
84 Correct 6 ms 1492 KB Output is correct
85 Correct 6 ms 1120 KB Output is correct
86 Correct 7 ms 980 KB Output is correct
87 Correct 5 ms 1244 KB Output is correct
88 Correct 8 ms 2132 KB Output is correct
89 Correct 9 ms 2084 KB Output is correct
90 Correct 11 ms 2108 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 0 ms 340 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 0 ms 340 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 0 ms 340 KB Output is correct
31 Correct 0 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 0 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 0 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 0 ms 340 KB Output is correct
44 Correct 0 ms 340 KB Output is correct
45 Correct 0 ms 340 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 0 ms 340 KB Output is correct
48 Correct 1 ms 340 KB Output is correct
49 Correct 1 ms 340 KB Output is correct
50 Correct 1 ms 340 KB Output is correct
51 Correct 1 ms 340 KB Output is correct
52 Correct 1 ms 340 KB Output is correct
53 Correct 1 ms 340 KB Output is correct
54 Correct 1 ms 340 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 1 ms 340 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 1 ms 340 KB Output is correct
61 Correct 1 ms 340 KB Output is correct
62 Correct 1 ms 340 KB Output is correct
63 Correct 1 ms 340 KB Output is correct
64 Correct 1 ms 340 KB Output is correct
65 Correct 1 ms 340 KB Output is correct
66 Correct 574 ms 35912 KB Output is correct
67 Correct 731 ms 44664 KB Output is correct
68 Correct 816 ms 48124 KB Output is correct
69 Correct 935 ms 65564 KB Output is correct
70 Execution timed out 5060 ms 42240 KB Time limit exceeded
71 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 0 ms 340 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 0 ms 340 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 340 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 0 ms 340 KB Output is correct
31 Correct 0 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 0 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 0 ms 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 0 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 0 ms 340 KB Output is correct
44 Correct 0 ms 340 KB Output is correct
45 Correct 0 ms 340 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 0 ms 340 KB Output is correct
48 Correct 1 ms 340 KB Output is correct
49 Correct 1 ms 340 KB Output is correct
50 Correct 1 ms 340 KB Output is correct
51 Correct 1 ms 340 KB Output is correct
52 Correct 1 ms 340 KB Output is correct
53 Correct 1 ms 340 KB Output is correct
54 Correct 1 ms 340 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 1 ms 340 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 1 ms 340 KB Output is correct
61 Correct 1 ms 340 KB Output is correct
62 Correct 1 ms 340 KB Output is correct
63 Correct 1 ms 340 KB Output is correct
64 Correct 1 ms 340 KB Output is correct
65 Correct 1 ms 340 KB Output is correct
66 Correct 6 ms 1620 KB Output is correct
67 Correct 6 ms 1620 KB Output is correct
68 Correct 7 ms 1816 KB Output is correct
69 Correct 56 ms 1108 KB Output is correct
70 Correct 11 ms 1236 KB Output is correct
71 Correct 7 ms 1236 KB Output is correct
72 Correct 6 ms 1620 KB Output is correct
73 Correct 7 ms 1832 KB Output is correct
74 Correct 10 ms 2260 KB Output is correct
75 Correct 200 ms 2260 KB Output is correct
76 Correct 13 ms 1748 KB Output is correct
77 Correct 10 ms 1644 KB Output is correct
78 Correct 8 ms 1896 KB Output is correct
79 Correct 9 ms 1956 KB Output is correct
80 Correct 6 ms 1748 KB Output is correct
81 Correct 8 ms 1876 KB Output is correct
82 Correct 117 ms 2292 KB Output is correct
83 Correct 587 ms 2380 KB Output is correct
84 Correct 6 ms 1492 KB Output is correct
85 Correct 6 ms 1120 KB Output is correct
86 Correct 7 ms 980 KB Output is correct
87 Correct 5 ms 1244 KB Output is correct
88 Correct 8 ms 2132 KB Output is correct
89 Correct 9 ms 2084 KB Output is correct
90 Correct 11 ms 2108 KB Output is correct
91 Correct 574 ms 35912 KB Output is correct
92 Correct 731 ms 44664 KB Output is correct
93 Correct 816 ms 48124 KB Output is correct
94 Correct 935 ms 65564 KB Output is correct
95 Execution timed out 5060 ms 42240 KB Time limit exceeded
96 Halted 0 ms 0 KB -