답안 #1062640

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1062640 2024-08-17T09:28:40 Z thieunguyenhuy 항공 노선도 (JOI18_airline) C++17
100 / 100
490 ms 29440 KB
#ifndef hwe
	#include "Alicelib.h"
#endif

#include <bits/stdc++.h>
using namespace std;

#define popcount(n) (__builtin_popcountll((n)))
#define clz(n) (__builtin_clzll((n)))
#define ctz(n) (__builtin_ctzll((n)))
#define lg(n) (63 - __builtin_clzll((n)))
#define BIT(n, i) (((n) >> (i)) & 1ll)
#define MASK(i) (1ll << (i))
#define FLIP(n, i) ((n) ^ (1ll << (i)))
#define ON(n, i) ((n) | MASK(i))
#define OFF(n, i) ((n) & ~MASK(i))

#define Int __int128
#define fi first
#define se second

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef pair<long long, int> pli;
typedef pair<int, long long> pil;
typedef vector<pair<int, int>> vii;
typedef vector<pair<long long, long long>> vll;
typedef vector<pair<long long, int>> vli;
typedef vector<pair<int, long long>> vil;

template <class T1, class T2>
bool maximize(T1 &x, T2 y) {
    if (x < y) {
        x = y;
        return true;
    }
    return false;
}
template <class T1, class T2>
bool minimize(T1 &x, T2 y) {
    if (x > y) {
        x = y;
        return true;
    }
    return false;
}

template <class T>
void remove_duplicate(vector<T> &ve) {
    sort (ve.begin(), ve.end());
    ve.resize(unique(ve.begin(), ve.end()) - ve.begin());
}

mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
template <class T> T random(T l, T r) {
    return uniform_int_distribution<T>(l, r)(rng);
}
template <class T> T random(T r) {
    return rng() % r;
}

const int N = 1e6 + 5;
const int MOD = 1e9 + 7;
const int inf = 1e9;
const ll INF = 1e18;

int sz = 0;
int c[N], d[N];

#ifdef hwe
void InitG(int v, int u) {
	cerr << "Init G: " << v << ' ' << u << '\n';
}

void MakeG(int pos, int C, int D) {
	cerr << "Make G: " << pos << ' ' << C << ' ' << D << '\n';
	maximize(sz, pos);
	c[pos] = C, d[pos] = D;
}
#endif

void Alice(int n, int m, int a[], int b[]) {
	vii edges;

	for (int i = 0; i < m; ++i) edges.emplace_back(a[i], b[i]);

	// edge (bit node i, j) when BIT(j, i) == 0
	for (int i = 0; i < 10; ++i) for (int j = 0; j < n; ++j) {
		if (!BIT(j, i)) edges.emplace_back(n + i, j);
	}

	// connect all bit-nodes
	for (int i = n; i + 1 < n + 10; ++i) edges.emplace_back(i, i + 1);

	// create two unique nodes
	for (int i = 0; i < n; ++i) edges.emplace_back(n + 10, i);
	edges.emplace_back(n + 10, n + 11);

	InitG(n + 12, edges.size());
	for (int i = 0; i < edges.size(); ++i) MakeG(i, edges[i].fi, edges[i].se);
}

#ifdef hwe
signed main() {
	int n, m; cin >> n >> m;

	int a[m], b[m];
	for (int i = 0; i < m; ++i) {
		cin >> a[i] >> b[i];
	}

	Alice(n, m, a, b);

	for (int i = 0; i <= sz; ++i) cerr << c[i] << ' ';
	cerr << '\n';
	for (int i = 0; i <= sz; ++i) cerr << d[i] << ' ';
	cerr << '\n';

    cerr << '\n'; return 0;
}
#endif
#ifndef hwe
	#include "Boblib.h"
#endif

#include <bits/stdc++.h>
using namespace std;

#define popcount(n) (__builtin_popcountll((n)))
#define clz(n) (__builtin_clzll((n)))
#define ctz(n) (__builtin_ctzll((n)))
#define lg(n) (63 - __builtin_clzll((n)))
#define BIT(n, i) (((n) >> (i)) & 1ll)
#define MASK(i) (1ll << (i))
#define FLIP(n, i) ((n) ^ (1ll << (i)))
#define ON(n, i) ((n) | MASK(i))
#define OFF(n, i) ((n) & ~MASK(i))

