#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
const int MOD = 1000000007;
const ll INF = 1e18;
const int MX = 100001;
vi ADJ[2*MX];
int n,m,totsz[2*MX];
void ad(int a, int b) {
ADJ[a].pb(b), ADJ[b].pb(a);
}
template<int SZ> struct BCC {
int N, ti = 0;
vi adj[SZ];
int disc[SZ], low[SZ], comp[SZ], par[SZ];
vector<vpi> fin;
int compsz[SZ];
vpi st;
void addEdge(int u, int v) {
adj[u].pb(v), adj[v].pb(u);
}
void BCCutil(int u, bool root = 0) {
disc[u] = low[u] = ti++;
int child = 0;
for (int i: adj[u]) if (i != par[u]) {
if (disc[i] == -1) {
child ++; par[i] = u;
st.pb({u,i});
BCCutil(i);
low[u] = min(low[u],low[i]);
if ((root && child > 1) || (!root && disc[u] <= low[i])) { // articulation point!
vpi tmp;
while (st.back() != mp(u,i)) tmp.pb(st.back()), st.pop_back();
tmp.pb(st.back()), st.pop_back();
fin.pb(tmp);
}
} else if (disc[i] < disc[u]) {
low[u] = min(low[u],disc[i]);
st.pb({u,i});
}
}
}
void bcc() {
FOR(i,1,N+1) par[i] = disc[i] = low[i] = -1;
FOR(i,1,N+1) if (disc[i] == -1) {
BCCutil(i,1);
if (sz(st)) fin.pb(st);
st.clear();
}
int co = 0;
for (auto a: fin) {
set<int> s;
for (auto b: a) s.insert(b.f), s.insert(b.s);
co ++;
compsz[co] = sz(s);
for (int i: s) ad(i,n+co);
}
}
};
ll ans = 0;
BCC<MX> B;
bool visited[2*MX];
void dfs1(int x, int y = 0) {
visited[x] = 1; if (x <= n) totsz[x] = 1;
for (int i: ADJ[x]) if (i != y) {
dfs1(i,x);
totsz[x] += totsz[i];
}
}
void dfs2(int x, int p, int y = 0) {
if (x <= n) {
for (int i: ADJ[x]) {
assert(i > n);
if (i != y) {
ans -= (ll)(B.compsz[i-n]-1)*(totsz[p]-totsz[i])*(totsz[p]-totsz[i]-1);
} else {
ans -= (ll)(B.compsz[i-n]-1)*totsz[x]*(totsz[x]-1);
}
}
}
for (int i: ADJ[x]) if (i != y) dfs2(i,p,x);
}
void init() {
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> n >> m;
F0R(i,m) {
int a,b; cin >> a >> b;
B.addEdge(a,b);
}
B.N = n;
B.bcc();
}
void genTree() {
FOR(i,1,n+1) if (!visited[i]) {
dfs1(i);
ans += (ll)totsz[i]*(totsz[i]-1)*(totsz[i]-2);
// cout << i << " " << totsz[i] << "\n";
dfs2(i,i);
}
}
int main() {
init();
genTree();
cout << ans;
}
/* Look for:
* the exact constraints (multiple sets are too slow for n=10^6 :( )
* special cases (n=1?)
* overflow (ll vs int?)
* array bounds
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
7372 KB |
Output is correct |
2 |
Correct |
5 ms |
7380 KB |
Output is correct |
3 |
Correct |
4 ms |
7300 KB |
Output is correct |
4 |
Correct |
5 ms |
7372 KB |
Output is correct |
5 |
Correct |
5 ms |
7324 KB |
Output is correct |
6 |
Correct |
6 ms |
7372 KB |
Output is correct |
7 |
Correct |
4 ms |
7272 KB |
Output is correct |
8 |
Correct |
5 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7372 KB |
Output is correct |
10 |
Correct |
5 ms |
7372 KB |
Output is correct |
11 |
Correct |
5 ms |
7372 KB |
Output is correct |
12 |
Correct |
6 ms |
7380 KB |
Output is correct |
13 |
Correct |
5 ms |
7376 KB |
Output is correct |
14 |
Correct |
5 ms |
7376 KB |
Output is correct |
15 |
Correct |
6 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7380 KB |
Output is correct |
17 |
Correct |
5 ms |
7372 KB |
Output is correct |
18 |
Correct |
4 ms |
7372 KB |
Output is correct |
19 |
Correct |
5 ms |
7336 KB |
Output is correct |
20 |
Correct |
6 ms |
7372 KB |
Output is correct |
21 |
Correct |
5 ms |
7368 KB |
Output is correct |
22 |
Correct |
6 ms |
7376 KB |
Output is correct |
23 |
Correct |
5 ms |
7380 KB |
Output is correct |
24 |
Correct |
5 ms |
7376 KB |
Output is correct |
25 |
Correct |
5 ms |
7356 KB |
Output is correct |
26 |
Correct |
6 ms |
7384 KB |
Output is correct |
27 |
Correct |
6 ms |
7380 KB |
Output is correct |
28 |
Correct |
6 ms |
7372 KB |
Output is correct |
29 |
Correct |
5 ms |
7384 KB |
Output is correct |
30 |
Correct |
4 ms |
7376 KB |
Output is correct |
31 |
Correct |
5 ms |
7380 KB |
Output is correct |
32 |
Correct |
6 ms |
7288 KB |
Output is correct |
33 |
Correct |
4 ms |
7376 KB |
Output is correct |
34 |
Correct |
5 ms |
7372 KB |
Output is correct |
35 |
Correct |
6 ms |
7360 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
7372 KB |
Output is correct |
2 |
Correct |
5 ms |
7380 KB |
Output is correct |
3 |
Correct |
4 ms |
7300 KB |
Output is correct |
4 |
Correct |
5 ms |
7372 KB |
Output is correct |
5 |
Correct |
5 ms |
7324 KB |
Output is correct |
6 |
Correct |
6 ms |
7372 KB |
Output is correct |
7 |
Correct |
4 ms |
7272 KB |
Output is correct |
8 |
Correct |
5 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7372 KB |
Output is correct |
10 |
Correct |
5 ms |
7372 KB |
Output is correct |
11 |
Correct |
5 ms |
7372 KB |
Output is correct |
12 |
Correct |
6 ms |
7380 KB |
Output is correct |
13 |
Correct |
5 ms |
7376 KB |
Output is correct |
14 |
Correct |
5 ms |
7376 KB |
Output is correct |
15 |
Correct |
6 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7380 KB |
Output is correct |
17 |
Correct |
5 ms |
7372 KB |
Output is correct |
18 |
Correct |
4 ms |
7372 KB |
Output is correct |
19 |
Correct |
5 ms |
7336 KB |
Output is correct |
20 |
Correct |
6 ms |
7372 KB |
Output is correct |
21 |
Correct |
5 ms |
7368 KB |
Output is correct |
22 |
Correct |
6 ms |
7376 KB |
Output is correct |
23 |
Correct |
5 ms |
7380 KB |
Output is correct |
24 |
Correct |
5 ms |
7376 KB |
Output is correct |
25 |
Correct |
5 ms |
7356 KB |
Output is correct |
26 |
Correct |
6 ms |
7384 KB |
Output is correct |
27 |
Correct |
6 ms |
7380 KB |
Output is correct |
28 |
Correct |
6 ms |
7372 KB |
Output is correct |
29 |
Correct |
5 ms |
7384 KB |
Output is correct |
30 |
Correct |
4 ms |
7376 KB |
Output is correct |
31 |
Correct |
5 ms |
7380 KB |
Output is correct |
32 |
Correct |
6 ms |
7288 KB |
Output is correct |
33 |
Correct |
4 ms |
7376 KB |
Output is correct |
34 |
Correct |
5 ms |
7372 KB |
Output is correct |
35 |
Correct |
6 ms |
7360 KB |
Output is correct |
36 |
Correct |
5 ms |
7380 KB |
Output is correct |
37 |
Correct |
5 ms |
7368 KB |
Output is correct |
38 |
Correct |
5 ms |
7372 KB |
Output is correct |
39 |
Correct |
5 ms |
7360 KB |
Output is correct |
40 |
Correct |
4 ms |
7372 KB |
Output is correct |
41 |
Correct |
5 ms |
7380 KB |
Output is correct |
42 |
Correct |
5 ms |
7376 KB |
Output is correct |
43 |
Correct |
6 ms |
7380 KB |
Output is correct |
44 |
Correct |
4 ms |
7376 KB |
Output is correct |
45 |
Correct |
5 ms |
7384 KB |
Output is correct |
46 |
Correct |
4 ms |
7316 KB |
Output is correct |
47 |
Correct |
5 ms |
7372 KB |
Output is correct |
48 |
Correct |
5 ms |
7372 KB |
Output is correct |
49 |
Correct |
5 ms |
7372 KB |
Output is correct |
50 |
Correct |
6 ms |
7328 KB |
Output is correct |
51 |
Correct |
5 ms |
7372 KB |
Output is correct |
52 |
Correct |
5 ms |
7380 KB |
Output is correct |
53 |
Correct |
6 ms |
7376 KB |
Output is correct |
54 |
Correct |
6 ms |
7384 KB |
Output is correct |
55 |
Correct |
5 ms |
7388 KB |
Output is correct |
56 |
Correct |
7 ms |
7372 KB |
Output is correct |
57 |
Correct |
7 ms |
7284 KB |
Output is correct |
58 |
Correct |
5 ms |
7380 KB |
Output is correct |
59 |
Correct |
7 ms |
7372 KB |
Output is correct |
60 |
Correct |
5 ms |
7380 KB |
Output is correct |
61 |
Correct |
5 ms |
7376 KB |
Output is correct |
62 |
Correct |
5 ms |
7384 KB |
Output is correct |
63 |
Correct |
5 ms |
7372 KB |
Output is correct |
64 |
Correct |
5 ms |
7372 KB |
Output is correct |
65 |
Correct |
6 ms |
7372 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
145 ms |
34728 KB |
Output is correct |
2 |
Correct |
139 ms |
35984 KB |
Output is correct |
3 |
Correct |
167 ms |
28672 KB |
Output is correct |
4 |
Correct |
151 ms |
33244 KB |
Output is correct |
5 |
Correct |
126 ms |
24892 KB |
Output is correct |
6 |
Correct |
146 ms |
28300 KB |
Output is correct |
7 |
Correct |
139 ms |
26984 KB |
Output is correct |
8 |
Correct |
166 ms |
27944 KB |
Output is correct |
9 |
Correct |
131 ms |
24344 KB |
Output is correct |
10 |
Correct |
137 ms |
24432 KB |
Output is correct |
11 |
Correct |
85 ms |
21128 KB |
Output is correct |
12 |
Correct |
89 ms |
20876 KB |
Output is correct |
13 |
Correct |
77 ms |
20572 KB |
Output is correct |
14 |
Correct |
78 ms |
20168 KB |
Output is correct |
15 |
Correct |
59 ms |
18724 KB |
Output is correct |
16 |
Correct |
62 ms |
18396 KB |
Output is correct |
17 |
Correct |
7 ms |
8984 KB |
Output is correct |
18 |
Correct |
11 ms |
9028 KB |
Output is correct |
19 |
Correct |
7 ms |
9040 KB |
Output is correct |
20 |
Correct |
8 ms |
9064 KB |
Output is correct |
21 |
Correct |
8 ms |
9044 KB |
Output is correct |
22 |
Correct |
8 ms |
9036 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
7500 KB |
Output is correct |
2 |
Correct |
6 ms |
7500 KB |
Output is correct |
3 |
Correct |
5 ms |
7500 KB |
Output is correct |
4 |
Correct |
7 ms |
7628 KB |
Output is correct |
5 |
Correct |
5 ms |
7628 KB |
Output is correct |
6 |
Correct |
7 ms |
7628 KB |
Output is correct |
7 |
Correct |
5 ms |
7628 KB |
Output is correct |
8 |
Correct |
5 ms |
7500 KB |
Output is correct |
9 |
Correct |
5 ms |
7500 KB |
Output is correct |
10 |
Correct |
6 ms |
7500 KB |
Output is correct |
11 |
Correct |
5 ms |
7508 KB |
Output is correct |
12 |
Correct |
5 ms |
7492 KB |
Output is correct |
13 |
Correct |
5 ms |
7500 KB |
Output is correct |
14 |
Correct |
6 ms |
7500 KB |
Output is correct |
15 |
Correct |
5 ms |
7500 KB |
Output is correct |
16 |
Correct |
5 ms |
7388 KB |
Output is correct |
17 |
Correct |
5 ms |
7500 KB |
Output is correct |
18 |
Correct |
5 ms |
7500 KB |
Output is correct |
19 |
Correct |
5 ms |
7516 KB |
Output is correct |
20 |
Correct |
6 ms |
7516 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
124 ms |
24880 KB |
Output is correct |
2 |
Correct |
134 ms |
24976 KB |
Output is correct |
3 |
Correct |
117 ms |
24868 KB |
Output is correct |
4 |
Correct |
129 ms |
25048 KB |
Output is correct |
5 |
Correct |
119 ms |
24960 KB |
Output is correct |
6 |
Correct |
150 ms |
33732 KB |
Output is correct |
7 |
Correct |
154 ms |
30656 KB |
Output is correct |
8 |
Correct |
137 ms |
29180 KB |
Output is correct |
9 |
Correct |
152 ms |
27648 KB |
Output is correct |
10 |
Correct |
157 ms |
24980 KB |
Output is correct |
11 |
Correct |
128 ms |
26136 KB |
Output is correct |
12 |
Correct |
128 ms |
26240 KB |
Output is correct |
13 |
Correct |
138 ms |
26132 KB |
Output is correct |
14 |
Correct |
130 ms |
24904 KB |
Output is correct |
15 |
Correct |
103 ms |
23644 KB |
Output is correct |
16 |
Correct |
52 ms |
19064 KB |
Output is correct |
17 |
Correct |
92 ms |
26800 KB |
Output is correct |
18 |
Correct |
96 ms |
26792 KB |
Output is correct |
19 |
Correct |
91 ms |
26856 KB |
Output is correct |
20 |
Correct |
88 ms |
26732 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
7500 KB |
Output is correct |
2 |
Correct |
5 ms |
7500 KB |
Output is correct |
3 |
Correct |
4 ms |
7500 KB |
Output is correct |
4 |
Correct |
5 ms |
7496 KB |
Output is correct |
5 |
Correct |
4 ms |
7500 KB |
Output is correct |
6 |
Correct |
5 ms |
7500 KB |
Output is correct |
7 |
Correct |
4 ms |
7520 KB |
Output is correct |
8 |
Correct |
4 ms |
7500 KB |
Output is correct |
9 |
Correct |
4 ms |
7516 KB |
Output is correct |
10 |
Correct |
4 ms |
7500 KB |
Output is correct |
11 |
Correct |
4 ms |
7512 KB |
Output is correct |
12 |
Correct |
4 ms |
7516 KB |
Output is correct |
13 |
Correct |
4 ms |
7500 KB |
Output is correct |
14 |
Correct |
9 ms |
7516 KB |
Output is correct |
15 |
Correct |
4 ms |
7500 KB |
Output is correct |
16 |
Correct |
5 ms |
7512 KB |
Output is correct |
17 |
Correct |
4 ms |
7500 KB |
Output is correct |
18 |
Correct |
7 ms |
7500 KB |
Output is correct |
19 |
Correct |
4 ms |
7500 KB |
Output is correct |
20 |
Correct |
5 ms |
7516 KB |
Output is correct |
21 |
Correct |
4 ms |
7500 KB |
Output is correct |
22 |
Correct |
5 ms |
7500 KB |
Output is correct |
23 |
Correct |
4 ms |
7512 KB |
Output is correct |
24 |
Correct |
5 ms |
7472 KB |
Output is correct |
25 |
Correct |
5 ms |
7384 KB |
Output is correct |
26 |
Correct |
5 ms |
7384 KB |
Output is correct |
27 |
Correct |
8 ms |
7384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
100 ms |
24992 KB |
Output is correct |
2 |
Correct |
104 ms |
24852 KB |
Output is correct |
3 |
Correct |
115 ms |
23248 KB |
Output is correct |
4 |
Correct |
99 ms |
22776 KB |
Output is correct |
5 |
Correct |
91 ms |
20744 KB |
Output is correct |
6 |
Correct |
89 ms |
19856 KB |
Output is correct |
7 |
Correct |
87 ms |
19364 KB |
Output is correct |
8 |
Correct |
77 ms |
18836 KB |
Output is correct |
9 |
Correct |
77 ms |
18700 KB |
Output is correct |
10 |
Correct |
84 ms |
18536 KB |
Output is correct |
11 |
Correct |
74 ms |
18272 KB |
Output is correct |
12 |
Correct |
79 ms |
18392 KB |
Output is correct |
13 |
Correct |
74 ms |
18420 KB |
Output is correct |
14 |
Correct |
90 ms |
21968 KB |
Output is correct |
15 |
Correct |
124 ms |
30952 KB |
Output is correct |
16 |
Correct |
111 ms |
28788 KB |
Output is correct |
17 |
Correct |
115 ms |
29008 KB |
Output is correct |
18 |
Correct |
107 ms |
27112 KB |
Output is correct |
19 |
Correct |
108 ms |
22752 KB |
Output is correct |
20 |
Correct |
103 ms |
22836 KB |
Output is correct |
21 |
Correct |
99 ms |
22736 KB |
Output is correct |
22 |
Correct |
90 ms |
21624 KB |
Output is correct |
23 |
Correct |
89 ms |
20456 KB |
Output is correct |
24 |
Correct |
97 ms |
25080 KB |
Output is correct |
25 |
Correct |
123 ms |
25168 KB |
Output is correct |
26 |
Correct |
111 ms |
23888 KB |
Output is correct |
27 |
Correct |
104 ms |
23940 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
7372 KB |
Output is correct |
2 |
Correct |
5 ms |
7380 KB |
Output is correct |
3 |
Correct |
4 ms |
7300 KB |
Output is correct |
4 |
Correct |
5 ms |
7372 KB |
Output is correct |
5 |
Correct |
5 ms |
7324 KB |
Output is correct |
6 |
Correct |
6 ms |
7372 KB |
Output is correct |
7 |
Correct |
4 ms |
7272 KB |
Output is correct |
8 |
Correct |
5 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7372 KB |
Output is correct |
10 |
Correct |
5 ms |
7372 KB |
Output is correct |
11 |
Correct |
5 ms |
7372 KB |
Output is correct |
12 |
Correct |
6 ms |
7380 KB |
Output is correct |
13 |
Correct |
5 ms |
7376 KB |
Output is correct |
14 |
Correct |
5 ms |
7376 KB |
Output is correct |
15 |
Correct |
6 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7380 KB |
Output is correct |
17 |
Correct |
5 ms |
7372 KB |
Output is correct |
18 |
Correct |
4 ms |
7372 KB |
Output is correct |
19 |
Correct |
5 ms |
7336 KB |
Output is correct |
20 |
Correct |
6 ms |
7372 KB |
Output is correct |
21 |
Correct |
5 ms |
7368 KB |
Output is correct |
22 |
Correct |
6 ms |
7376 KB |
Output is correct |
23 |
Correct |
5 ms |
7380 KB |
Output is correct |
24 |
Correct |
5 ms |
7376 KB |
Output is correct |
25 |
Correct |
5 ms |
7356 KB |
Output is correct |
26 |
Correct |
6 ms |
7384 KB |
Output is correct |
27 |
Correct |
6 ms |
7380 KB |
Output is correct |
28 |
Correct |
6 ms |
7372 KB |
Output is correct |
29 |
Correct |
5 ms |
7384 KB |
Output is correct |
30 |
Correct |
4 ms |
7376 KB |
Output is correct |
31 |
Correct |
5 ms |
7380 KB |
Output is correct |
32 |
Correct |
6 ms |
7288 KB |
Output is correct |
33 |
Correct |
4 ms |
7376 KB |
Output is correct |
34 |
Correct |
5 ms |
7372 KB |
Output is correct |
35 |
Correct |
6 ms |
7360 KB |
Output is correct |
36 |
Correct |
5 ms |
7380 KB |
Output is correct |
37 |
Correct |
5 ms |
7368 KB |
Output is correct |
38 |
Correct |
5 ms |
7372 KB |
Output is correct |
39 |
Correct |
5 ms |
7360 KB |
Output is correct |
40 |
Correct |
4 ms |
7372 KB |
Output is correct |
41 |
Correct |
5 ms |
7380 KB |
Output is correct |
42 |
Correct |
5 ms |
7376 KB |
Output is correct |
43 |
Correct |
6 ms |
7380 KB |
Output is correct |
44 |
Correct |
4 ms |
7376 KB |
Output is correct |
45 |
Correct |
5 ms |
7384 KB |
Output is correct |
46 |
Correct |
4 ms |
7316 KB |
Output is correct |
47 |
Correct |
5 ms |
7372 KB |
Output is correct |
48 |
Correct |
5 ms |
7372 KB |
Output is correct |
49 |
Correct |
5 ms |
7372 KB |
Output is correct |
50 |
Correct |
6 ms |
7328 KB |
Output is correct |
51 |
Correct |
5 ms |
7372 KB |
Output is correct |
52 |
Correct |
5 ms |
7380 KB |
Output is correct |
53 |
Correct |
6 ms |
7376 KB |
Output is correct |
54 |
Correct |
6 ms |
7384 KB |
Output is correct |
55 |
Correct |
5 ms |
7388 KB |
Output is correct |
56 |
Correct |
7 ms |
7372 KB |
Output is correct |
57 |
Correct |
7 ms |
7284 KB |
Output is correct |
58 |
Correct |
5 ms |
7380 KB |
Output is correct |
59 |
Correct |
7 ms |
7372 KB |
Output is correct |
60 |
Correct |
5 ms |
7380 KB |
Output is correct |
61 |
Correct |
5 ms |
7376 KB |
Output is correct |
62 |
Correct |
5 ms |
7384 KB |
Output is correct |
63 |
Correct |
5 ms |
7372 KB |
Output is correct |
64 |
Correct |
5 ms |
7372 KB |
Output is correct |
65 |
Correct |
6 ms |
7372 KB |
Output is correct |
66 |
Correct |
4 ms |
7372 KB |
Output is correct |
67 |
Correct |
5 ms |
7500 KB |
Output is correct |
68 |
Correct |
5 ms |
7500 KB |
Output is correct |
69 |
Correct |
5 ms |
7520 KB |
Output is correct |
70 |
Correct |
5 ms |
7648 KB |
Output is correct |
71 |
Correct |
4 ms |
7500 KB |
Output is correct |
72 |
Correct |
4 ms |
7504 KB |
Output is correct |
73 |
Correct |
5 ms |
7524 KB |
Output is correct |
74 |
Correct |
7 ms |
7520 KB |
Output is correct |
75 |
Correct |
5 ms |
7520 KB |
Output is correct |
76 |
Correct |
4 ms |
7372 KB |
Output is correct |
77 |
Correct |
5 ms |
7628 KB |
Output is correct |
78 |
Correct |
9 ms |
7500 KB |
Output is correct |
79 |
Correct |
5 ms |
7388 KB |
Output is correct |
80 |
Correct |
5 ms |
7384 KB |
Output is correct |
81 |
Correct |
4 ms |
7520 KB |
Output is correct |
82 |
Correct |
4 ms |
7500 KB |
Output is correct |
83 |
Correct |
4 ms |
7520 KB |
Output is correct |
84 |
Correct |
6 ms |
7500 KB |
Output is correct |
85 |
Correct |
5 ms |
7500 KB |
Output is correct |
86 |
Correct |
5 ms |
7500 KB |
Output is correct |
87 |
Correct |
5 ms |
7492 KB |
Output is correct |
88 |
Correct |
10 ms |
7500 KB |
Output is correct |
89 |
Correct |
6 ms |
7524 KB |
Output is correct |
90 |
Correct |
5 ms |
7520 KB |
Output is correct |
91 |
Correct |
5 ms |
7520 KB |
Output is correct |
92 |
Correct |
5 ms |
7628 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
7372 KB |
Output is correct |
2 |
Correct |
5 ms |
7380 KB |
Output is correct |
3 |
Correct |
4 ms |
7300 KB |
Output is correct |
4 |
Correct |
5 ms |
7372 KB |
Output is correct |
5 |
Correct |
5 ms |
7324 KB |
Output is correct |
6 |
Correct |
6 ms |
7372 KB |
Output is correct |
7 |
Correct |
4 ms |
7272 KB |
Output is correct |
8 |
Correct |
5 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7372 KB |
Output is correct |
10 |
Correct |
5 ms |
7372 KB |
Output is correct |
11 |
Correct |
5 ms |
7372 KB |
Output is correct |
12 |
Correct |
6 ms |
7380 KB |
Output is correct |
13 |
Correct |
5 ms |
7376 KB |
Output is correct |
14 |
Correct |
5 ms |
7376 KB |
Output is correct |
15 |
Correct |
6 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7380 KB |
Output is correct |
17 |
Correct |
5 ms |
7372 KB |
Output is correct |
18 |
Correct |
4 ms |
7372 KB |
Output is correct |
19 |
Correct |
5 ms |
7336 KB |
Output is correct |
20 |
Correct |
6 ms |
7372 KB |
Output is correct |
21 |
Correct |
5 ms |
7368 KB |
Output is correct |
22 |
Correct |
6 ms |
7376 KB |
Output is correct |
23 |
Correct |
5 ms |
7380 KB |
Output is correct |
24 |
Correct |
5 ms |
7376 KB |
Output is correct |
25 |
Correct |
5 ms |
7356 KB |
Output is correct |
26 |
Correct |
6 ms |
7384 KB |
Output is correct |
27 |
Correct |
6 ms |
7380 KB |
Output is correct |
28 |
Correct |
6 ms |
7372 KB |
Output is correct |
29 |
Correct |
5 ms |
7384 KB |
Output is correct |
30 |
Correct |
4 ms |
7376 KB |
Output is correct |
31 |
Correct |
5 ms |
7380 KB |
Output is correct |
32 |
Correct |
6 ms |
7288 KB |
Output is correct |
33 |
Correct |
4 ms |
7376 KB |
Output is correct |
34 |
Correct |
5 ms |
7372 KB |
Output is correct |
35 |
Correct |
6 ms |
7360 KB |
Output is correct |
36 |
Correct |
5 ms |
7380 KB |
Output is correct |
37 |
Correct |
5 ms |
7368 KB |
Output is correct |
38 |
Correct |
5 ms |
7372 KB |
Output is correct |
39 |
Correct |
5 ms |
7360 KB |
Output is correct |
40 |
Correct |
4 ms |
7372 KB |
Output is correct |
41 |
Correct |
5 ms |
7380 KB |
Output is correct |
42 |
Correct |
5 ms |
7376 KB |
Output is correct |
43 |
Correct |
6 ms |
7380 KB |
Output is correct |
44 |
Correct |
4 ms |
7376 KB |
Output is correct |
45 |
Correct |
5 ms |
7384 KB |
Output is correct |
46 |
Correct |
4 ms |
7316 KB |
Output is correct |
47 |
Correct |
5 ms |
7372 KB |
Output is correct |
48 |
Correct |
5 ms |
7372 KB |
Output is correct |
49 |
Correct |
5 ms |
7372 KB |
Output is correct |
50 |
Correct |
6 ms |
7328 KB |
Output is correct |
51 |
Correct |
5 ms |
7372 KB |
Output is correct |
52 |
Correct |
5 ms |
7380 KB |
Output is correct |
53 |
Correct |
6 ms |
7376 KB |
Output is correct |
54 |
Correct |
6 ms |
7384 KB |
Output is correct |
55 |
Correct |
5 ms |
7388 KB |
Output is correct |
56 |
Correct |
7 ms |
7372 KB |
Output is correct |
57 |
Correct |
7 ms |
7284 KB |
Output is correct |
58 |
Correct |
5 ms |
7380 KB |
Output is correct |
59 |
Correct |
7 ms |
7372 KB |
Output is correct |
60 |
Correct |
5 ms |
7380 KB |
Output is correct |
61 |
Correct |
5 ms |
7376 KB |
Output is correct |
62 |
Correct |
5 ms |
7384 KB |
Output is correct |
63 |
Correct |
5 ms |
7372 KB |
Output is correct |
64 |
Correct |
5 ms |
7372 KB |
Output is correct |
65 |
Correct |
6 ms |
7372 KB |
Output is correct |
66 |
Correct |
145 ms |
34728 KB |
Output is correct |
67 |
Correct |
139 ms |
35984 KB |
Output is correct |
68 |
Correct |
167 ms |
28672 KB |
Output is correct |
69 |
Correct |
151 ms |
33244 KB |
Output is correct |
70 |
Correct |
126 ms |
24892 KB |
Output is correct |
71 |
Correct |
146 ms |
28300 KB |
Output is correct |
72 |
Correct |
139 ms |
26984 KB |
Output is correct |
73 |
Correct |
166 ms |
27944 KB |
Output is correct |
74 |
Correct |
131 ms |
24344 KB |
Output is correct |
75 |
Correct |
137 ms |
24432 KB |
Output is correct |
76 |
Correct |
85 ms |
21128 KB |
Output is correct |
77 |
Correct |
89 ms |
20876 KB |
Output is correct |
78 |
Correct |
77 ms |
20572 KB |
Output is correct |
79 |
Correct |
78 ms |
20168 KB |
Output is correct |
80 |
Correct |
59 ms |
18724 KB |
Output is correct |
81 |
Correct |
62 ms |
18396 KB |
Output is correct |
82 |
Correct |
7 ms |
8984 KB |
Output is correct |
83 |
Correct |
11 ms |
9028 KB |
Output is correct |
84 |
Correct |
7 ms |
9040 KB |
Output is correct |
85 |
Correct |
8 ms |
9064 KB |
Output is correct |
86 |
Correct |
8 ms |
9044 KB |
Output is correct |
87 |
Correct |
8 ms |
9036 KB |
Output is correct |
88 |
Correct |
5 ms |
7500 KB |
Output is correct |
89 |
Correct |
6 ms |
7500 KB |
Output is correct |
90 |
Correct |
5 ms |
7500 KB |
Output is correct |
91 |
Correct |
7 ms |
7628 KB |
Output is correct |
92 |
Correct |
5 ms |
7628 KB |
Output is correct |
93 |
Correct |
7 ms |
7628 KB |
Output is correct |
94 |
Correct |
5 ms |
7628 KB |
Output is correct |
95 |
Correct |
5 ms |
7500 KB |
Output is correct |
96 |
Correct |
5 ms |
7500 KB |
Output is correct |
97 |
Correct |
6 ms |
7500 KB |
Output is correct |
98 |
Correct |
5 ms |
7508 KB |
Output is correct |
99 |
Correct |
5 ms |
7492 KB |
Output is correct |
100 |
Correct |
5 ms |
7500 KB |
Output is correct |
101 |
Correct |
6 ms |
7500 KB |
Output is correct |
102 |
Correct |
5 ms |
7500 KB |
Output is correct |
103 |
Correct |
5 ms |
7388 KB |
Output is correct |
104 |
Correct |
5 ms |
7500 KB |
Output is correct |
105 |
Correct |
5 ms |
7500 KB |
Output is correct |
106 |
Correct |
5 ms |
7516 KB |
Output is correct |
107 |
Correct |
6 ms |
7516 KB |
Output is correct |
108 |
Correct |
124 ms |
24880 KB |
Output is correct |
109 |
Correct |
134 ms |
24976 KB |
Output is correct |
110 |
Correct |
117 ms |
24868 KB |
Output is correct |
111 |
Correct |
129 ms |
25048 KB |
Output is correct |
112 |
Correct |
119 ms |
24960 KB |
Output is correct |
113 |
Correct |
150 ms |
33732 KB |
Output is correct |
114 |
Correct |
154 ms |
30656 KB |
Output is correct |
115 |
Correct |
137 ms |
29180 KB |
Output is correct |
116 |
Correct |
152 ms |
27648 KB |
Output is correct |
117 |
Correct |
157 ms |
24980 KB |
Output is correct |
118 |
Correct |
128 ms |
26136 KB |
Output is correct |
119 |
Correct |
128 ms |
26240 KB |
Output is correct |
120 |
Correct |
138 ms |
26132 KB |
Output is correct |
121 |
Correct |
130 ms |
24904 KB |
Output is correct |
122 |
Correct |
103 ms |
23644 KB |
Output is correct |
123 |
Correct |
52 ms |
19064 KB |
Output is correct |
124 |
Correct |
92 ms |
26800 KB |
Output is correct |
125 |
Correct |
96 ms |
26792 KB |
Output is correct |
126 |
Correct |
91 ms |
26856 KB |
Output is correct |
127 |
Correct |
88 ms |
26732 KB |
Output is correct |
128 |
Correct |
5 ms |
7500 KB |
Output is correct |
129 |
Correct |
5 ms |
7500 KB |
Output is correct |
130 |
Correct |
4 ms |
7500 KB |
Output is correct |
131 |
Correct |
5 ms |
7496 KB |
Output is correct |
132 |
Correct |
4 ms |
7500 KB |
Output is correct |
133 |
Correct |
5 ms |
7500 KB |
Output is correct |
134 |
Correct |
4 ms |
7520 KB |
Output is correct |
135 |
Correct |
4 ms |
7500 KB |
Output is correct |
136 |
Correct |
4 ms |
7516 KB |
Output is correct |
137 |
Correct |
4 ms |
7500 KB |
Output is correct |
138 |
Correct |
4 ms |
7512 KB |
Output is correct |
139 |
Correct |
4 ms |
7516 KB |
Output is correct |
140 |
Correct |
4 ms |
7500 KB |
Output is correct |
141 |
Correct |
9 ms |
7516 KB |
Output is correct |
142 |
Correct |
4 ms |
7500 KB |
Output is correct |
143 |
Correct |
5 ms |
7512 KB |
Output is correct |
144 |
Correct |
4 ms |
7500 KB |
Output is correct |
145 |
Correct |
7 ms |
7500 KB |
Output is correct |
146 |
Correct |
4 ms |
7500 KB |
Output is correct |
147 |
Correct |
5 ms |
7516 KB |
Output is correct |
148 |
Correct |
4 ms |
7500 KB |
Output is correct |
149 |
Correct |
5 ms |
7500 KB |
Output is correct |
150 |
Correct |
4 ms |
7512 KB |
Output is correct |
151 |
Correct |
5 ms |
7472 KB |
Output is correct |
152 |
Correct |
5 ms |
7384 KB |
Output is correct |
153 |
Correct |
5 ms |
7384 KB |
Output is correct |
154 |
Correct |
8 ms |
7384 KB |
Output is correct |
155 |
Correct |
100 ms |
24992 KB |
Output is correct |
156 |
Correct |
104 ms |
24852 KB |
Output is correct |
157 |
Correct |
115 ms |
23248 KB |
Output is correct |
158 |
Correct |
99 ms |
22776 KB |
Output is correct |
159 |
Correct |
91 ms |
20744 KB |
Output is correct |
160 |
Correct |
89 ms |
19856 KB |
Output is correct |
161 |
Correct |
87 ms |
19364 KB |
Output is correct |
162 |
Correct |
77 ms |
18836 KB |
Output is correct |
163 |
Correct |
77 ms |
18700 KB |
Output is correct |
164 |
Correct |
84 ms |
18536 KB |
Output is correct |
165 |
Correct |
74 ms |
18272 KB |
Output is correct |
166 |
Correct |
79 ms |
18392 KB |
Output is correct |
167 |
Correct |
74 ms |
18420 KB |
Output is correct |
168 |
Correct |
90 ms |
21968 KB |
Output is correct |
169 |
Correct |
124 ms |
30952 KB |
Output is correct |
170 |
Correct |
111 ms |
28788 KB |
Output is correct |
171 |
Correct |
115 ms |
29008 KB |
Output is correct |
172 |
Correct |
107 ms |
27112 KB |
Output is correct |
173 |
Correct |
108 ms |
22752 KB |
Output is correct |
174 |
Correct |
103 ms |
22836 KB |
Output is correct |
175 |
Correct |
99 ms |
22736 KB |
Output is correct |
176 |
Correct |
90 ms |
21624 KB |
Output is correct |
177 |
Correct |
89 ms |
20456 KB |
Output is correct |
178 |
Correct |
97 ms |
25080 KB |
Output is correct |
179 |
Correct |
123 ms |
25168 KB |
Output is correct |
180 |
Correct |
111 ms |
23888 KB |
Output is correct |
181 |
Correct |
104 ms |
23940 KB |
Output is correct |
182 |
Correct |
4 ms |
7372 KB |
Output is correct |
183 |
Correct |
5 ms |
7500 KB |
Output is correct |
184 |
Correct |
5 ms |
7500 KB |
Output is correct |
185 |
Correct |
5 ms |
7520 KB |
Output is correct |
186 |
Correct |
5 ms |
7648 KB |
Output is correct |
187 |
Correct |
4 ms |
7500 KB |
Output is correct |
188 |
Correct |
4 ms |
7504 KB |
Output is correct |
189 |
Correct |
5 ms |
7524 KB |
Output is correct |
190 |
Correct |
7 ms |
7520 KB |
Output is correct |
191 |
Correct |
5 ms |
7520 KB |
Output is correct |
192 |
Correct |
4 ms |
7372 KB |
Output is correct |
193 |
Correct |
5 ms |
7628 KB |
Output is correct |
194 |
Correct |
9 ms |
7500 KB |
Output is correct |
195 |
Correct |
5 ms |
7388 KB |
Output is correct |
196 |
Correct |
5 ms |
7384 KB |
Output is correct |
197 |
Correct |
4 ms |
7520 KB |
Output is correct |
198 |
Correct |
4 ms |
7500 KB |
Output is correct |
199 |
Correct |
4 ms |
7520 KB |
Output is correct |
200 |
Correct |
6 ms |
7500 KB |
Output is correct |
201 |
Correct |
5 ms |
7500 KB |
Output is correct |
202 |
Correct |
5 ms |
7500 KB |
Output is correct |
203 |
Correct |
5 ms |
7492 KB |
Output is correct |
204 |
Correct |
10 ms |
7500 KB |
Output is correct |
205 |
Correct |
6 ms |
7524 KB |
Output is correct |
206 |
Correct |
5 ms |
7520 KB |
Output is correct |
207 |
Correct |
5 ms |
7520 KB |
Output is correct |
208 |
Correct |
5 ms |
7628 KB |
Output is correct |
209 |
Correct |
6 ms |
8908 KB |
Output is correct |
210 |
Correct |
55 ms |
18444 KB |
Output is correct |
211 |
Correct |
95 ms |
26096 KB |
Output is correct |
212 |
Correct |
143 ms |
31212 KB |
Output is correct |
213 |
Correct |
163 ms |
35044 KB |
Output is correct |
214 |
Correct |
57 ms |
20672 KB |
Output is correct |
215 |
Correct |
57 ms |
20192 KB |
Output is correct |
216 |
Correct |
122 ms |
23688 KB |
Output is correct |
217 |
Correct |
92 ms |
21416 KB |
Output is correct |
218 |
Correct |
88 ms |
18944 KB |
Output is correct |
219 |
Correct |
76 ms |
18444 KB |
Output is correct |
220 |
Correct |
70 ms |
18268 KB |
Output is correct |
221 |
Correct |
72 ms |
18168 KB |
Output is correct |
222 |
Correct |
80 ms |
20152 KB |
Output is correct |
223 |
Correct |
108 ms |
24952 KB |
Output is correct |
224 |
Correct |
105 ms |
23768 KB |
Output is correct |
225 |
Correct |
94 ms |
20816 KB |
Output is correct |
226 |
Correct |
95 ms |
20728 KB |
Output is correct |
227 |
Correct |
97 ms |
20732 KB |
Output is correct |
228 |
Correct |
111 ms |
20092 KB |
Output is correct |
229 |
Correct |
76 ms |
19540 KB |
Output is correct |
230 |
Correct |
94 ms |
21612 KB |
Output is correct |
231 |
Correct |
94 ms |
21656 KB |
Output is correct |