//Copyright © 2022 Youngmin Park. All rights reserved.
#pragma GCC optimize("O3")
#pragma GCC target("avx2")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using pii = pair<int, int>;
using vpi = vector<pii>;
using pll = pair<ll, ll>;
using vl = vector<ll>;
using vpl = vector<pll>;
using ld = long double;
template <typename T, size_t SZ>
using ar = array<T, SZ>;
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define sz(x) (int)(x).size()
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define F0R(i, a) FOR(i, 0, a)
#define ROF(i, a, b) for (int i = (b)-1; i >= (a); --i)
#define R0F(i, a) ROF(i, 0, a)
#define REP(a) F0R(_, a)
const int INF = 1e9;
const ll LINF = 1e18;
const int MOD = 998244353;
const ld PI = acos((ld)-1.0);
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename T>
using pqg = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
bool ckmin(T &a, const T &b) { return b < a ? a = b, 1 : 0; }
template <typename T>
bool ckmax(T &a, const T &b) { return b > a ? a = b, 1 : 0; }
template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &p)
{
return os << '(' << p.first << ", " << p.second << ')';
}
template <typename T_container, typename T = typename enable_if<!is_same<T_container, string>::value, typename T_container::value_type>::type>
ostream &operator<<(ostream &os, const T_container &v)
{
os << '{';
string sep;
for (const T &x : v)
os << sep << x, sep = ", ";
return os << '}';
}
void dbg_out()
{
cerr << endl;
}
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T)
{
cerr << ' ' << H;
dbg_out(T...);
}
#ifdef LOCAL
#define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__)
#else
#define dbg(...) 42
#endif
inline namespace RecursiveLambda{
template <typename Fun>
struct y_combinator_result{
Fun fun_;
template <typename T>
explicit y_combinator_result(T &&fun): fun_(forward<T>(fun)){}
template <typename...Args>
decltype(auto) operator()(Args &&...args){
return fun_(ref(*this), forward<Args>(args)...);
}
};
template <typename Fun>
decltype(auto) y_combinator(Fun &&fun){
return y_combinator_result<decay_t<Fun>>(forward<Fun>(fun));
}
};
void setIO(string s) // USACO
{
#ifndef LOCAL
freopen((s + ".in").c_str(), "r", stdin);
freopen((s + ".out").c_str(), "w", stdout);
#endif
}
/**
* Description: modular arithmetic operations
* Source:
* KACTL
* https://codeforces.com/blog/entry/63903
* https://codeforces.com/contest/1261/submission/65632855 (tourist)
* https://codeforces.com/contest/1264/submission/66344993 (ksun)
* also see https://github.com/ecnerwala/cp-book/blob/master/src/modnum.hpp (ecnerwal)
* Verification:
* https://open.kattis.com/problems/modulararithmetic
*/
template<int MOD, int RT> struct mint {
static const int mod = MOD;
static constexpr mint rt() { return RT; } // primitive root for FFT
int v; explicit operator int() const { return v; } // explicit -> don't silently convert to int
mint() { v = 0; }
mint(ll _v) { v = int((-MOD < _v && _v < MOD) ? _v : _v % MOD);
if (v < 0) v += MOD; }
bool operator==(const mint& o) const{
return v == o.v; }
friend bool operator!=(const mint& a, const mint& b) {
return !(a == b); }
friend bool operator<(const mint& a, const mint& b) {
return a.v < b.v; }
friend istream& operator>>(istream& is, const mint& o){
ll v; is >> v; o = mint(v); return is; }
friend ostream& operator<<(ostream& os, const mint& o){
os << o.v; return os; }
mint& operator+=(const mint& m) {
if ((v += m.v) >= MOD) v -= MOD;
return *this; }
mint& operator-=(const mint& m) {
if ((v -= m.v) < 0) v += MOD;
return *this; }
mint& operator*=(const mint& m) {
v = int((ll)v*m.v%MOD); return *this; }
mint& operator/=(const mint& m) { return (*this) *= inv(m); }
friend mint pow(mint a, ll p) {
mint ans = 1; assert(p >= 0);
for (; p; p /= 2, a *= a) if (p&1) ans *= a;
return ans; }
friend mint inv(const mint& a) { assert(a.v != 0);
return pow(a,MOD-2); }
mint operator-() const { return mint(-v); }
mint& operator++() { return *this += 1; }
mint& operator--() { return *this -= 1; }
friend mint operator+(mint a, const mint& b) { return a += b; }
friend mint operator-(mint a, const mint& b) { return a -= b; }
friend mint operator*(mint a, const mint& b) { return a *= b; }
friend mint operator/(mint a, const mint& b) { return a /= b; }
};
using Mint = mint<MOD,5>; // 5 is primitive root for both common mods
Mint dp[1 << 18];
bool comp[1 << 18];
bool g[18][18], good[18][18];
vi adj[18];
void solve()
{
int n, m;
cin >> n >> m;
REP(m) {
int u, v;
cin >> u >> v;
u--, v--;
g[v][u] = 1;
adj[u].pb(v), adj[v].pb(u);
}
F0R(i, n) F0R(j, n) {
if (g[i][j] == g[j][i]) {
good[i][j] = good[j][i] = 1;
}
}
comp[0] = 1;
F0R(mask, 1 << n) {
F0R(i, n) {
if (!((1 << i) & mask)) continue;
int pmask = mask ^ (1 << i);
if (comp[pmask] == 0) break;
bool ok = 1;
F0R(j, n) {
if ((pmask & (1 << j)) && !good[i][j]) {
ok = 0;
}
}
comp[mask] = ok;
}
}
dp[0] = 1;
FOR(mask, 1, 1 << n) {
for (int cur = mask; cur; cur = (cur - 1) & mask) {
if (!comp[cur]) continue;
int k = __builtin_popcount(cur);
if (k & 1) dp[mask] += dp[mask - cur];
else dp[mask] -= dp[mask - cur];
}
}
cout << dp[(1 << n) - 1] * m / (Mint)2;
}
int32_t main()
{
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(cin.failbit);
int testcase=1;
// cin >> testcase;
while (testcase--)
{
solve();
}
}
Compilation message
amusementpark.cpp: In function 'void setIO(std::string)':
amusementpark.cpp:94:13: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
94 | freopen((s + ".in").c_str(), "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
amusementpark.cpp:95:13: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
95 | freopen((s + ".out").c_str(), "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1236 KB |
Output is correct |
2 |
Correct |
1 ms |
1236 KB |
Output is correct |
3 |
Correct |
2 ms |
1236 KB |
Output is correct |
4 |
Correct |
2 ms |
1236 KB |
Output is correct |
5 |
Correct |
2 ms |
1236 KB |
Output is correct |
6 |
Correct |
2 ms |
1236 KB |
Output is correct |
7 |
Correct |
1 ms |
1360 KB |
Output is correct |
8 |
Correct |
2 ms |
1236 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1236 KB |
Output is correct |
2 |
Correct |
1 ms |
1236 KB |
Output is correct |
3 |
Correct |
2 ms |
1236 KB |
Output is correct |
4 |
Correct |
2 ms |
1236 KB |
Output is correct |
5 |
Correct |
2 ms |
1236 KB |
Output is correct |
6 |
Correct |
2 ms |
1236 KB |
Output is correct |
7 |
Correct |
1 ms |
1360 KB |
Output is correct |
8 |
Correct |
2 ms |
1236 KB |
Output is correct |
9 |
Correct |
1 ms |
1364 KB |
Output is correct |
10 |
Correct |
2 ms |
1236 KB |
Output is correct |
11 |
Correct |
1 ms |
1364 KB |
Output is correct |
12 |
Correct |
1 ms |
1356 KB |
Output is correct |
13 |
Correct |
2 ms |
1356 KB |
Output is correct |
14 |
Correct |
2 ms |
1364 KB |
Output is correct |
15 |
Correct |
2 ms |
1236 KB |
Output is correct |
16 |
Correct |
2 ms |
1236 KB |
Output is correct |
17 |
Correct |
2 ms |
1236 KB |
Output is correct |
18 |
Correct |
2 ms |
1356 KB |
Output is correct |
19 |
Correct |
1 ms |
1352 KB |
Output is correct |
20 |
Correct |
2 ms |
1236 KB |
Output is correct |
21 |
Correct |
2 ms |
1356 KB |
Output is correct |
22 |
Correct |
2 ms |
1272 KB |
Output is correct |
23 |
Correct |
2 ms |
1356 KB |
Output is correct |
24 |
Correct |
2 ms |
1236 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1236 KB |
Output is correct |
2 |
Correct |
1 ms |
1236 KB |
Output is correct |
3 |
Correct |
2 ms |
1236 KB |
Output is correct |
4 |
Correct |
2 ms |
1236 KB |
Output is correct |
5 |
Correct |
2 ms |
1236 KB |
Output is correct |
6 |
Correct |
2 ms |
1236 KB |
Output is correct |
7 |
Correct |
1 ms |
1360 KB |
Output is correct |
8 |
Correct |
2 ms |
1236 KB |
Output is correct |
9 |
Correct |
1 ms |
1364 KB |
Output is correct |
10 |
Correct |
2 ms |
1236 KB |
Output is correct |
11 |
Correct |
1 ms |
1364 KB |
Output is correct |
12 |
Correct |
1 ms |
1356 KB |
Output is correct |
13 |
Correct |
2 ms |
1356 KB |
Output is correct |
14 |
Correct |
2 ms |
1364 KB |
Output is correct |
15 |
Correct |
2 ms |
1236 KB |
Output is correct |
16 |
Correct |
2 ms |
1236 KB |
Output is correct |
17 |
Correct |
2 ms |
1236 KB |
Output is correct |
18 |
Correct |
2 ms |
1356 KB |
Output is correct |
19 |
Correct |
1 ms |
1352 KB |
Output is correct |
20 |
Correct |
2 ms |
1236 KB |
Output is correct |
21 |
Correct |
2 ms |
1356 KB |
Output is correct |
22 |
Correct |
2 ms |
1272 KB |
Output is correct |
23 |
Correct |
2 ms |
1356 KB |
Output is correct |
24 |
Correct |
2 ms |
1236 KB |
Output is correct |
25 |
Correct |
1 ms |
1236 KB |
Output is correct |
26 |
Correct |
1 ms |
1236 KB |
Output is correct |
27 |
Correct |
1 ms |
1236 KB |
Output is correct |
28 |
Correct |
1 ms |
1360 KB |
Output is correct |
29 |
Correct |
2 ms |
1364 KB |
Output is correct |
30 |
Correct |
2 ms |
1356 KB |
Output is correct |
31 |
Correct |
2 ms |
1364 KB |
Output is correct |
32 |
Correct |
2 ms |
1308 KB |
Output is correct |
33 |
Correct |
3 ms |
1236 KB |
Output is correct |
34 |
Correct |
2 ms |
1356 KB |
Output is correct |
35 |
Correct |
2 ms |
1236 KB |
Output is correct |
36 |
Correct |
1 ms |
1236 KB |
Output is correct |
37 |
Correct |
1 ms |
1236 KB |
Output is correct |
38 |
Correct |
1 ms |
1236 KB |
Output is correct |
39 |
Correct |
2 ms |
1364 KB |
Output is correct |
40 |
Correct |
2 ms |
1360 KB |
Output is correct |
41 |
Correct |
1 ms |
1236 KB |
Output is correct |
42 |
Correct |
2 ms |
1236 KB |
Output is correct |
43 |
Correct |
2 ms |
1236 KB |
Output is correct |
44 |
Correct |
2 ms |
1236 KB |
Output is correct |
45 |
Correct |
2 ms |
1360 KB |
Output is correct |
46 |
Correct |
2 ms |
1360 KB |
Output is correct |
47 |
Correct |
2 ms |
1236 KB |
Output is correct |
48 |
Correct |
3 ms |
1364 KB |
Output is correct |
49 |
Correct |
3 ms |
1236 KB |
Output is correct |
50 |
Correct |
2 ms |
1236 KB |
Output is correct |
51 |
Correct |
2 ms |
1236 KB |
Output is correct |
52 |
Correct |
3 ms |
1236 KB |
Output is correct |
53 |
Correct |
2 ms |
1364 KB |
Output is correct |
54 |
Correct |
2 ms |
1236 KB |
Output is correct |
55 |
Correct |
2 ms |
1360 KB |
Output is correct |
56 |
Correct |
2 ms |
1364 KB |
Output is correct |
57 |
Correct |
1 ms |
1236 KB |
Output is correct |
58 |
Correct |
2 ms |
1236 KB |
Output is correct |
59 |
Correct |
1 ms |
1236 KB |
Output is correct |
60 |
Correct |
2 ms |
1236 KB |
Output is correct |
61 |
Correct |
2 ms |
1364 KB |
Output is correct |
62 |
Correct |
2 ms |
1236 KB |
Output is correct |
63 |
Correct |
3 ms |
1364 KB |
Output is correct |
64 |
Correct |
2 ms |
1360 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1236 KB |
Output is correct |
2 |
Correct |
1 ms |
1236 KB |
Output is correct |
3 |
Correct |
2 ms |
1236 KB |
Output is correct |
4 |
Correct |
2 ms |
1236 KB |
Output is correct |
5 |
Correct |
2 ms |
1236 KB |
Output is correct |
6 |
Correct |
2 ms |
1236 KB |
Output is correct |
7 |
Correct |
1 ms |
1360 KB |
Output is correct |
8 |
Correct |
2 ms |
1236 KB |
Output is correct |
9 |
Correct |
1 ms |
1364 KB |
Output is correct |
10 |
Correct |
2 ms |
1236 KB |
Output is correct |
11 |
Correct |
1 ms |
1364 KB |
Output is correct |
12 |
Correct |
1 ms |
1356 KB |
Output is correct |
13 |
Correct |
2 ms |
1356 KB |
Output is correct |
14 |
Correct |
2 ms |
1364 KB |
Output is correct |
15 |
Correct |
2 ms |
1236 KB |
Output is correct |
16 |
Correct |
2 ms |
1236 KB |
Output is correct |
17 |
Correct |
2 ms |
1236 KB |
Output is correct |
18 |
Correct |
2 ms |
1356 KB |
Output is correct |
19 |
Correct |
1 ms |
1352 KB |
Output is correct |
20 |
Correct |
2 ms |
1236 KB |
Output is correct |
21 |
Correct |
2 ms |
1356 KB |
Output is correct |
22 |
Correct |
2 ms |
1272 KB |
Output is correct |
23 |
Correct |
2 ms |
1356 KB |
Output is correct |
24 |
Correct |
2 ms |
1236 KB |
Output is correct |
25 |
Correct |
1 ms |
1236 KB |
Output is correct |
26 |
Correct |
1 ms |
1236 KB |
Output is correct |
27 |
Correct |
1 ms |
1236 KB |
Output is correct |
28 |
Correct |
1 ms |
1360 KB |
Output is correct |
29 |
Correct |
2 ms |
1364 KB |
Output is correct |
30 |
Correct |
2 ms |
1356 KB |
Output is correct |
31 |
Correct |
2 ms |
1364 KB |
Output is correct |
32 |
Correct |
2 ms |
1308 KB |
Output is correct |
33 |
Correct |
3 ms |
1236 KB |
Output is correct |
34 |
Correct |
2 ms |
1356 KB |
Output is correct |
35 |
Correct |
2 ms |
1236 KB |
Output is correct |
36 |
Correct |
1 ms |
1236 KB |
Output is correct |
37 |
Correct |
1 ms |
1236 KB |
Output is correct |
38 |
Correct |
1 ms |
1236 KB |
Output is correct |
39 |
Correct |
2 ms |
1364 KB |
Output is correct |
40 |
Correct |
2 ms |
1360 KB |
Output is correct |
41 |
Correct |
1 ms |
1236 KB |
Output is correct |
42 |
Correct |
2 ms |
1236 KB |
Output is correct |
43 |
Correct |
2 ms |
1236 KB |
Output is correct |
44 |
Correct |
2 ms |
1236 KB |
Output is correct |
45 |
Correct |
2 ms |
1360 KB |
Output is correct |
46 |
Correct |
2 ms |
1360 KB |
Output is correct |
47 |
Correct |
2 ms |
1236 KB |
Output is correct |
48 |
Correct |
3 ms |
1364 KB |
Output is correct |
49 |
Correct |
3 ms |
1236 KB |
Output is correct |
50 |
Correct |
2 ms |
1236 KB |
Output is correct |
51 |
Correct |
2 ms |
1236 KB |
Output is correct |
52 |
Correct |
3 ms |
1236 KB |
Output is correct |
53 |
Correct |
2 ms |
1364 KB |
Output is correct |
54 |
Correct |
2 ms |
1236 KB |
Output is correct |
55 |
Correct |
2 ms |
1360 KB |
Output is correct |
56 |
Correct |
2 ms |
1364 KB |
Output is correct |
57 |
Correct |
1 ms |
1236 KB |
Output is correct |
58 |
Correct |
2 ms |
1236 KB |
Output is correct |
59 |
Correct |
1 ms |
1236 KB |
Output is correct |
60 |
Correct |
2 ms |
1236 KB |
Output is correct |
61 |
Correct |
2 ms |
1364 KB |
Output is correct |
62 |
Correct |
2 ms |
1236 KB |
Output is correct |
63 |
Correct |
3 ms |
1364 KB |
Output is correct |
64 |
Correct |
2 ms |
1360 KB |
Output is correct |
65 |
Correct |
10 ms |
1364 KB |
Output is correct |
66 |
Correct |
10 ms |
1364 KB |
Output is correct |
67 |
Correct |
10 ms |
1364 KB |
Output is correct |
68 |
Correct |
8 ms |
1360 KB |
Output is correct |
69 |
Correct |
18 ms |
1372 KB |
Output is correct |
70 |
Correct |
17 ms |
1360 KB |
Output is correct |
71 |
Correct |
13 ms |
1364 KB |
Output is correct |
72 |
Correct |
15 ms |
1364 KB |
Output is correct |
73 |
Correct |
15 ms |
1376 KB |
Output is correct |
74 |
Correct |
11 ms |
1364 KB |
Output is correct |
75 |
Correct |
12 ms |
1356 KB |
Output is correct |
76 |
Correct |
14 ms |
1364 KB |
Output is correct |
77 |
Correct |
29 ms |
1364 KB |
Output is correct |
78 |
Correct |
27 ms |
1364 KB |
Output is correct |
79 |
Correct |
24 ms |
1356 KB |
Output is correct |
80 |
Correct |
22 ms |
1364 KB |
Output is correct |
81 |
Correct |
21 ms |
1392 KB |
Output is correct |
82 |
Correct |
27 ms |
1364 KB |
Output is correct |
83 |
Correct |
19 ms |
1384 KB |
Output is correct |
84 |
Correct |
18 ms |
1364 KB |
Output is correct |
85 |
Correct |
47 ms |
1372 KB |
Output is correct |
86 |
Correct |
41 ms |
1364 KB |
Output is correct |
87 |
Correct |
39 ms |
1364 KB |
Output is correct |
88 |
Correct |
41 ms |
1364 KB |
Output is correct |
89 |
Correct |
27 ms |
1364 KB |
Output is correct |
90 |
Correct |
35 ms |
1364 KB |
Output is correct |
91 |
Correct |
30 ms |
1364 KB |
Output is correct |
92 |
Correct |
32 ms |
1364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1236 KB |
Output is correct |
2 |
Correct |
1 ms |
1236 KB |
Output is correct |
3 |
Correct |
2 ms |
1236 KB |
Output is correct |
4 |
Correct |
2 ms |
1236 KB |
Output is correct |
5 |
Correct |
2 ms |
1236 KB |
Output is correct |
6 |
Correct |
2 ms |
1236 KB |
Output is correct |
7 |
Correct |
1 ms |
1360 KB |
Output is correct |
8 |
Correct |
2 ms |
1236 KB |
Output is correct |
9 |
Correct |
1 ms |
1364 KB |
Output is correct |
10 |
Correct |
2 ms |
1236 KB |
Output is correct |
11 |
Correct |
1 ms |
1364 KB |
Output is correct |
12 |
Correct |
1 ms |
1356 KB |
Output is correct |
13 |
Correct |
2 ms |
1356 KB |
Output is correct |
14 |
Correct |
2 ms |
1364 KB |
Output is correct |
15 |
Correct |
2 ms |
1236 KB |
Output is correct |
16 |
Correct |
2 ms |
1236 KB |
Output is correct |
17 |
Correct |
2 ms |
1236 KB |
Output is correct |
18 |
Correct |
2 ms |
1356 KB |
Output is correct |
19 |
Correct |
1 ms |
1352 KB |
Output is correct |
20 |
Correct |
2 ms |
1236 KB |
Output is correct |
21 |
Correct |
2 ms |
1356 KB |
Output is correct |
22 |
Correct |
2 ms |
1272 KB |
Output is correct |
23 |
Correct |
2 ms |
1356 KB |
Output is correct |
24 |
Correct |
2 ms |
1236 KB |
Output is correct |
25 |
Correct |
1 ms |
1236 KB |
Output is correct |
26 |
Correct |
1 ms |
1236 KB |
Output is correct |
27 |
Correct |
1 ms |
1236 KB |
Output is correct |
28 |
Correct |
1 ms |
1360 KB |
Output is correct |
29 |
Correct |
2 ms |
1364 KB |
Output is correct |
30 |
Correct |
2 ms |
1356 KB |
Output is correct |
31 |
Correct |
2 ms |
1364 KB |
Output is correct |
32 |
Correct |
2 ms |
1308 KB |
Output is correct |
33 |
Correct |
3 ms |
1236 KB |
Output is correct |
34 |
Correct |
2 ms |
1356 KB |
Output is correct |
35 |
Correct |
2 ms |
1236 KB |
Output is correct |
36 |
Correct |
1 ms |
1236 KB |
Output is correct |
37 |
Correct |
1 ms |
1236 KB |
Output is correct |
38 |
Correct |
1 ms |
1236 KB |
Output is correct |
39 |
Correct |
2 ms |
1364 KB |
Output is correct |
40 |
Correct |
2 ms |
1360 KB |
Output is correct |
41 |
Correct |
1 ms |
1236 KB |
Output is correct |
42 |
Correct |
2 ms |
1236 KB |
Output is correct |
43 |
Correct |
2 ms |
1236 KB |
Output is correct |
44 |
Correct |
2 ms |
1236 KB |
Output is correct |
45 |
Correct |
2 ms |
1360 KB |
Output is correct |
46 |
Correct |
2 ms |
1360 KB |
Output is correct |
47 |
Correct |
2 ms |
1236 KB |
Output is correct |
48 |
Correct |
3 ms |
1364 KB |
Output is correct |
49 |
Correct |
3 ms |
1236 KB |
Output is correct |
50 |
Correct |
2 ms |
1236 KB |
Output is correct |
51 |
Correct |
2 ms |
1236 KB |
Output is correct |
52 |
Correct |
3 ms |
1236 KB |
Output is correct |
53 |
Correct |
2 ms |
1364 KB |
Output is correct |
54 |
Correct |
2 ms |
1236 KB |
Output is correct |
55 |
Correct |
2 ms |
1360 KB |
Output is correct |
56 |
Correct |
2 ms |
1364 KB |
Output is correct |
57 |
Correct |
1 ms |
1236 KB |
Output is correct |
58 |
Correct |
2 ms |
1236 KB |
Output is correct |
59 |
Correct |
1 ms |
1236 KB |
Output is correct |
60 |
Correct |
2 ms |
1236 KB |
Output is correct |
61 |
Correct |
2 ms |
1364 KB |
Output is correct |
62 |
Correct |
2 ms |
1236 KB |
Output is correct |
63 |
Correct |
3 ms |
1364 KB |
Output is correct |
64 |
Correct |
2 ms |
1360 KB |
Output is correct |
65 |
Correct |
10 ms |
1364 KB |
Output is correct |
66 |
Correct |
10 ms |
1364 KB |
Output is correct |
67 |
Correct |
10 ms |
1364 KB |
Output is correct |
68 |
Correct |
8 ms |
1360 KB |
Output is correct |
69 |
Correct |
18 ms |
1372 KB |
Output is correct |
70 |
Correct |
17 ms |
1360 KB |
Output is correct |
71 |
Correct |
13 ms |
1364 KB |
Output is correct |
72 |
Correct |
15 ms |
1364 KB |
Output is correct |
73 |
Correct |
15 ms |
1376 KB |
Output is correct |
74 |
Correct |
11 ms |
1364 KB |
Output is correct |
75 |
Correct |
12 ms |
1356 KB |
Output is correct |
76 |
Correct |
14 ms |
1364 KB |
Output is correct |
77 |
Correct |
29 ms |
1364 KB |
Output is correct |
78 |
Correct |
27 ms |
1364 KB |
Output is correct |
79 |
Correct |
24 ms |
1356 KB |
Output is correct |
80 |
Correct |
22 ms |
1364 KB |
Output is correct |
81 |
Correct |
21 ms |
1392 KB |
Output is correct |
82 |
Correct |
27 ms |
1364 KB |
Output is correct |
83 |
Correct |
19 ms |
1384 KB |
Output is correct |
84 |
Correct |
18 ms |
1364 KB |
Output is correct |
85 |
Correct |
47 ms |
1372 KB |
Output is correct |
86 |
Correct |
41 ms |
1364 KB |
Output is correct |
87 |
Correct |
39 ms |
1364 KB |
Output is correct |
88 |
Correct |
41 ms |
1364 KB |
Output is correct |
89 |
Correct |
27 ms |
1364 KB |
Output is correct |
90 |
Correct |
35 ms |
1364 KB |
Output is correct |
91 |
Correct |
30 ms |
1364 KB |
Output is correct |
92 |
Correct |
32 ms |
1364 KB |
Output is correct |
93 |
Correct |
921 ms |
1592 KB |
Output is correct |
94 |
Correct |
871 ms |
1592 KB |
Output is correct |
95 |
Correct |
864 ms |
1596 KB |
Output is correct |
96 |
Correct |
666 ms |
1600 KB |
Output is correct |
97 |
Correct |
547 ms |
1592 KB |
Output is correct |
98 |
Correct |
603 ms |
1712 KB |
Output is correct |
99 |
Correct |
85 ms |
1484 KB |
Output is correct |
100 |
Correct |
74 ms |
1364 KB |
Output is correct |
101 |
Correct |
84 ms |
1364 KB |
Output is correct |
102 |
Correct |
60 ms |
1364 KB |
Output is correct |
103 |
Correct |
530 ms |
1496 KB |
Output is correct |
104 |
Correct |
295 ms |
1356 KB |
Output is correct |
105 |
Correct |
242 ms |
1360 KB |
Output is correct |
106 |
Correct |
236 ms |
1444 KB |
Output is correct |
107 |
Correct |
1534 ms |
1592 KB |
Output is correct |
108 |
Correct |
669 ms |
1592 KB |
Output is correct |
109 |
Correct |
578 ms |
1488 KB |
Output is correct |
110 |
Correct |
525 ms |
1492 KB |
Output is correct |
111 |
Correct |
59 ms |
1388 KB |
Output is correct |
112 |
Correct |
55 ms |
1364 KB |
Output is correct |
113 |
Correct |
51 ms |
1384 KB |
Output is correct |
114 |
Correct |
124 ms |
1400 KB |
Output is correct |
115 |
Correct |
94 ms |
1404 KB |
Output is correct |
116 |
Correct |
89 ms |
1388 KB |
Output is correct |
117 |
Correct |
92 ms |
1364 KB |
Output is correct |
118 |
Correct |
72 ms |
1364 KB |
Output is correct |
119 |
Correct |
69 ms |
1388 KB |
Output is correct |
120 |
Correct |
71 ms |
1364 KB |
Output is correct |
121 |
Correct |
74 ms |
1380 KB |
Output is correct |
122 |
Correct |
188 ms |
1440 KB |
Output is correct |
123 |
Correct |
151 ms |
1364 KB |
Output is correct |
124 |
Correct |
145 ms |
1364 KB |
Output is correct |
125 |
Correct |
136 ms |
1364 KB |
Output is correct |
126 |
Correct |
133 ms |
1364 KB |
Output is correct |
127 |
Correct |
117 ms |
1364 KB |
Output is correct |
128 |
Correct |
112 ms |
1364 KB |
Output is correct |
129 |
Correct |
112 ms |
1408 KB |
Output is correct |
130 |
Correct |
110 ms |
1404 KB |
Output is correct |
131 |
Correct |
359 ms |
1472 KB |
Output is correct |
132 |
Correct |
277 ms |
1432 KB |
Output is correct |
133 |
Correct |
257 ms |
1420 KB |
Output is correct |
134 |
Correct |
267 ms |
1364 KB |
Output is correct |
135 |
Correct |
218 ms |
1472 KB |
Output is correct |
136 |
Correct |
201 ms |
1416 KB |
Output is correct |
137 |
Correct |
232 ms |
1356 KB |
Output is correct |
138 |
Correct |
251 ms |
1404 KB |
Output is correct |
139 |
Correct |
186 ms |
1468 KB |
Output is correct |
140 |
Correct |
214 ms |
1464 KB |
Output is correct |
141 |
Correct |
185 ms |
1488 KB |
Output is correct |
142 |
Correct |
459 ms |
1468 KB |
Output is correct |
143 |
Correct |
409 ms |
1464 KB |
Output is correct |
144 |
Correct |
388 ms |
1492 KB |
Output is correct |
145 |
Correct |
372 ms |
1456 KB |
Output is correct |
146 |
Correct |
360 ms |
1364 KB |
Output is correct |
147 |
Correct |
335 ms |
1432 KB |
Output is correct |
148 |
Correct |
478 ms |
1472 KB |
Output is correct |
149 |
Correct |
472 ms |
1444 KB |
Output is correct |
150 |
Correct |
430 ms |
1488 KB |
Output is correct |
151 |
Correct |
491 ms |
1484 KB |
Output is correct |
152 |
Correct |
479 ms |
1436 KB |
Output is correct |
153 |
Correct |
656 ms |
1596 KB |
Output is correct |
154 |
Correct |
662 ms |
1588 KB |
Output is correct |
155 |
Correct |
687 ms |
1492 KB |
Output is correct |
156 |
Correct |
692 ms |
1428 KB |
Output is correct |
157 |
Correct |
653 ms |
1496 KB |
Output is correct |
158 |
Correct |
647 ms |
1444 KB |
Output is correct |
159 |
Correct |
569 ms |
1592 KB |
Output is correct |
160 |
Correct |
544 ms |
1456 KB |
Output is correct |
161 |
Correct |
578 ms |
1420 KB |
Output is correct |
162 |
Correct |
500 ms |
1592 KB |
Output is correct |
163 |
Correct |
472 ms |
1492 KB |
Output is correct |
164 |
Correct |
435 ms |
1448 KB |
Output is correct |
165 |
Correct |
417 ms |
1436 KB |
Output is correct |
166 |
Correct |
415 ms |
1428 KB |
Output is correct |
167 |
Correct |
432 ms |
1432 KB |
Output is correct |