#define Int __int128
#define fi first
#define se second

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef pair<long long, int> pli;
typedef pair<int, long long> pil;
typedef vector<pair<int, int>> vii;
typedef vector<pair<long long, long long>> vll;
typedef vector<pair<long long, int>> vli;
typedef vector<pair<int, long long>> vil;

template <class T1, class T2>
bool maximize(T1 &x, T2 y) {
    if (x < y) {
        x = y;
        return true;
    }
    return false;
}
template <class T1, class T2>
bool minimize(T1 &x, T2 y) {
    if (x > y) {
        x = y;
        return true;
    }
    return false;
}

template <class T>
void remove_duplicate(vector<T> &ve) {
    sort (ve.begin(), ve.end());
    ve.resize(unique(ve.begin(), ve.end()) - ve.begin());
}

mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
template <class T> T random(T l, T r) {
    return uniform_int_distribution<T>(l, r)(rng);
}
template <class T> T random(T r) {
    return rng() % r;
}

const int N = 1100 + 5;
const int MOD = 1e9 + 7;
const int inf = 1e9;
const ll INF = 1e18;

int cnt[N], ans[N];
vector<int> adj[N];
bitset<N> mark, in_chain;

#ifdef hwe
void InitMap(int n, int m) {
	cerr << "Init map: " << n << ' ' << m << '\n';
}

void MakeMap(int a, int b) {
	cerr << "Make map: " << a << ' ' << b << '\n';
}
#endif

void Bob(int v, int u, int C[], int D[]) {
	int n = v - 12;
	for (int i = 0; i < v; ++i) {
		adj[i].clear(); ans[i] = MASK(10) - 1;
		mark[i] = in_chain[i] = false;
	}

	for (int i = 0; i < u; ++i) {
		adj[C[i]].emplace_back(D[i]);
		adj[D[i]].emplace_back(C[i]);
	}

	cerr << "hehe\n";

	int only_with_one = -1;
	for (int i = 0; i < v; ++i) {
		if (adj[i].size() == 1) {
			assert(only_with_one == -1);
			only_with_one = i;
		}
	}

	int connect_with_all_non = adj[only_with_one].back();
	cerr << "Done all non " << connect_with_all_non << '\n';

	mark[connect_with_all_non] = true;
	for (auto &x : adj[connect_with_all_non]) mark[x] = true;

	vector<int> bitnodes;
	for (int i = 0; i < v; ++i) if (!mark[i]) {
		bitnodes.emplace_back(i);
	}

	cerr << "Bitnodes: ";
	for (auto &x : bitnodes) cerr << x << ' ';
	cerr << '\n';

	for (int i = 0; i < 10; ++i) for (int j = 0; j < n; ++j) {
		if (!BIT(j, i)) ++cnt[i];
	}

	int start = -1;
	for (auto node : bitnodes) {
		int counter = 0;
		for (auto x : adj[node]) if (!mark[x]) ++counter;
		if (counter == 1) {
			start = node;
			break;
		}
	}

	cerr << "Done start\n";

	vector<int> chain = {start}; int cur = start; in_chain[start] = true;
	for (int _ = 0; _ < 11; ++_) {
		for (auto x : adj[cur]) if (!mark[x] && !in_chain[x]) {
			chain.emplace_back(x), in_chain[x] = true;
			cur = x;
			break;
		}
	}

	for (auto &x : chain) cerr << x << ' ';
	cerr << '\n';

	auto valid_chain = [&](vector<int> chain) {
		for (int i = 1; i + 1 < chain.size(); ++i)
			if (adj[chain[i]].size() - 2 != cnt[i]) return false;
		return adj[chain[0]].size() - 1 == cnt[0] && adj[chain.back()].size() - 1 == cnt[chain.size() - 1];
	};

	if (!valid_chain(chain)) reverse(chain.begin(), chain.end());

	assert(valid_chain(chain));

	cerr << "Done chain\n";

	for (int i = 0; i < chain.size(); ++i) {
		for (auto &x : adj[chain[i]]) if (mark[x]) {
			ans[x] = OFF(ans[x], i);
		}
	}

	vii edges; mark[only_with_one] = mark[connect_with_all_non] = false;
	for (int i = 0; i < u; ++i) {
		if (!mark[C[i]] || !mark[D[i]]) continue;
		edges.emplace_back(ans[C[i]], ans[D[i]]);
	}

	InitMap(n, edges.size());
	for (auto it : edges) MakeMap(it.fi, it.se);
}

