답안 #643595

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
643595 2022-09-22T15:00:30 Z ghostwriter Vision Program (IOI19_vision) C++14
100 / 100
26 ms 4364 KB
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include <debug.h>
#include "grader.cpp"
#endif
#define ft front
#define bk back
#define st first
#define nd second
#define ins insert
#define ers erase
#define pb push_back
#define pf push_front
#define _pb pop_back
#define _pf pop_front
#define lb lower_bound
#define ub upper_bound
#define mtp make_tuple
#define bg begin
#define ed end
#define all(x) (x).bg(), (x).ed()
#define sz(x) (int)(x).size()
typedef long long ll; typedef unsigned long long ull;
typedef double db; typedef long double ldb;
typedef pair<int, int> pi; typedef pair<ll, ll> pll;
typedef vector<int> vi; typedef vector<ll> vll; typedef vector<pi> vpi; typedef vector<pll> vpll;
typedef string str;
template<typename T> T gcd(T a, T b) { return (b == 0? a : gcd(b, a % b)); }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
#define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
#define FOS(i, r, l) for (int (i) = (r); (i) >= (l); --(i))
#define EACH(i, x) for (auto &(i) : (x))
#define WHILE while
#define file "TEST"
mt19937 rd(chrono::steady_clock::now().time_since_epoch().count());
ll rand(ll l, ll r) { return uniform_int_distribution<ll>(l, r)(rd); }
/*
    Tran The Bao
    VOI23 gold medal
*/
namespace subtask1235 {
	void construct_network(int H, int W, int K) {
		vi ans;
		FOR(i, 0, H - 1)
		FOR(j, 0, W - 1) {
			vi tmp;
			FOR(x, i, H - 1)
			FOR(y, 0, W - 1) {
				if (x == i && y <= j) continue;
				if (abs(i - x) + abs(j - y) != K) continue;
				int index = x * W + y;
				tmp.pb(index);
			}
			if (tmp.empty()) continue;
			int pos = add_or({tmp});
			pos = add_and({i * W + j, pos});
			ans.pb(pos);
		}
		add_or(ans);
	}
}
namespace solution {
	const int N = 605;
	const int D = 200;
	int c[N][N], d1[N], d2[N];
	void construct_network(int H, int W, int K) {
		FOR(i, 0, H - 1)
		FOR(j, 0, W - 1) {
			if (c[i][j]) continue;
			vi tmp;
			int x = i, y = j;
			WHILE(x >= 0 && y >= 0) {
				tmp.pb(x * W + y);
				c[x][y] = 1;
				--x;
				--y;
			}
			x = i;
			y = j;
			++x;
			++y;
			WHILE(x < H && y < W) {
				tmp.pb(x * W + y);
				c[x][y] = 1;
				++x;
				++y;
			}
			d1[i - j + D] = add_or(tmp);
		}
		memset(c, 0, sizeof c);
		FOR(i, 0, H - 1)
		FOR(j, 0, W - 1) {
			if (c[i][j]) continue;
			vi tmp;
			int x = i, y = j;
			WHILE(x >= 0 && y < W) {
				tmp.pb(x * W + y);
				c[x][y] = 1;
				--x;
				++y;
			}
			++x;
			--y;
			WHILE(x < H && y >= 0) {
				tmp.pb(x * W + y);
				c[x][y] = 1;
				++x;
				--y;
			}
			d2[i + j + D] = add_or(tmp);
		}
		vi tmp;
		FOR(i, 0, N - 1) {
			if (!d1[i]) continue;
			int x = i - D, pos1 = d1[i];
			FOR(j, 0, i - 1) {
				if (!d1[j]) continue;
				int y = j - D, pos2 = d1[j];
				if (abs(x - y) != K) continue;
				tmp.pb(add_and({pos1, pos2}));
			}
		}
		FOR(i, 0, N - 1) {
			if (!d2[i]) continue;
			int x = i - D, pos1 = d2[i];
			FOR(j, 0, i - 1) {
				if (!d2[j]) continue;
				int y = j - D, pos2 = d2[j];
				if (abs(x - y) != K) continue;
				tmp.pb(add_and({pos1, pos2}));
			}
		}
		int posk = add_or(tmp);
		if (K == W + H - 2) {
			add_and({posk});
			return;
		}
		tmp.clear();
		FOR(i, 0, N - 1) {
			if (!d1[i]) continue;
			int x = i - D, pos1 = d1[i];
			vi tmp1;
			FOR(j, 0, i - 1) {
				if (!d1[j]) continue;
				int y = j - D, pos2 = d1[j];
				if (abs(x - y) <= K) continue;
				tmp1.pb(pos2);
			}
			if (tmp1.empty()) continue;
			int pos3 = add_or(tmp1);
			tmp.pb(add_and({pos1, pos3}));
		}
		FOR(i, 0, N - 1) {
			if (!d2[i]) continue;
			int x = i - D, pos1 = d2[i];
			vi tmp1;
			FOR(j, 0, i - 1) {
				if (!d2[j]) continue;
				int y = j - D, pos2 = d2[j];
				if (abs(x - y) <= K) continue;
				tmp1.pb(pos2);
			}
			if (tmp1.empty()) continue;
			int pos3 = add_or(tmp1);
			tmp.pb(add_and({pos1, pos3}));
		}
		int posgk = add_or(tmp);
		posgk = add_not(posgk);
		add_and({posk, posgk});
	}
}
void construct_network(int H, int W, int K) {
	// if (max(H, W) <= 30 || min(H, W) == 1) {
	// 	subtask1235::construct_network(H, W, K);
	// 	return;
	// }
	solution::construct_network(H, W, K);
}
/*	
3 3 1
1 1 1 2
-1
*/
/*
From Benq:
    stuff you should look for
        * int overflow, array bounds
        * special cases (n=1?)
        * do smth instead of nothing and stay organized
        * WRITE STUFF DOWN
        * DON'T GET STUCK ON ONE APPROACH
*/

