#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("Ofast")
#pragma GCC target("tune=native")
#pragma GCC optimize("unroll-loops")
#define fi first
#define se second
#define ll long long
#define ld long double
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mpp make_pair
#define ve vector
using namespace std;
using namespace __gnu_pbds;
template<class T> using oset = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
const ll inf = 1e18; const int iinf = 1e9;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename T> inline bool chmin(T& a, T b) { return (a > b ? a = b, 1 : 0); }
template <typename T> inline bool chmax(T& a, T b) { return (a < b ? a = b, 1 : 0); }
const int N = 4e5 + 10;
#define int long long
int n, m;
ve<int> gr[N];
ve<pii> g[N], g1[N];
int in[N], f[N], sz[N], used[N], used1[N], used2[N];
int tim = 0, num, ans;
ve<int> ar; deque<int> ord;
inline void dfs (int v, int p) {
used[v] = 1;
in[v] = f[v] = tim++;
for (auto &[to, id] : g[v]) {
if (to == p) continue;
if (used[to]) {
chmin(f[v], in[to]);
if (in[to] < in[v]) g1[v].pb({to, id});
}
else {
if (!~p) { ord.pb(id); used1[id] = 1; }
dfs(to, v);
g1[v].pb({to, id});
chmin(f[v], f[to]);
}
}
}
inline void dfs1(int v) {
if (used2[v]) return;
used2[v] = 1;
for (auto &[to, id] : g1[v]) {
if (used1[id]) continue;
used1[id] = 1;
if (f[to] < in[v]) { ar.pb(id); dfs1(to); }
else ord.pb(id);
}
}
inline void dfssz(int v, int p) {
used[v] = 1;
if (v < n) sz[v] = 1;
for (auto &to : gr[v]) {
if (to == p) continue;
dfssz(to, v); sz[v] += sz[to];
}
}
inline void calc(int v, int p) {
int up = num - sz[v];
if (v >= n) {
ans -= up * (up - 1) * (sz(gr[v]) - 1);
for (auto &to : gr[v]) {
if (to == p) continue;
ans -= sz[to] * (sz[to] - 1) * (sz(gr[v]) - 1);
}
}
for (auto &to : gr[v]) {
if (to == p) continue;
calc(to, v);
}
}
inline void solve() {
cin >> n >> m;
ve<pii> e(m);
for (int i = 0; i < m; ++i) {
int u, v;
cin >> u >> v, --u; --v;
g[u].pb({v, i}); g[v].pb({u, i});
e[i] = mpp(v, u);
}
int cur = n;
for (int i = 0; i < n; ++i) {
if (used[i]) continue;
int have = tim; dfs(i, -1);
ans += (tim - have) * (tim - have - 1) * (tim - have - 2);
while (sz(ord)) {
int j = ord.front();
ord.pop_front();
ar.clear(); ar.pb(j);
dfs1(e[j].fi), dfs1(e[j].se);
set <int> st;
for (auto &id : ar) {
st.insert(e[id].fi);
st.insert(e[id].se);
}
for (auto &v : st) {
gr[v].pb(cur);
gr[cur].pb(v);
} ++cur;
}
}
fill(used, used + N, 0);
for (int i = n; i < cur; ++i) {
if (!used[i]) {
dfssz(i, -1);
num = sz[i];
calc(i, -1);
}
}
cout << ans;
}
signed main() {
ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int q = 1; // cin >> q;
while (q--) solve();
cerr << fixed << setprecision(3) << "Time execution: " << (double)clock() / CLOCKS_PER_SEC << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
31680 KB |
Output is correct |
2 |
Correct |
15 ms |
31580 KB |
Output is correct |
3 |
Correct |
17 ms |
31572 KB |
Output is correct |
4 |
Correct |
16 ms |
31584 KB |
Output is correct |
5 |
Correct |
15 ms |
31572 KB |
Output is correct |
6 |
Correct |
16 ms |
31572 KB |
Output is correct |
7 |
Correct |
19 ms |
31572 KB |
Output is correct |
8 |
Correct |
16 ms |
31560 KB |
Output is correct |
9 |
Correct |
18 ms |
31580 KB |
Output is correct |
10 |
Correct |
15 ms |
31580 KB |
Output is correct |
11 |
Correct |
21 ms |
31572 KB |
Output is correct |
12 |
Correct |
16 ms |
31576 KB |
Output is correct |
13 |
Correct |
16 ms |
31580 KB |
Output is correct |
14 |
Correct |
18 ms |
31580 KB |
Output is correct |
15 |
Correct |
15 ms |
31604 KB |
Output is correct |
16 |
Correct |
17 ms |
31580 KB |
Output is correct |
17 |
Correct |
16 ms |
31576 KB |
Output is correct |
18 |
Correct |
15 ms |
31672 KB |
Output is correct |
19 |
Correct |
17 ms |
31600 KB |
Output is correct |
20 |
Correct |
15 ms |
31572 KB |
Output is correct |
21 |
Correct |
19 ms |
31672 KB |
Output is correct |
22 |
Correct |
17 ms |
31616 KB |
Output is correct |
23 |
Correct |
16 ms |
31572 KB |
Output is correct |
24 |
Correct |
16 ms |
31580 KB |
Output is correct |
25 |
Correct |
16 ms |
31668 KB |
Output is correct |
26 |
Correct |
16 ms |
31576 KB |
Output is correct |
27 |
Correct |
16 ms |
31572 KB |
Output is correct |
28 |
Correct |
16 ms |
31572 KB |
Output is correct |
29 |
Correct |
19 ms |
31620 KB |
Output is correct |
30 |
Correct |
16 ms |
31600 KB |
Output is correct |
31 |
Correct |
15 ms |
31572 KB |
Output is correct |
32 |
Correct |
16 ms |
31572 KB |
Output is correct |
33 |
Correct |
18 ms |
31572 KB |
Output is correct |
34 |
Correct |
18 ms |
31572 KB |
Output is correct |
35 |
Correct |
17 ms |
31572 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
31680 KB |
Output is correct |
2 |
Correct |
15 ms |
31580 KB |
Output is correct |
3 |
Correct |
17 ms |
31572 KB |
Output is correct |
4 |
Correct |
16 ms |
31584 KB |
Output is correct |
5 |
Correct |
15 ms |
31572 KB |
Output is correct |
6 |
Correct |
16 ms |
31572 KB |
Output is correct |
7 |
Correct |
19 ms |
31572 KB |
Output is correct |
8 |
Correct |
16 ms |
31560 KB |
Output is correct |
9 |
Correct |
18 ms |
31580 KB |
Output is correct |
10 |
Correct |
15 ms |
31580 KB |
Output is correct |
11 |
Correct |
21 ms |
31572 KB |
Output is correct |
12 |
Correct |
16 ms |
31576 KB |
Output is correct |
13 |
Correct |
16 ms |
31580 KB |
Output is correct |
14 |
Correct |
18 ms |
31580 KB |
Output is correct |
15 |
Correct |
15 ms |
31604 KB |
Output is correct |
16 |
Correct |
17 ms |
31580 KB |
Output is correct |
17 |
Correct |
16 ms |
31576 KB |
Output is correct |
18 |
Correct |
15 ms |
31672 KB |
Output is correct |
19 |
Correct |
17 ms |
31600 KB |
Output is correct |
20 |
Correct |
15 ms |
31572 KB |
Output is correct |
21 |
Correct |
19 ms |
31672 KB |
Output is correct |
22 |
Correct |
17 ms |
31616 KB |
Output is correct |
23 |
Correct |
16 ms |
31572 KB |
Output is correct |
24 |
Correct |
16 ms |
31580 KB |
Output is correct |
25 |
Correct |
16 ms |
31668 KB |
Output is correct |
26 |
Correct |
16 ms |
31576 KB |
Output is correct |
27 |
Correct |
16 ms |
31572 KB |
Output is correct |
28 |
Correct |
16 ms |
31572 KB |
Output is correct |
29 |
Correct |
19 ms |
31620 KB |
Output is correct |
30 |
Correct |
16 ms |
31600 KB |
Output is correct |
31 |
Correct |
15 ms |
31572 KB |
Output is correct |
32 |
Correct |
16 ms |
31572 KB |
Output is correct |
33 |
Correct |
18 ms |
31572 KB |
Output is correct |
34 |
Correct |
18 ms |
31572 KB |
Output is correct |
35 |
Correct |
17 ms |
31572 KB |
Output is correct |
36 |
Correct |
15 ms |
31572 KB |
Output is correct |
37 |
Correct |
14 ms |
31612 KB |
Output is correct |
38 |
Correct |
18 ms |
31676 KB |
Output is correct |
39 |
Correct |
16 ms |
31580 KB |
Output is correct |
40 |
Correct |
17 ms |
31572 KB |
Output is correct |
41 |
Correct |
17 ms |
31572 KB |
Output is correct |
42 |
Correct |
17 ms |
31584 KB |
Output is correct |
43 |
Correct |
19 ms |
31572 KB |
Output is correct |
44 |
Correct |
16 ms |
31608 KB |
Output is correct |
45 |
Correct |
18 ms |
31576 KB |
Output is correct |
46 |
Correct |
16 ms |
31612 KB |
Output is correct |
47 |
Correct |
17 ms |
31584 KB |
Output is correct |
48 |
Correct |
16 ms |
31668 KB |
Output is correct |
49 |
Correct |
16 ms |
31572 KB |
Output is correct |
50 |
Correct |
18 ms |
31572 KB |
Output is correct |
51 |
Correct |
16 ms |
31580 KB |
Output is correct |
52 |
Correct |
16 ms |
31576 KB |
Output is correct |
53 |
Correct |
16 ms |
31572 KB |
Output is correct |
54 |
Correct |
15 ms |
31580 KB |
Output is correct |
55 |
Correct |
16 ms |
31572 KB |
Output is correct |
56 |
Correct |
17 ms |
31580 KB |
Output is correct |
57 |
Correct |
15 ms |
31652 KB |
Output is correct |
58 |
Correct |
17 ms |
31572 KB |
Output is correct |
59 |
Correct |
17 ms |
31700 KB |
Output is correct |
60 |
Correct |
17 ms |
31572 KB |
Output is correct |
61 |
Correct |
16 ms |
31576 KB |
Output is correct |
62 |
Correct |
16 ms |
31572 KB |
Output is correct |
63 |
Correct |
16 ms |
31580 KB |
Output is correct |
64 |
Correct |
16 ms |
31580 KB |
Output is correct |
65 |
Correct |
17 ms |
31572 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
138 ms |
58256 KB |
Output is correct |
2 |
Correct |
131 ms |
58176 KB |
Output is correct |
3 |
Correct |
163 ms |
52200 KB |
Output is correct |
4 |
Correct |
159 ms |
56584 KB |
Output is correct |
5 |
Correct |
134 ms |
50732 KB |
Output is correct |
6 |
Correct |
155 ms |
52056 KB |
Output is correct |
7 |
Correct |
174 ms |
51760 KB |
Output is correct |
8 |
Correct |
139 ms |
52484 KB |
Output is correct |
9 |
Correct |
160 ms |
50264 KB |
Output is correct |
10 |
Correct |
154 ms |
50396 KB |
Output is correct |
11 |
Correct |
123 ms |
48076 KB |
Output is correct |
12 |
Correct |
123 ms |
47744 KB |
Output is correct |
13 |
Correct |
125 ms |
47172 KB |
Output is correct |
14 |
Correct |
113 ms |
46816 KB |
Output is correct |
15 |
Correct |
85 ms |
44964 KB |
Output is correct |
16 |
Correct |
105 ms |
44640 KB |
Output is correct |
17 |
Correct |
22 ms |
34516 KB |
Output is correct |
18 |
Correct |
19 ms |
34644 KB |
Output is correct |
19 |
Correct |
19 ms |
34516 KB |
Output is correct |
20 |
Correct |
17 ms |
34388 KB |
Output is correct |
21 |
Correct |
18 ms |
34232 KB |
Output is correct |
22 |
Correct |
19 ms |
34260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
31828 KB |
Output is correct |
2 |
Correct |
17 ms |
31824 KB |
Output is correct |
3 |
Correct |
15 ms |
31816 KB |
Output is correct |
4 |
Correct |
17 ms |
31848 KB |
Output is correct |
5 |
Correct |
19 ms |
31824 KB |
Output is correct |
6 |
Correct |
17 ms |
31796 KB |
Output is correct |
7 |
Correct |
17 ms |
31828 KB |
Output is correct |
8 |
Correct |
17 ms |
31776 KB |
Output is correct |
9 |
Correct |
17 ms |
31828 KB |
Output is correct |
10 |
Correct |
19 ms |
31840 KB |
Output is correct |
11 |
Correct |
17 ms |
31844 KB |
Output is correct |
12 |
Correct |
17 ms |
31864 KB |
Output is correct |
13 |
Correct |
17 ms |
31828 KB |
Output is correct |
14 |
Correct |
16 ms |
31828 KB |
Output is correct |
15 |
Correct |
17 ms |
31788 KB |
Output is correct |
16 |
Correct |
16 ms |
31700 KB |
Output is correct |
17 |
Correct |
17 ms |
31828 KB |
Output is correct |
18 |
Correct |
18 ms |
31776 KB |
Output is correct |
19 |
Correct |
16 ms |
31828 KB |
Output is correct |
20 |
Correct |
16 ms |
31828 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
159 ms |
50872 KB |
Output is correct |
2 |
Correct |
163 ms |
50896 KB |
Output is correct |
3 |
Correct |
166 ms |
50764 KB |
Output is correct |
4 |
Correct |
158 ms |
50776 KB |
Output is correct |
5 |
Correct |
179 ms |
50812 KB |
Output is correct |
6 |
Correct |
159 ms |
53828 KB |
Output is correct |
7 |
Correct |
178 ms |
52872 KB |
Output is correct |
8 |
Correct |
171 ms |
52316 KB |
Output is correct |
9 |
Correct |
159 ms |
51740 KB |
Output is correct |
10 |
Correct |
157 ms |
50836 KB |
Output is correct |
11 |
Correct |
180 ms |
50892 KB |
Output is correct |
12 |
Correct |
154 ms |
50868 KB |
Output is correct |
13 |
Correct |
158 ms |
50948 KB |
Output is correct |
14 |
Correct |
154 ms |
49668 KB |
Output is correct |
15 |
Correct |
132 ms |
48428 KB |
Output is correct |
16 |
Correct |
78 ms |
44232 KB |
Output is correct |
17 |
Correct |
105 ms |
50192 KB |
Output is correct |
18 |
Correct |
93 ms |
50108 KB |
Output is correct |
19 |
Correct |
94 ms |
50304 KB |
Output is correct |
20 |
Correct |
94 ms |
50112 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
31852 KB |
Output is correct |
2 |
Correct |
18 ms |
31828 KB |
Output is correct |
3 |
Correct |
18 ms |
31820 KB |
Output is correct |
4 |
Correct |
17 ms |
31844 KB |
Output is correct |
5 |
Correct |
20 ms |
31844 KB |
Output is correct |
6 |
Correct |
16 ms |
31820 KB |
Output is correct |
7 |
Correct |
16 ms |
31844 KB |
Output is correct |
8 |
Correct |
16 ms |
31828 KB |
Output is correct |
9 |
Correct |
18 ms |
31844 KB |
Output is correct |
10 |
Correct |
18 ms |
31844 KB |
Output is correct |
11 |
Correct |
20 ms |
31924 KB |
Output is correct |
12 |
Correct |
17 ms |
31880 KB |
Output is correct |
13 |
Correct |
21 ms |
31836 KB |
Output is correct |
14 |
Correct |
19 ms |
31828 KB |
Output is correct |
15 |
Correct |
16 ms |
31828 KB |
Output is correct |
16 |
Correct |
16 ms |
31828 KB |
Output is correct |
17 |
Correct |
18 ms |
31844 KB |
Output is correct |
18 |
Correct |
18 ms |
31780 KB |
Output is correct |
19 |
Correct |
17 ms |
31816 KB |
Output is correct |
20 |
Correct |
19 ms |
31828 KB |
Output is correct |
21 |
Correct |
17 ms |
31864 KB |
Output is correct |
22 |
Correct |
16 ms |
31852 KB |
Output is correct |
23 |
Correct |
17 ms |
31828 KB |
Output is correct |
24 |
Correct |
18 ms |
31840 KB |
Output is correct |
25 |
Correct |
17 ms |
31648 KB |
Output is correct |
26 |
Correct |
15 ms |
31728 KB |
Output is correct |
27 |
Correct |
18 ms |
31700 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
166 ms |
50936 KB |
Output is correct |
2 |
Correct |
206 ms |
50764 KB |
Output is correct |
3 |
Correct |
188 ms |
51540 KB |
Output is correct |
4 |
Correct |
179 ms |
51108 KB |
Output is correct |
5 |
Correct |
208 ms |
50016 KB |
Output is correct |
6 |
Correct |
178 ms |
49416 KB |
Output is correct |
7 |
Correct |
176 ms |
49228 KB |
Output is correct |
8 |
Correct |
150 ms |
48700 KB |
Output is correct |
9 |
Correct |
157 ms |
48648 KB |
Output is correct |
10 |
Correct |
149 ms |
48492 KB |
Output is correct |
11 |
Correct |
155 ms |
48352 KB |
Output is correct |
12 |
Correct |
126 ms |
48332 KB |
Output is correct |
13 |
Correct |
138 ms |
48536 KB |
Output is correct |
14 |
Correct |
148 ms |
49728 KB |
Output is correct |
15 |
Correct |
194 ms |
53560 KB |
Output is correct |
16 |
Correct |
206 ms |
53028 KB |
Output is correct |
17 |
Correct |
191 ms |
53088 KB |
Output is correct |
18 |
Correct |
178 ms |
52568 KB |
Output is correct |
19 |
Correct |
189 ms |
51120 KB |
Output is correct |
20 |
Correct |
199 ms |
51068 KB |
Output is correct |
21 |
Correct |
183 ms |
51144 KB |
Output is correct |
22 |
Correct |
148 ms |
49956 KB |
Output is correct |
23 |
Correct |
148 ms |
48816 KB |
Output is correct |
24 |
Correct |
168 ms |
51400 KB |
Output is correct |
25 |
Correct |
161 ms |
51540 KB |
Output is correct |
26 |
Correct |
158 ms |
51168 KB |
Output is correct |
27 |
Correct |
181 ms |
51220 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
31680 KB |
Output is correct |
2 |
Correct |
15 ms |
31580 KB |
Output is correct |
3 |
Correct |
17 ms |
31572 KB |
Output is correct |
4 |
Correct |
16 ms |
31584 KB |
Output is correct |
5 |
Correct |
15 ms |
31572 KB |
Output is correct |
6 |
Correct |
16 ms |
31572 KB |
Output is correct |
7 |
Correct |
19 ms |
31572 KB |
Output is correct |
8 |
Correct |
16 ms |
31560 KB |
Output is correct |
9 |
Correct |
18 ms |
31580 KB |
Output is correct |
10 |
Correct |
15 ms |
31580 KB |
Output is correct |
11 |
Correct |
21 ms |
31572 KB |
Output is correct |
12 |
Correct |
16 ms |
31576 KB |
Output is correct |
13 |
Correct |
16 ms |
31580 KB |
Output is correct |
14 |
Correct |
18 ms |
31580 KB |
Output is correct |
15 |
Correct |
15 ms |
31604 KB |
Output is correct |
16 |
Correct |
17 ms |
31580 KB |
Output is correct |
17 |
Correct |
16 ms |
31576 KB |
Output is correct |
18 |
Correct |
15 ms |
31672 KB |
Output is correct |
19 |
Correct |
17 ms |
31600 KB |
Output is correct |
20 |
Correct |
15 ms |
31572 KB |
Output is correct |
21 |
Correct |
19 ms |
31672 KB |
Output is correct |
22 |
Correct |
17 ms |
31616 KB |
Output is correct |
23 |
Correct |
16 ms |
31572 KB |
Output is correct |
24 |
Correct |
16 ms |
31580 KB |
Output is correct |
25 |
Correct |
16 ms |
31668 KB |
Output is correct |
26 |
Correct |
16 ms |
31576 KB |
Output is correct |
27 |
Correct |
16 ms |
31572 KB |
Output is correct |
28 |
Correct |
16 ms |
31572 KB |
Output is correct |
29 |
Correct |
19 ms |
31620 KB |
Output is correct |
30 |
Correct |
16 ms |
31600 KB |
Output is correct |
31 |
Correct |
15 ms |
31572 KB |
Output is correct |
32 |
Correct |
16 ms |
31572 KB |
Output is correct |
33 |
Correct |
18 ms |
31572 KB |
Output is correct |
34 |
Correct |
18 ms |
31572 KB |
Output is correct |
35 |
Correct |
17 ms |
31572 KB |
Output is correct |
36 |
Correct |
15 ms |
31572 KB |
Output is correct |
37 |
Correct |
14 ms |
31612 KB |
Output is correct |
38 |
Correct |
18 ms |
31676 KB |
Output is correct |
39 |
Correct |
16 ms |
31580 KB |
Output is correct |
40 |
Correct |
17 ms |
31572 KB |
Output is correct |
41 |
Correct |
17 ms |
31572 KB |
Output is correct |
42 |
Correct |
17 ms |
31584 KB |
Output is correct |
43 |
Correct |
19 ms |
31572 KB |
Output is correct |
44 |
Correct |
16 ms |
31608 KB |
Output is correct |
45 |
Correct |
18 ms |
31576 KB |
Output is correct |
46 |
Correct |
16 ms |
31612 KB |
Output is correct |
47 |
Correct |
17 ms |
31584 KB |
Output is correct |
48 |
Correct |
16 ms |
31668 KB |
Output is correct |
49 |
Correct |
16 ms |
31572 KB |
Output is correct |
50 |
Correct |
18 ms |
31572 KB |
Output is correct |
51 |
Correct |
16 ms |
31580 KB |
Output is correct |
52 |
Correct |
16 ms |
31576 KB |
Output is correct |
53 |
Correct |
16 ms |
31572 KB |
Output is correct |
54 |
Correct |
15 ms |
31580 KB |
Output is correct |
55 |
Correct |
16 ms |
31572 KB |
Output is correct |
56 |
Correct |
17 ms |
31580 KB |
Output is correct |
57 |
Correct |
15 ms |
31652 KB |
Output is correct |
58 |
Correct |
17 ms |
31572 KB |
Output is correct |
59 |
Correct |
17 ms |
31700 KB |
Output is correct |
60 |
Correct |
17 ms |
31572 KB |
Output is correct |
61 |
Correct |
16 ms |
31576 KB |
Output is correct |
62 |
Correct |
16 ms |
31572 KB |
Output is correct |
63 |
Correct |
16 ms |
31580 KB |
Output is correct |
64 |
Correct |
16 ms |
31580 KB |
Output is correct |
65 |
Correct |
17 ms |
31572 KB |
Output is correct |
66 |
Correct |
16 ms |
31700 KB |
Output is correct |
67 |
Correct |
17 ms |
31700 KB |
Output is correct |
68 |
Correct |
19 ms |
31844 KB |
Output is correct |
69 |
Correct |
18 ms |
31828 KB |
Output is correct |
70 |
Correct |
22 ms |
31948 KB |
Output is correct |
71 |
Correct |
18 ms |
31800 KB |
Output is correct |
72 |
Correct |
22 ms |
31828 KB |
Output is correct |
73 |
Correct |
18 ms |
31840 KB |
Output is correct |
74 |
Correct |
19 ms |
31844 KB |
Output is correct |
75 |
Correct |
17 ms |
31844 KB |
Output is correct |
76 |
Correct |
16 ms |
31700 KB |
Output is correct |
77 |
Correct |
16 ms |
31828 KB |
Output is correct |
78 |
Correct |
17 ms |
31844 KB |
Output is correct |
79 |
Correct |
16 ms |
31804 KB |
Output is correct |
80 |
Correct |
18 ms |
31832 KB |
Output is correct |
81 |
Correct |
17 ms |
31828 KB |
Output is correct |
82 |
Correct |
17 ms |
31828 KB |
Output is correct |
83 |
Correct |
17 ms |
31828 KB |
Output is correct |
84 |
Correct |
17 ms |
31848 KB |
Output is correct |
85 |
Correct |
19 ms |
31848 KB |
Output is correct |
86 |
Correct |
17 ms |
31828 KB |
Output is correct |
87 |
Correct |
17 ms |
31832 KB |
Output is correct |
88 |
Correct |
17 ms |
31828 KB |
Output is correct |
89 |
Correct |
17 ms |
31840 KB |
Output is correct |
90 |
Correct |
16 ms |
31828 KB |
Output is correct |
91 |
Correct |
17 ms |
31828 KB |
Output is correct |
92 |
Correct |
20 ms |
31836 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
31680 KB |
Output is correct |
2 |
Correct |
15 ms |
31580 KB |
Output is correct |
3 |
Correct |
17 ms |
31572 KB |
Output is correct |
4 |
Correct |
16 ms |
31584 KB |
Output is correct |
5 |
Correct |
15 ms |
31572 KB |
Output is correct |
6 |
Correct |
16 ms |
31572 KB |
Output is correct |
7 |
Correct |
19 ms |
31572 KB |
Output is correct |
8 |
Correct |
16 ms |
31560 KB |
Output is correct |
9 |
Correct |
18 ms |
31580 KB |
Output is correct |
10 |
Correct |
15 ms |
31580 KB |
Output is correct |
11 |
Correct |
21 ms |
31572 KB |
Output is correct |
12 |
Correct |
16 ms |
31576 KB |
Output is correct |
13 |
Correct |
16 ms |
31580 KB |
Output is correct |
14 |
Correct |
18 ms |
31580 KB |
Output is correct |
15 |
Correct |
15 ms |
31604 KB |
Output is correct |
16 |
Correct |
17 ms |
31580 KB |
Output is correct |
17 |
Correct |
16 ms |
31576 KB |
Output is correct |
18 |
Correct |
15 ms |
31672 KB |
Output is correct |
19 |
Correct |
17 ms |
31600 KB |
Output is correct |
20 |
Correct |
15 ms |
31572 KB |
Output is correct |
21 |
Correct |
19 ms |
31672 KB |
Output is correct |
22 |
Correct |
17 ms |
31616 KB |
Output is correct |
23 |
Correct |
16 ms |
31572 KB |
Output is correct |
24 |
Correct |
16 ms |
31580 KB |
Output is correct |
25 |
Correct |
16 ms |
31668 KB |
Output is correct |
26 |
Correct |
16 ms |
31576 KB |
Output is correct |
27 |
Correct |
16 ms |
31572 KB |
Output is correct |
28 |
Correct |
16 ms |
31572 KB |
Output is correct |
29 |
Correct |
19 ms |
31620 KB |
Output is correct |
30 |
Correct |
16 ms |
31600 KB |
Output is correct |
31 |
Correct |
15 ms |
31572 KB |
Output is correct |
32 |
Correct |
16 ms |
31572 KB |
Output is correct |
33 |
Correct |
18 ms |
31572 KB |
Output is correct |
34 |
Correct |
18 ms |
31572 KB |
Output is correct |
35 |
Correct |
17 ms |
31572 KB |
Output is correct |
36 |
Correct |
15 ms |
31572 KB |
Output is correct |
37 |
Correct |
14 ms |
31612 KB |
Output is correct |
38 |
Correct |
18 ms |
31676 KB |
Output is correct |
39 |
Correct |
16 ms |
31580 KB |
Output is correct |
40 |
Correct |
17 ms |
31572 KB |
Output is correct |
41 |
Correct |
17 ms |
31572 KB |
Output is correct |
42 |
Correct |
17 ms |
31584 KB |
Output is correct |
43 |
Correct |
19 ms |
31572 KB |
Output is correct |
44 |
Correct |
16 ms |
31608 KB |
Output is correct |
45 |
Correct |
18 ms |
31576 KB |
Output is correct |
46 |
Correct |
16 ms |
31612 KB |
Output is correct |
47 |
Correct |
17 ms |
31584 KB |
Output is correct |
48 |
Correct |
16 ms |
31668 KB |
Output is correct |
49 |
Correct |
16 ms |
31572 KB |
Output is correct |
50 |
Correct |
18 ms |
31572 KB |
Output is correct |
51 |
Correct |
16 ms |
31580 KB |
Output is correct |
52 |
Correct |
16 ms |
31576 KB |
Output is correct |
53 |
Correct |
16 ms |
31572 KB |
Output is correct |
54 |
Correct |
15 ms |
31580 KB |
Output is correct |
55 |
Correct |
16 ms |
31572 KB |
Output is correct |
56 |
Correct |
17 ms |
31580 KB |
Output is correct |
57 |
Correct |
15 ms |
31652 KB |
Output is correct |
58 |
Correct |
17 ms |
31572 KB |
Output is correct |
59 |
Correct |
17 ms |
31700 KB |
Output is correct |
60 |
Correct |
17 ms |
31572 KB |
Output is correct |
61 |
Correct |
16 ms |
31576 KB |
Output is correct |
62 |
Correct |
16 ms |
31572 KB |
Output is correct |
63 |
Correct |
16 ms |
31580 KB |
Output is correct |
64 |
Correct |
16 ms |
31580 KB |
Output is correct |
65 |
Correct |
17 ms |
31572 KB |
Output is correct |
66 |
Correct |
138 ms |
58256 KB |
Output is correct |
67 |
Correct |
131 ms |
58176 KB |
Output is correct |
68 |
Correct |
163 ms |
52200 KB |
Output is correct |
69 |
Correct |
159 ms |
56584 KB |
Output is correct |
70 |
Correct |
134 ms |
50732 KB |
Output is correct |
71 |
Correct |
155 ms |
52056 KB |
Output is correct |
72 |
Correct |
174 ms |
51760 KB |
Output is correct |
73 |
Correct |
139 ms |
52484 KB |
Output is correct |
74 |
Correct |
160 ms |
50264 KB |
Output is correct |
75 |
Correct |
154 ms |
50396 KB |
Output is correct |
76 |
Correct |
123 ms |
48076 KB |
Output is correct |
77 |
Correct |
123 ms |
47744 KB |
Output is correct |
78 |
Correct |
125 ms |
47172 KB |
Output is correct |
79 |
Correct |
113 ms |
46816 KB |
Output is correct |
80 |
Correct |
85 ms |
44964 KB |
Output is correct |
81 |
Correct |
105 ms |
44640 KB |
Output is correct |
82 |
Correct |
22 ms |
34516 KB |
Output is correct |
83 |
Correct |
19 ms |
34644 KB |
Output is correct |
84 |
Correct |
19 ms |
34516 KB |
Output is correct |
85 |
Correct |
17 ms |
34388 KB |
Output is correct |
86 |
Correct |
18 ms |
34232 KB |
Output is correct |
87 |
Correct |
19 ms |
34260 KB |
Output is correct |
88 |
Correct |
16 ms |
31828 KB |
Output is correct |
89 |
Correct |
17 ms |
31824 KB |
Output is correct |
90 |
Correct |
15 ms |
31816 KB |
Output is correct |
91 |
Correct |
17 ms |
31848 KB |
Output is correct |
92 |
Correct |
19 ms |
31824 KB |
Output is correct |
93 |
Correct |
17 ms |
31796 KB |
Output is correct |
94 |
Correct |
17 ms |
31828 KB |
Output is correct |
95 |
Correct |
17 ms |
31776 KB |
Output is correct |
96 |
Correct |
17 ms |
31828 KB |
Output is correct |
97 |
Correct |
19 ms |
31840 KB |
Output is correct |
98 |
Correct |
17 ms |
31844 KB |
Output is correct |
99 |
Correct |
17 ms |
31864 KB |
Output is correct |
100 |
Correct |
17 ms |
31828 KB |
Output is correct |
101 |
Correct |
16 ms |
31828 KB |
Output is correct |
102 |
Correct |
17 ms |
31788 KB |
Output is correct |
103 |
Correct |
16 ms |
31700 KB |
Output is correct |
104 |
Correct |
17 ms |
31828 KB |
Output is correct |
105 |
Correct |
18 ms |
31776 KB |
Output is correct |
106 |
Correct |
16 ms |
31828 KB |
Output is correct |
107 |
Correct |
16 ms |
31828 KB |
Output is correct |
108 |
Correct |
159 ms |
50872 KB |
Output is correct |
109 |
Correct |
163 ms |
50896 KB |
Output is correct |
110 |
Correct |
166 ms |
50764 KB |
Output is correct |
111 |
Correct |
158 ms |
50776 KB |
Output is correct |
112 |
Correct |
179 ms |
50812 KB |
Output is correct |
113 |
Correct |
159 ms |
53828 KB |
Output is correct |
114 |
Correct |
178 ms |
52872 KB |
Output is correct |
115 |
Correct |
171 ms |
52316 KB |
Output is correct |
116 |
Correct |
159 ms |
51740 KB |
Output is correct |
117 |
Correct |
157 ms |
50836 KB |
Output is correct |
118 |
Correct |
180 ms |
50892 KB |
Output is correct |
119 |
Correct |
154 ms |
50868 KB |
Output is correct |
120 |
Correct |
158 ms |
50948 KB |
Output is correct |
121 |
Correct |
154 ms |
49668 KB |
Output is correct |
122 |
Correct |
132 ms |
48428 KB |
Output is correct |
123 |
Correct |
78 ms |
44232 KB |
Output is correct |
124 |
Correct |
105 ms |
50192 KB |
Output is correct |
125 |
Correct |
93 ms |
50108 KB |
Output is correct |
126 |
Correct |
94 ms |
50304 KB |
Output is correct |
127 |
Correct |
94 ms |
50112 KB |
Output is correct |
128 |
Correct |
17 ms |
31852 KB |
Output is correct |
129 |
Correct |
18 ms |
31828 KB |
Output is correct |
130 |
Correct |
18 ms |
31820 KB |
Output is correct |
131 |
Correct |
17 ms |
31844 KB |
Output is correct |
132 |
Correct |
20 ms |
31844 KB |
Output is correct |
133 |
Correct |
16 ms |
31820 KB |
Output is correct |
134 |
Correct |
16 ms |
31844 KB |
Output is correct |
135 |
Correct |
16 ms |
31828 KB |
Output is correct |
136 |
Correct |
18 ms |
31844 KB |
Output is correct |
137 |
Correct |
18 ms |
31844 KB |
Output is correct |
138 |
Correct |
20 ms |
31924 KB |
Output is correct |
139 |
Correct |
17 ms |
31880 KB |
Output is correct |
140 |
Correct |
21 ms |
31836 KB |
Output is correct |
141 |
Correct |
19 ms |
31828 KB |
Output is correct |
142 |
Correct |
16 ms |
31828 KB |
Output is correct |
143 |
Correct |
16 ms |
31828 KB |
Output is correct |
144 |
Correct |
18 ms |
31844 KB |
Output is correct |
145 |
Correct |
18 ms |
31780 KB |
Output is correct |
146 |
Correct |
17 ms |
31816 KB |
Output is correct |
147 |
Correct |
19 ms |
31828 KB |
Output is correct |
148 |
Correct |
17 ms |
31864 KB |
Output is correct |
149 |
Correct |
16 ms |
31852 KB |
Output is correct |
150 |
Correct |
17 ms |
31828 KB |
Output is correct |
151 |
Correct |
18 ms |
31840 KB |
Output is correct |
152 |
Correct |
17 ms |
31648 KB |
Output is correct |
153 |
Correct |
15 ms |
31728 KB |
Output is correct |
154 |
Correct |
18 ms |
31700 KB |
Output is correct |
155 |
Correct |
166 ms |
50936 KB |
Output is correct |
156 |
Correct |
206 ms |
50764 KB |
Output is correct |
157 |
Correct |
188 ms |
51540 KB |
Output is correct |
158 |
Correct |
179 ms |
51108 KB |
Output is correct |
159 |
Correct |
208 ms |
50016 KB |
Output is correct |
160 |
Correct |
178 ms |
49416 KB |
Output is correct |
161 |
Correct |
176 ms |
49228 KB |
Output is correct |
162 |
Correct |
150 ms |
48700 KB |
Output is correct |
163 |
Correct |
157 ms |
48648 KB |
Output is correct |
164 |
Correct |
149 ms |
48492 KB |
Output is correct |
165 |
Correct |
155 ms |
48352 KB |
Output is correct |
166 |
Correct |
126 ms |
48332 KB |
Output is correct |
167 |
Correct |
138 ms |
48536 KB |
Output is correct |
168 |
Correct |
148 ms |
49728 KB |
Output is correct |
169 |
Correct |
194 ms |
53560 KB |
Output is correct |
170 |
Correct |
206 ms |
53028 KB |
Output is correct |
171 |
Correct |
191 ms |
53088 KB |
Output is correct |
172 |
Correct |
178 ms |
52568 KB |
Output is correct |
173 |
Correct |
189 ms |
51120 KB |
Output is correct |
174 |
Correct |
199 ms |
51068 KB |
Output is correct |
175 |
Correct |
183 ms |
51144 KB |
Output is correct |
176 |
Correct |
148 ms |
49956 KB |
Output is correct |
177 |
Correct |
148 ms |
48816 KB |
Output is correct |
178 |
Correct |
168 ms |
51400 KB |
Output is correct |
179 |
Correct |
161 ms |
51540 KB |
Output is correct |
180 |
Correct |
158 ms |
51168 KB |
Output is correct |
181 |
Correct |
181 ms |
51220 KB |
Output is correct |
182 |
Correct |
16 ms |
31700 KB |
Output is correct |
183 |
Correct |
17 ms |
31700 KB |
Output is correct |
184 |
Correct |
19 ms |
31844 KB |
Output is correct |
185 |
Correct |
18 ms |
31828 KB |
Output is correct |
186 |
Correct |
22 ms |
31948 KB |
Output is correct |
187 |
Correct |
18 ms |
31800 KB |
Output is correct |
188 |
Correct |
22 ms |
31828 KB |
Output is correct |
189 |
Correct |
18 ms |
31840 KB |
Output is correct |
190 |
Correct |
19 ms |
31844 KB |
Output is correct |
191 |
Correct |
17 ms |
31844 KB |
Output is correct |
192 |
Correct |
16 ms |
31700 KB |
Output is correct |
193 |
Correct |
16 ms |
31828 KB |
Output is correct |
194 |
Correct |
17 ms |
31844 KB |
Output is correct |
195 |
Correct |
16 ms |
31804 KB |
Output is correct |
196 |
Correct |
18 ms |
31832 KB |
Output is correct |
197 |
Correct |
17 ms |
31828 KB |
Output is correct |
198 |
Correct |
17 ms |
31828 KB |
Output is correct |
199 |
Correct |
17 ms |
31828 KB |
Output is correct |
200 |
Correct |
17 ms |
31848 KB |
Output is correct |
201 |
Correct |
19 ms |
31848 KB |
Output is correct |
202 |
Correct |
17 ms |
31828 KB |
Output is correct |
203 |
Correct |
17 ms |
31832 KB |
Output is correct |
204 |
Correct |
17 ms |
31828 KB |
Output is correct |
205 |
Correct |
17 ms |
31840 KB |
Output is correct |
206 |
Correct |
16 ms |
31828 KB |
Output is correct |
207 |
Correct |
17 ms |
31828 KB |
Output is correct |
208 |
Correct |
20 ms |
31836 KB |
Output is correct |
209 |
Correct |
18 ms |
33236 KB |
Output is correct |
210 |
Correct |
92 ms |
43592 KB |
Output is correct |
211 |
Correct |
159 ms |
49424 KB |
Output is correct |
212 |
Correct |
206 ms |
56916 KB |
Output is correct |
213 |
Correct |
242 ms |
61856 KB |
Output is correct |
214 |
Correct |
85 ms |
49356 KB |
Output is correct |
215 |
Correct |
94 ms |
49824 KB |
Output is correct |
216 |
Correct |
184 ms |
52172 KB |
Output is correct |
217 |
Correct |
186 ms |
51080 KB |
Output is correct |
218 |
Correct |
152 ms |
49028 KB |
Output is correct |
219 |
Correct |
158 ms |
48560 KB |
Output is correct |
220 |
Correct |
126 ms |
48460 KB |
Output is correct |
221 |
Correct |
119 ms |
48332 KB |
Output is correct |
222 |
Correct |
150 ms |
49048 KB |
Output is correct |
223 |
Correct |
163 ms |
52696 KB |
Output is correct |
224 |
Correct |
175 ms |
52252 KB |
Output is correct |
225 |
Correct |
175 ms |
51044 KB |
Output is correct |
226 |
Correct |
201 ms |
51028 KB |
Output is correct |
227 |
Correct |
170 ms |
51064 KB |
Output is correct |
228 |
Correct |
154 ms |
50084 KB |
Output is correct |
229 |
Correct |
151 ms |
48988 KB |
Output is correct |
230 |
Correct |
158 ms |
51484 KB |
Output is correct |
231 |
Correct |
157 ms |
51620 KB |
Output is correct |