#ifdef hwe
signed main() {
	int v, u; cin >> v >> u;

	int C[u], D[u];
	for (int i = 0; i < u; ++i) {
		cin >> C[i];
	}
	for (int i = 0; i < u; ++i) {
		cin >> D[i];
	}

	Bob(v, u, C, D);

    cerr << '\n'; return 0;
}
#endif

Compilation message

Alice.cpp: In function 'void Alice(int, int, int*, int*)':
Alice.cpp:103:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  103 |  for (int i = 0; i < edges.size(); ++i) MakeG(i, edges[i].fi, edges[i].se);
      |                  ~~^~~~~~~~~~~~~~

Bob.cpp: In lambda function:
Bob.cpp:150:25: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  150 |   for (int i = 1; i + 1 < chain.size(); ++i)
      |                   ~~~~~~^~~~~~~~~~~~~~
Bob.cpp:151:33: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  151 |    if (adj[chain[i]].size() - 2 != cnt[i]) return false;
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
Bob.cpp:152:35: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  152 |   return adj[chain[0]].size() - 1 == cnt[0] && adj[chain.back()].size() - 1 == cnt[chain.size() - 1];
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
Bob.cpp:152:77: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  152 |   return adj[chain[0]].size() - 1 == cnt[0] && adj[chain.back()].size() - 1 == cnt[chain.size() - 1];
      |                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Bob.cpp: In function 'void Bob(int, int, int*, int*)':