Compilation message

vision.cpp: In function 'void subtask1235::construct_network(int, int, int)':
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:46:3: note: in expansion of macro 'FOR'
   46 |   FOR(i, 0, H - 1)
      |   ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:47:3: note: in expansion of macro 'FOR'
   47 |   FOR(j, 0, W - 1) {
      |   ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'x' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:49:4: note: in expansion of macro 'FOR'
   49 |    FOR(x, i, H - 1)
      |    ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'y' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:50:4: note: in expansion of macro 'FOR'
   50 |    FOR(y, 0, W - 1) {
      |    ^~~
vision.cpp: In function 'void solution::construct_network(int, int, int)':
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:69:3: note: in expansion of macro 'FOR'
   69 |   FOR(i, 0, H - 1)
      |   ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:70:3: note: in expansion of macro 'FOR'
   70 |   FOR(j, 0, W - 1) {
      |   ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:93:3: note: in expansion of macro 'FOR'
   93 |   FOR(i, 0, H - 1)
      |   ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:94:3: note: in expansion of macro 'FOR'
   94 |   FOR(j, 0, W - 1) {
      |   ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:115:3: note: in expansion of macro 'FOR'
  115 |   FOR(i, 0, N - 1) {
      |   ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:118:4: note: in expansion of macro 'FOR'
  118 |    FOR(j, 0, i - 1) {
      |    ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:125:3: note: in expansion of macro 'FOR'
  125 |   FOR(i, 0, N - 1) {
      |   ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:128:4: note: in expansion of macro 'FOR'
  128 |    FOR(j, 0, i - 1) {
      |    ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:141:3: note: in expansion of macro 'FOR'
  141 |   FOR(i, 0, N - 1) {
      |   ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:145:4: note: in expansion of macro 'FOR'
  145 |    FOR(j, 0, i - 1) {
      |    ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:155:3: note: in expansion of macro 'FOR'
  155 |   FOR(i, 0, N - 1) {
      |   ^~~
vision.cpp:32:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   32 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
      |                               ^
vision.cpp:159:4: note: in expansion of macro 'FOR'
  159 |    FOR(j, 0, i - 1) {
      |    ^~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1620 KB Output is correct
2 Correct 1 ms 1620 KB Output is correct
3 Correct 1 ms 1620 KB Output is correct
4 Correct 1 ms 1620 KB Output is correct
5 Correct 1 ms 1748 KB Output is correct
6 Correct 2 ms 1620 KB Output is correct
7 Correct 1 ms 1620 KB Output is correct
8 Correct 2 ms 1620 KB Output is correct
9 Correct 2 ms 1748 KB Output is correct
10 Correct 1 ms 1620 KB Output is correct
11 Correct 1 ms 1748 KB Output is correct
12 Correct 1 ms 1620 KB Output is correct
13 Correct 1 ms 1748 KB Output is correct
14 Correct 1 ms 1620 KB Output is correct
15 Correct 1 ms 1620 KB Output is correct
16 Correct 1 ms 1748 KB Output is correct
17 Correct 1 ms 1620 KB Output is correct
18 Correct 1 ms 1620 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1620 KB Output is correct
2 Correct 1 ms 1620 KB Output is correct
3 Correct 1 ms 1620 KB Output is correct
4 Correct 1 ms 1620 KB Output is correct
5 Correct 1 ms 1748 KB Output is correct
6 Correct 2 ms 1620 KB Output is correct
7 Correct 1 ms 1620 KB Output is correct
8 Correct 2 ms 1620 KB Output is correct
9 Correct 2 ms 1748 KB Output is correct
10 Correct 1 ms 1620 KB Output is correct
11 Correct 1 ms 1748 KB Output is correct
12 Correct 1 ms 1620 KB Output is correct
13 Correct 1 ms 1748 KB Output is correct
14 Correct 1 ms 1620 KB Output is correct
15 Correct 1 ms 1620 KB Output is correct
16 Correct 1 ms 1748 KB Output is correct
17 Correct 1 ms 1620 KB Output is correct
18 Correct 1 ms 1620 KB Output is correct
19 Correct 1 ms 1620 KB Output is correct
20 Correct 1 ms 1748 KB Output is correct
21 Correct 1 ms 1748 KB Output is correct
22 Correct 1 ms 1620 KB Output is correct
23 Correct 1 ms 1748 KB Output is correct
24 Correct 2 ms 1748 KB Output is correct
25 Correct 1 ms 1748 KB Output is correct
26 Correct 1 ms 1748 KB Output is correct
27 Correct 1 ms 1748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1620 KB Output is correct
2 Correct 1 ms 1620 KB Output is correct
3 Correct 1 ms 1620 KB Output is correct
4 Correct 1 ms 1620 KB Output is correct
5 Correct 1 ms 1748 KB Output is correct
6 Correct 2 ms 1620 KB Output is correct
7 Correct 1 ms 1620 KB Output is correct
8 Correct 2 ms 1620 KB Output is correct
9 Correct 2 ms 1748 KB Output is correct
10 Correct 1 ms 1620 KB Output is correct
11 Correct 1 ms 1748 KB Output is correct
12 Correct 1 ms 1620 KB Output is correct
13 Correct 1 ms 1748 KB Output is correct
14 Correct 1 ms 1620 KB Output is correct
15 Correct 1 ms 1620 KB Output is correct
16 Correct 1 ms 1748 KB Output is correct
17 Correct 1 ms 1620 KB Output is correct
18 Correct 1 ms 1620 KB Output is correct
19 Correct 1 ms 1620 KB Output is correct
20 Correct 1 ms 1748 KB Output is correct
21 Correct 1 ms 1748 KB Output is correct
22 Correct 1 ms 1620 KB Output is correct
23 Correct 1 ms 1748 KB Output is correct
24 Correct 2 ms 1748 KB Output is correct
25 Correct 1 ms 1748 KB Output is correct
26 Correct 1 ms 1748 KB Output is correct
27 Correct 1 ms 1748 KB Output is correct
28 Correct 1 ms 1748 KB Output is correct
29 Correct 1 ms 1748 KB Output is correct
30 Correct 1 ms 1748 KB Output is correct
31 Correct 1 ms 1748 KB Output is correct
32 Correct 1 ms 1748 KB Output is correct
33 Correct 2 ms 1748 KB Output is correct
34 Correct 1 ms 1748 KB Output is correct
35 Correct 1 ms 1748 KB Output is correct
36 Correct 1 ms 1748 KB Output is correct
37 Correct 2 ms 1748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1620 KB Output is correct
2 Correct 1 ms 1620 KB Output is correct
3 Correct 1 ms 1620 KB Output is correct
4 Correct 1 ms 1620 KB Output is correct
5 Correct 1 ms 1748 KB Output is correct
6 Correct 2 ms 1620 KB Output is correct
7 Correct 1 ms 1620 KB Output is correct
8 Correct 2 ms 1620 KB Output is correct
9 Correct 2 ms 1748 KB Output is correct
10 Correct 1 ms 1620 KB Output is correct
11 Correct 1 ms 1748 KB Output is correct
12 Correct 1 ms 1620 KB Output is correct
13 Correct 1 ms 1748 KB Output is correct
14 Correct 1 ms 1620 KB Output is correct
15 Correct 1 ms 1620 KB Output is correct
16 Correct 1 ms 1748 KB Output is correct
17 Correct 1 ms 1620 KB Output is correct
18 Correct 1 ms 1620 KB Output is correct
19 Correct 1 ms 1620 KB Output is correct
20 Correct 1 ms 1748 KB Output is correct
21 Correct 1 ms 1748 KB Output is correct
22 Correct 1 ms 1620 KB Output is correct
23 Correct 1 ms 1748 KB Output is correct
24 Correct 2 ms 1748 KB Output is correct
25 Correct 1 ms 1748 KB Output is correct
26 Correct 1 ms 1748 KB Output is correct
27 Correct 1 ms 1748 KB Output is correct
28 Correct 1 ms 1748 KB Output is correct
29 Correct 1 ms 1748 KB Output is correct
30 Correct 1 ms 1748 KB Output is correct
31 Correct 1 ms 1748 KB Output is correct
32 Correct 1 ms 1748 KB Output is correct
33 Correct 2 ms 1748 KB Output is correct
34 Correct 1 ms 1748 KB Output is correct
35 Correct 1 ms 1748 KB Output is correct
36 Correct 1 ms 1748 KB Output is correct
37 Correct 2 ms 1748 KB Output is correct
38 Correct 6 ms 2132 KB Output is correct
39 Correct 3 ms 1816 KB Output is correct
40 Correct 2 ms 1748 KB Output is correct
41 Correct 5 ms 2108 KB Output is correct
42 Correct 3 ms 1748 KB Output is correct
43 Correct 7 ms 2388 KB Output is correct
44 Correct 5 ms 2132 KB Output is correct
45 Correct 5 ms 2004 KB Output is correct
46 Correct 4 ms 2004 KB Output is correct
47 Correct 3 ms 1876 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 2132 KB Output is correct
2 Correct 2 ms 1876 KB Output is correct
3 Correct 2 ms 1876 KB Output is correct
4 Correct 2 ms 1748 KB Output is correct
5 Correct 9 ms 2168 KB Output is correct
6 Correct 3 ms 1968 KB Output is correct
7 Correct 2 ms 1748 KB Output is correct
8 Correct 2 ms 1748 KB Output is correct
9 Correct 5 ms 2132 KB Output is correct
10 Correct 3 ms 2004 KB Output is correct
11 Correct 2 ms 1876 KB Output is correct
12 Correct 3 ms 1876 KB Output is correct
13 Correct 3 ms 1792 KB Output is correct
14 Correct 1 ms 1748 KB Output is correct
15 Correct 5 ms 2132 KB Output is correct
16 Correct 6 ms 2004 KB Output is correct
17 Correct 3 ms 1876 KB Output is correct
18 Correct 4 ms 1876 KB Output is correct
19 Correct 2 ms 1748 KB Output is correct
20 Correct 1 ms 1748 KB Output is correct
21 Correct 1 ms 1620 KB Output is correct
22 Correct 1 ms 1748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1620 KB Output is correct
2 Correct 1 ms 1620 KB Output is correct
3 Correct 4 ms 2004 KB Output is correct
4 Correct 3 ms 1876 KB Output is correct
5 Correct 3 ms 1876 KB Output is correct
6 Correct 2 ms 1748 KB Output is correct
7 Correct 2 ms 1748 KB Output is correct
8 Correct 7 ms 2132 KB Output is correct
9 Correct 5 ms 2004 KB Output is correct
10 Correct 4 ms 1972 KB Output is correct
11 Correct 3 ms 1876 KB Output is correct
12 Correct 2 ms 1876 KB Output is correct
13 Correct 6 ms 2132 KB Output is correct
14 Correct 4 ms 1976 KB Output is correct
15 Correct 2 ms 1832 KB Output is correct
16 Correct 2 ms 1748 KB Output is correct
17 Correct 6 ms 2132 KB Output is correct
18 Correct 3 ms 1876 KB Output is correct
19 Correct 2 ms 1748 KB Output is correct
20 Correct 15 ms 3136 KB Output is correct
21 Correct 10 ms 2644 KB Output is correct
22 Correct 6 ms 2260 KB Output is correct
23 Correct 6 ms 2040 KB Output is correct
24 Correct 15 ms 3156 KB Output is correct
25 Correct 8 ms 2388 KB Output is correct
26 Correct 6 ms 2132 KB Output is correct
27 Correct 26 ms 4344 KB Output is correct
28 Correct 18 ms 3532 KB Output is correct
29 Correct 14 ms 3068 KB Output is correct
30 Correct 11 ms 2644 KB Output is correct
31 Correct 11 ms 2516 KB Output is correct
32 Correct 1 ms 1724 KB Output is correct
33 Correct 1 ms 1748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 4308 KB Output is correct
2 Correct 1 ms 1620 KB Output is correct
3 Correct 4 ms 2004 KB Output is correct
4 Correct 6 ms 2132 KB Output is correct
5 Correct 7 ms 2132 KB Output is correct
6 Correct 5 ms 2132 KB Output is correct
7 Correct 14 ms 3176 KB Output is correct
8 Correct 14 ms 3156 KB Output is correct
9 Correct 24 ms 4356 KB Output is correct
10 Correct 1 ms 1620 KB Output is correct
11 Correct 1 ms 1748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1620 KB Output is correct
2 Correct 1 ms 1620 KB Output is correct
3 Correct 1 ms 1620 KB Output is correct
4 Correct 1 ms 1620 KB Output is correct
5 Correct 1 ms 1748 KB Output is correct
6 Correct 2 ms 1620 KB Output is correct
7 Correct 1 ms 1620 KB Output is correct
8 Correct 2 ms 1620 KB Output is correct
9 Correct 2 ms 1748 KB Output is correct
10 Correct 1 ms 1620 KB Output is correct
11 Correct 1 ms 1748 KB Output is correct
12 Correct 1 ms 1620 KB Output is correct
13 Correct 1 ms 1748 KB Output is correct
14 Correct 1 ms 1620 KB Output is correct
15 Correct 1 ms 1620 KB Output is correct
16 Correct 1 ms 1748 KB Output is correct
17 Correct 1 ms 1620 KB Output is correct
18 Correct 1 ms 1620 KB Output is correct
19 Correct 1 ms 1620 KB Output is correct
20 Correct 1 ms 1748 KB Output is correct
21 Correct 1 ms 1748 KB Output is correct
22 Correct 1 ms 1620 KB Output is correct
23 Correct 1 ms 1748 KB Output is correct
24 Correct 2 ms 1748 KB Output is correct
25 Correct 1 ms 1748 KB Output is correct
26 Correct 1 ms 1748 KB Output is correct
27 Correct 1 ms 1748 KB Output is correct
28 Correct 1 ms 1748 KB Output is correct
29 Correct 1 ms 1748 KB Output is correct
30 Correct 1 ms 1748 KB Output is correct
31 Correct 1 ms 1748 KB Output is correct
32 Correct 1 ms 1748 KB Output is correct
33 Correct 2 ms 1748 KB Output is correct
34 Correct 1 ms 1748 KB Output is correct
35 Correct 1 ms 1748 KB Output is correct
36 Correct 1 ms 1748 KB Output is correct
37 Correct 2 ms 1748 KB Output is correct
38 Correct 6 ms 2132 KB Output is correct
39 Correct 3 ms 1816 KB Output is correct
40 Correct 2 ms 1748 KB Output is correct
41 Correct 5 ms 2108 KB Output is correct
42 Correct 3 ms 1748 KB Output is correct
43 Correct 7 ms 2388 KB Output is correct
44 Correct 5 ms 2132 KB Output is correct
45 Correct 5 ms 2004 KB Output is correct
46 Correct 4 ms 2004 KB Output is correct
47 Correct 3 ms 1876 KB Output is correct
48 Correct 5 ms 2132 KB Output is correct
49 Correct 2 ms 1876 KB Output is correct
50 Correct 2 ms 1876 KB Output is correct
51 Correct 2 ms 1748 KB Output is correct
52 Correct 9 ms 2168 KB Output is correct
53 Correct 3 ms 1968 KB Output is correct
54 Correct 2 ms 1748 KB Output is correct
55 Correct 2 ms 1748 KB Output is correct
56 Correct 5 ms 2132 KB Output is correct
57 Correct 3 ms 2004 KB Output is correct
58 Correct 2 ms 1876 KB Output is correct
59 Correct 3 ms 1876 KB Output is correct
60 Correct 3 ms 1792 KB Output is correct
61 Correct 1 ms 1748 KB Output is correct
62 Correct 5 ms 2132 KB Output is correct
63 Correct 6 ms 2004 KB Output is correct
64 Correct 3 ms 1876 KB Output is correct
65 Correct 4 ms 1876 KB Output is correct
66 Correct 2 ms 1748 KB Output is correct
67 Correct 1 ms 1748 KB Output is correct
68 Correct 1 ms 1620 KB Output is correct
69 Correct 1 ms 1748 KB Output is correct
70 Correct 1 ms 1620 KB Output is correct
71 Correct 1 ms 1620 KB Output is correct
72 Correct 4 ms 2004 KB Output is correct
73 Correct 3 ms 1876 KB Output is correct
74 Correct 3 ms 1876 KB Output is correct
75 Correct 2 ms 1748 KB Output is correct
76 Correct 2 ms 1748 KB Output is correct
77 Correct 7 ms 2132 KB Output is correct
78 Correct 5 ms 2004 KB Output is correct
79 Correct 4 ms 1972 KB Output is correct
80 Correct 3 ms 1876 KB Output is correct
81 Correct 2 ms 1876 KB Output is correct
82 Correct 6 ms 2132 KB Output is correct
83 Correct 4 ms 1976 KB Output is correct
84 Correct 2 ms 1832 KB Output is correct
85 Correct 2 ms 1748 KB Output is correct
86 Correct 6 ms 2132 KB Output is correct
87 Correct 3 ms 1876 KB Output is correct
88 Correct 2 ms 1748 KB Output is correct
89 Correct 15 ms 3136 KB Output is correct
90 Correct 10 ms 2644 KB Output is correct
91 Correct 6 ms 2260 KB Output is correct
92 Correct 6 ms 2040 KB Output is correct
93 Correct 15 ms 3156 KB Output is correct
94 Correct 8 ms 2388 KB Output is correct
95 Correct 6 ms 2132 KB Output is correct
96 Correct 26 ms 4344 KB Output is correct
97 Correct 18 ms 3532 KB Output is correct
98 Correct 14 ms 3068 KB Output is correct
99 Correct 11 ms 2644 KB Output is correct
100 Correct 11 ms 2516 KB Output is correct
101 Correct 1 ms 1724 KB Output is correct
102 Correct 1 ms 1748 KB Output is correct
103 Correct 25 ms 4308 KB Output is correct
104 Correct 1 ms 1620 KB Output is correct
105 Correct 4 ms 2004 KB Output is correct
106 Correct 6 ms 2132 KB Output is correct
107 Correct 7 ms 2132 KB Output is correct
108 Correct 5 ms 2132 KB Output is correct
109 Correct 14 ms 3176 KB Output is correct
110 Correct 14 ms 3156 KB Output is correct
111 Correct 24 ms 4356 KB Output is correct
112 Correct 1 ms 1620 KB Output is correct
113 Correct 1 ms 1748 KB Output is correct
114 Correct 17 ms 3612 KB Output is correct
115 Correct 2 ms 1720 KB Output is correct
116 Correct 6 ms 2132 KB Output is correct
117 Correct 6 ms 2132 KB Output is correct
118 Correct 12 ms 2936 KB Output is correct
119 Correct 14 ms 3012 KB Output is correct
120 Correct 14 ms 3028 KB Output is correct
121 Correct 18 ms 3008 KB Output is correct
122 Correct 17 ms 3028 KB Output is correct
123 Correct 25 ms 4364 KB Output is correct
124 Correct 17 ms 3644 KB Output is correct
125 Correct 14 ms 3028 KB Output is correct
126 Correct 13 ms 2988 KB Output is correct
127 Correct 11 ms 2644 KB Output is correct
128 Correct 9 ms 2516 KB Output is correct