Bob.cpp:161:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  161 |  for (int i = 0; i < chain.size(); ++i) {
      |                  ~~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4892 KB Output is correct
2 Correct 2 ms 6172 KB Output is correct
3 Correct 2 ms 4900 KB Output is correct
4 Correct 2 ms 4888 KB Output is correct
5 Correct 3 ms 4888 KB Output is correct
6 Correct 2 ms 4892 KB Output is correct
7 Correct 3 ms 4892 KB Output is correct
8 Correct 3 ms 4888 KB Output is correct
9 Correct 1 ms 6936 KB Output is correct
10 Correct 1 ms 4896 KB Output is correct
11 Correct 2 ms 4884 KB Output is correct
12 Correct 2 ms 4892 KB Output is correct
13 Correct 3 ms 4892 KB Output is correct
14 Correct 2 ms 5140 KB Output is correct
15 Correct 2 ms 4892 KB Output is correct
16 Correct 2 ms 4900 KB Output is correct
17 Correct 1 ms 4896 KB Output is correct
18 Correct 2 ms 4968 KB Output is correct
19 Correct 2 ms 4900 KB Output is correct
20 Correct 2 ms 4888 KB Output is correct
21 Correct 2 ms 4892 KB Output is correct
22 Correct 2 ms 4892 KB Output is correct
23 Correct 3 ms 4892 KB Output is correct
24 Correct 3 ms 6924 KB Output is correct
25 Correct 2 ms 4892 KB Output is correct
26 Correct 2 ms 4888 KB Output is correct
27 Correct 1 ms 4892 KB Output is correct
28 Correct 3 ms 4900 KB Output is correct
29 Correct 2 ms 4904 KB Output is correct
30 Correct 2 ms 4888 KB Output is correct
31 Correct 2 ms 4888 KB Output is correct
32 Correct 3 ms 4888 KB Output is correct
33 Correct 3 ms 6928 KB Output is correct
34 Correct 2 ms 4900 KB Output is correct
35 Correct 3 ms 4884 KB Output is correct
36 Correct 3 ms 4896 KB Output is correct
37 Correct 3 ms 4892 KB Output is correct
38 Correct 1 ms 4904 KB Output is correct
39 Correct 2 ms 4896 KB Output is correct
40 Correct 2 ms 4892 KB Output is correct
41 Correct 2 ms 4900 KB Output is correct
42 Correct 2 ms 4900 KB Output is correct
43 Correct 3 ms 4892 KB Output is correct
44 Correct 2 ms 4888 KB Output is correct
45 Correct 1 ms 4896 KB Output is correct
46 Correct 2 ms 4896 KB Output is correct
47 Correct 2 ms 4896 KB Output is correct
48 Correct 2 ms 4892 KB Output is correct
49 Correct 3 ms 4892 KB Output is correct
50 Correct 1 ms 4888 KB Output is correct
51 Correct 2 ms 4888 KB Output is correct
52 Correct 2 ms 4900 KB Output is correct
53 Correct 2 ms 8204 KB Output is correct
54 Correct 3 ms 4892 KB Output is correct
55 Correct 2 ms 4884 KB Output is correct
56 Correct 2 ms 4900 KB Output is correct
57 Correct 3 ms 4892 KB Output is correct
58 Correct 2 ms 4888 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4892 KB Output is correct
2 Correct 2 ms 6172 KB Output is correct
3 Correct 2 ms 4900 KB Output is correct
4 Correct 2 ms 4888 KB Output is correct
5 Correct 3 ms 4888 KB Output is correct
6 Correct 2 ms 4892 KB Output is correct
7 Correct 3 ms 4892 KB Output is correct
8 Correct 3 ms 4888 KB Output is correct
9 Correct 1 ms 6936 KB Output is correct
10 Correct 1 ms 4896 KB Output is correct
11 Correct 2 ms 4884 KB Output is correct
12 Correct 2 ms 4892 KB Output is correct
13 Correct 3 ms 4892 KB Output is correct
14 Correct 2 ms 5140 KB Output is correct
15 Correct 2 ms 4892 KB Output is correct
16 Correct 2 ms 4900 KB Output is correct
17 Correct 1 ms 4896 KB Output is correct
18 Correct 2 ms 4968 KB Output is correct
19 Correct 2 ms 4900 KB Output is correct
20 Correct 2 ms 4888 KB Output is correct
21 Correct 2 ms 4892 KB Output is correct
22 Correct 2 ms 4892 KB Output is correct
23 Correct 3 ms 4892 KB Output is correct
24 Correct 3 ms 6924 KB Output is correct
25 Correct 2 ms 4892 KB Output is correct
26 Correct 2 ms 4888 KB Output is correct
27 Correct 1 ms 4892 KB Output is correct
28 Correct 3 ms 4900 KB Output is correct
29 Correct 2 ms 4904 KB Output is correct
30 Correct 2 ms 4888 KB Output is correct
31 Correct 2 ms 4888 KB Output is correct
32 Correct 3 ms 4888 KB Output is correct
33 Correct 3 ms 6928 KB Output is correct
34 Correct 2 ms 4900 KB Output is correct
35 Correct 3 ms 4884 KB Output is correct
36 Correct 3 ms 4896 KB Output is correct
37 Correct 3 ms 4892 KB Output is correct
38 Correct 1 ms 4904 KB Output is correct
39 Correct 2 ms 4896 KB Output is correct
40 Correct 2 ms 4892 KB Output is correct
41 Correct 2 ms 4900 KB Output is correct
42 Correct 2 ms 4900 KB Output is correct
43 Correct 3 ms 4892 KB Output is correct
44 Correct 2 ms 4888 KB Output is correct
45 Correct 1 ms 4896 KB Output is correct
46 Correct 2 ms 4896 KB Output is correct
47 Correct 2 ms 4896 KB Output is correct
48 Correct 2 ms 4892 KB Output is correct
49 Correct 3 ms 4892 KB Output is correct
50 Correct 1 ms 4888 KB Output is correct
51 Correct 2 ms 4888 KB Output is correct
52 Correct 2 ms 4900 KB Output is correct
53 Correct 2 ms 8204 KB Output is correct
54 Correct 3 ms 4892 KB Output is correct
55 Correct 2 ms 4884 KB Output is correct
56 Correct 2 ms 4900 KB Output is correct
57 Correct 3 ms 4892 KB Output is correct
58 Correct 2 ms 4888 KB Output is correct
59 Correct 3 ms 4900 KB Output is correct
60 Correct 3 ms 4892 KB Output is correct
61 Correct 3 ms 4892 KB Output is correct
62 Correct 3 ms 4892 KB Output is correct
63 Correct 2 ms 4892 KB Output is correct
64 Correct 3 ms 4892 KB Output is correct
65 Correct 3 ms 4864 KB Output is correct
66 Correct 3 ms 4892 KB Output is correct
67 Correct 3 ms 4900 KB Output is correct
68 Correct 2 ms 4892 KB Output is correct
69 Correct 3 ms 4900 KB Output is correct
70 Correct 3 ms 4892 KB Output is correct
71 Correct 3 ms 4888 KB Output is correct
72 Correct 3 ms 4888 KB Output is correct
73 Correct 3 ms 4892 KB Output is correct
74 Correct 2 ms 5396 KB Output is correct
75 Correct 2 ms 6172 KB Output is correct
76 Correct 3 ms 4900 KB Output is correct
77 Correct 3 ms 6936 KB Output is correct
78 Correct 3 ms 4892 KB Output is correct
79 Correct 3 ms 4892 KB Output is correct
80 Correct 3 ms 4892 KB Output is correct
81 Correct 3 ms 6940 KB Output is correct
82 Correct 2 ms 4892 KB Output is correct
83 Correct 3 ms 4892 KB Output is correct
84 Correct 2 ms 4888 KB Output is correct
85 Correct 3 ms 4880 KB Output is correct
86 Correct 3 ms 4892 KB Output is correct
87 Correct 2 ms 4892 KB Output is correct
88 Correct 3 ms 8228 KB Output is correct
89 Correct 3 ms 4948 KB Output is correct
90 Correct 2 ms 4896 KB Output is correct
91 Correct 2 ms 4888 KB Output is correct
92 Correct 3 ms 4896 KB Output is correct
93 Correct 3 ms 4888 KB Output is correct
94 Correct 2 ms 4896 KB Output is correct
95 Correct 3 ms 6172 KB Output is correct
96 Correct 3 ms 4892 KB Output is correct
97 Correct 3 ms 4892 KB Output is correct
98 Correct 3 ms 4900 KB Output is correct
99 Correct 2 ms 6172 KB Output is correct
100 Correct 2 ms 4904 KB Output is correct
101 Correct 3 ms 4892 KB Output is correct
102 Correct 3 ms 4888 KB Output is correct
103 Correct 2 ms 5144 KB Output is correct
104 Correct 3 ms 4884 KB Output is correct
105 Correct 2 ms 4900 KB Output is correct
106 Correct 2 ms 4892 KB Output is correct
107 Correct 2 ms 6932 KB Output is correct
108 Correct 3 ms 4888 KB Output is correct
109 Correct 3 ms 4884 KB Output is correct
110 Correct 3 ms 4900 KB Output is correct
111 Correct 3 ms 4800 KB Output is correct
112 Correct 2 ms 4892 KB Output is correct
113 Correct 2 ms 4888 KB Output is correct
114 Correct 3 ms 4896 KB Output is correct
115 Correct 2 ms 4892 KB Output is correct
116 Correct 3 ms 4888 KB Output is correct
117 Correct 2 ms 4900 KB Output is correct
118 Correct 3 ms 4892 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 366 ms 29440 KB Output is correct : V - N = 12
2 Correct 282 ms 25880 KB Output is correct : V - N = 12
3 Correct 102 ms 14212 KB Output is correct : V - N = 12
4 Correct 6 ms 5424 KB Output is correct : V - N = 12
5 Correct 72 ms 9992 KB Output is correct : V - N = 12
6 Correct 248 ms 23888 KB Output is correct : V - N = 12
7 Correct 490 ms 29140 KB Output is correct : V - N = 12
8 Correct 309 ms 27512 KB Output is correct : V - N = 12
9 Correct 153 ms 16264 KB Output is correct : V - N = 12
10 Correct 17 ms 6492 KB Output is correct : V - N = 12
11 Correct 30 ms 7620 KB Output is correct : V - N = 12
12 Correct 183 ms 18344 KB Output is correct : V - N = 12
13 Correct 320 ms 28128 KB Output is correct : V - N = 12
14 Correct 374 ms 28756 KB Output is correct : V - N = 12
15 Correct 224 ms 22404 KB Output is correct : V - N = 12
16 Correct 49 ms 8672 KB Output is correct : V - N = 12
17 Correct 8 ms 5876 KB Output is correct : V - N = 12
18 Correct 137 ms 15120 KB Output is correct : V - N = 12
19 Correct 346 ms 26772 KB Output is correct : V - N = 12
20 Correct 356 ms 29300 KB Output is correct : V - N = 12
21 Correct 96 ms 12444 KB Output is correct : V - N = 12
22 Correct 69 ms 10444 KB Output is correct : V - N = 12
23 Correct 30 ms 7584 KB Output is correct : V - N = 12
24 Correct 4 ms 4888 KB Output is correct : V - N = 12
25 Correct 16 ms 6608 KB Output is correct : V - N = 12
26 Correct 60 ms 10140 KB Output is correct : V - N = 12
27 Correct 94 ms 11416 KB Output is correct : V - N = 12
28 Correct 83 ms 11096 KB Output is correct : V - N = 12
29 Correct 51 ms 7840 KB Output is correct : V - N = 12
30 Correct 5 ms 7460 KB Output is correct : V - N = 12
31 Correct 5 ms 7448 KB Output is correct : V - N = 12
32 Correct 6 ms 5408 KB Output is correct : V - N = 12
33 Correct 6 ms 7444 KB Output is correct : V - N = 12
34 Correct 5 ms 7444 KB Output is correct : V - N = 12
35 Correct 5 ms 5400 KB Output is correct : V - N = 12
36 Correct 402 ms 29232 KB Output is correct : V - N = 12
37 Correct 355 ms 29360 KB Output is correct : V - N = 12
38 Correct 487 ms 29376 KB Output is correct : V - N = 12
39 Correct 465 ms 29380 KB Output is correct : V - N = 12
40 Correct 374 ms 29280 KB Output is correct : V - N = 12
41 Correct 59 ms 9872 KB Output is correct : V - N = 12
42 Correct 49 ms 8564 KB Output is correct : V - N = 12
43 Correct 57 ms 9620 KB Output is correct : V - N = 12
44 Correct 5 ms 5404 KB Output is correct : V - N = 12
45 Correct 41 ms 7592 KB Output is correct : V - N = 12
46 Correct 118 ms 14468 KB Output is correct : V - N = 12
47 Correct 59 ms 9840 KB Output is correct : V - N = 12
48 Correct 170 ms 16272 KB Output is correct : V - N = 12
49 Correct 28 ms 7592 KB Output is correct : V - N = 12
50 Correct 8 ms 6112 KB Output is correct : V - N = 12
51 Correct 282 ms 25588 KB Output is correct : V - N = 12
52 Correct 6 ms 5416 KB Output is correct : V - N = 12
53 Correct 239 ms 23840 KB Output is correct : V - N = 12
54 Correct 373 ms 27308 KB Output is correct : V - N = 12
55 Correct 18 ms 6476 KB Output is correct : V - N = 12
56 Correct 165 ms 17800 KB Output is correct : V - N = 12
57 Correct 339 ms 28388 KB Output is correct : V - N = 12
58 Correct 44 ms 8604 KB Output is correct : V - N = 12
59 Correct 176 ms 14976 KB Output is correct : V - N = 12
60 Correct 361 ms 28668 KB Output is correct : V - N = 12
61 Correct 3 ms 6176 KB Output is correct : V - N = 12
62 Correct 3 ms 4892 KB Output is correct : V - N = 12
63 Correct 2 ms 4892 KB Output is correct : V - N = 12
64 Correct 3 ms 6928 KB Output is correct : V - N = 12
65 Correct 3 ms 4892 KB Output is correct : V - N = 12
66 Correct 3 ms 4892 KB Output is correct : V - N = 12
67 Correct 3 ms 4892 KB Output is correct : V - N = 12
68 Correct 3 ms 4892 KB Output is correct : V - N = 12
69 Correct 3 ms 4892 KB Output is correct : V - N = 12
70 Correct 2 ms 4892 KB Output is correct : V - N = 12
71 Correct 3 ms 4892 KB Output is correct : V - N = 12
72 Correct 3 ms 4888 KB Output is correct : V - N = 12
73 Correct 3 ms 4892 KB Output is correct : V - N = 12
74 Correct 3 ms 4900 KB Output is correct : V - N = 12
75 Correct 3 ms 4892 KB Output is correct : V - N = 12
76 Correct 3 ms 4892 KB Output is correct : V - N = 12
77 Correct 2 ms 4892 KB Output is correct : V - N = 12
78 Correct 3 ms 4900 KB Output is correct : V - N = 12
79 Correct 2 ms 4900 KB Output is correct : V - N = 12
80 Correct 3 ms 4892 KB Output is correct : V - N = 12
81 Correct 3 ms 4900 KB Output is correct : V - N = 12
82 Correct 3 ms 4896 KB Output is correct : V - N = 12
83 Correct 2 ms 6172 KB Output is correct : V - N = 12
84 Correct 2 ms 4892 KB Output is correct : V - N = 12
85 Correct 3 ms 4892 KB Output is correct : V - N = 12
86 Correct 3 ms 6928 KB Output is correct : V - N = 12
87 Correct 2 ms 4892 KB Output is correct : V - N = 12
88 Correct 3 ms 4892 KB Output is correct : V - N = 12
89 Correct 3 ms 4888 KB Output is correct : V - N = 12
90 Correct 3 ms 4892 KB Output is correct : V - N = 12
91 Correct 3 ms 4888 KB Output is correct : V - N = 12
92 Correct 2 ms 4896 KB Output is correct : V - N = 12
93 Correct 4 ms 6932 KB Output is correct : V - N = 12
94 Correct 3 ms 4888 KB Output is correct : V - N = 12
95 Correct 2 ms 4888 KB Output is correct : V - N = 12
96 Correct 3 ms 8228 KB Output is correct : V - N = 12
97 Correct 2 ms 4896 KB Output is correct : V - N = 12
98 Correct 3 ms 6172 KB Output is correct : V - N = 12
99 Correct 3 ms 6944 KB Output is correct : V - N = 12
100 Correct 3 ms 4880 KB Output is correct : V - N = 12
101 Correct 2 ms 4892 KB Output is correct : V - N = 12
102 Correct 3 ms 4892 KB Output is correct : V - N = 12
103 Correct 2 ms 4812 KB Output is correct : V - N = 12
104 Correct 2 ms 4888 KB Output is correct : V - N = 12
105 Correct 2 ms 4892 KB Output is correct : V - N = 12
106 Correct 3 ms 4896 KB Output is correct : V - N = 12
107 Correct 3 ms 4888 KB Output is correct : V - N = 12
108 Correct 2 ms 4900 KB Output is correct : V - N = 12
109 Correct 2 ms 4892 KB Output is correct : V - N = 12
110 Correct 2 ms 4892 KB Output is correct : V - N = 12
111 Correct 3 ms 4892 KB Output is correct : V - N = 12
112 Correct 3 ms 4896 KB Output is correct : V - N = 12
113 Correct 1 ms 6172 KB Output is correct : V - N = 12
114 Correct 2 ms 4888 KB Output is correct : V - N = 12
115 Correct 2 ms 4896 KB Output is correct : V - N = 12
116 Correct 3 ms 4892 KB Output is correct : V - N = 12
117 Correct 3 ms 4884 KB Output is correct : V - N = 12
118 Correct 2 ms 4844 KB Output is correct : V - N = 12
119 Correct 3 ms 4900 KB Output is correct : V - N = 12
120 Correct 2 ms 4892 KB Output is correct : V - N = 12
121 Correct 2 ms 4892 KB Output is correct : V - N = 12
122 Correct 2 ms 4900 KB Output is correct : V - N = 12
123 Correct 2 ms 4892 KB Output is correct : V - N = 12
124 Correct 1 ms 4884 KB Output is correct : V - N = 12
125 Correct 3 ms 4892 KB Output is correct : V - N = 12
126 Correct 3 ms 4892 KB Output is correct : V - N = 12
127 Correct 2 ms 4892 KB Output is correct : V - N = 12
128 Correct 1 ms 4900 KB Output is correct : V - N = 12
129 Correct 1 ms 4892 KB Output is correct : V - N = 12
130 Correct 3 ms 6944 KB Output is correct : V - N = 12
131 Correct 3 ms 4888 KB Output is correct : V - N = 12
132 Correct 2 ms 4900 KB Output is correct : V - N = 12
133 Correct 2 ms 4900 KB Output is correct : V - N = 12
134 Correct 1 ms 6176 KB Output is correct : V - N = 12
135 Correct 2 ms 4892 KB Output is correct : V - N = 12
136 Correct 2 ms 4892 KB Output is correct : V - N = 12
137 Correct 2 ms 4888 KB Output is correct : V - N = 12
138 Correct 2 ms 4896 KB Output is correct : V - N = 12
139 Correct 3 ms 6936 KB Output is correct : V - N = 12
140 Correct 3 ms 6172 KB Output is correct : V - N = 12
141 Correct 2 ms 4900 KB Output is correct : V - N = 12
142 Correct 3 ms 4884 KB Output is correct : V - N = 12
143 Correct 2 ms 4888 KB Output is correct : V - N = 12
144 Correct 2 ms 8200 KB Output is correct : V - N = 12
145 Correct 2 ms 4892 KB Output is correct : V - N = 12
146 Correct 3 ms 4896 KB Output is correct : V - N = 12
147 Correct 2 ms 4900 KB Output is correct : V - N = 12
148 Correct 3 ms 4892 KB Output is correct : V - N = 12
149 Correct 3 ms 4888 KB Output is correct : V - N = 12
150 Correct 2 ms 4888 KB Output is correct : V - N = 12
151 Correct 3 ms 4888 KB Output is correct : V - N = 12
152 Correct 2 ms 4888 KB Output is correct : V - N = 12
153 Correct 2 ms 4884 KB Output is correct : V - N = 12
154 Correct 2 ms 6876 KB Output is correct : V - N = 12
155 Correct 2 ms 4896 KB Output is correct : V - N = 12
156 Correct 2 ms 5140 KB Output is correct : V - N = 12
157 Correct 2 ms 4884 KB Output is correct : V - N = 12
158 Correct 3 ms 6172 KB Output is correct : V - N = 12
159 Correct 2 ms 4892 KB Output is correct : V - N = 12
160 Correct 3 ms 6936 KB Output is correct : V - N = 12
161 Correct 3 ms 4892 KB Output is correct : V - N = 12
162 Correct 2 ms 4892 KB Output is correct : V - N = 12
163 Correct 3 ms 4892 KB Output is correct : V - N = 12
164 Correct 2 ms 4888 KB Output is correct : V - N = 12
165 Correct 2 ms 4896 KB Output is correct : V - N = 12
166 Correct 2 ms 4892 KB Output is correct : V - N = 12
167 Correct 2 ms 4892 KB Output is correct : V - N = 12
168 Correct 2 ms 4888 KB Output is correct : V - N = 12
169 Correct 2 ms 4900 KB Output is correct : V - N = 12
170 Correct 3 ms 4884 KB Output is correct : V - N = 12
171 Correct 3 ms 4884 KB Output is correct : V - N = 12
172 Correct 2 ms 4900 KB Output is correct : V - N = 12
173 Correct 3 ms 4888 KB Output is correct : V - N = 12
174 Correct 3 ms 4888 KB Output is correct : V - N = 12
175 Correct 1 ms 4892 KB Output is correct : V - N = 12
176 Correct 2 ms 4888 KB Output is correct : V - N = 12
177 Correct 1 ms 4892 KB Output is correct : V - N = 12
178 Correct 2 ms 8220 KB Output is correct : V - N = 12