#define wiwihorz
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma loop-opt(on)
#define rep(i, a, b) for(int i = a; i <= b; i++)
#define rrep(i, a, b) for(int i = b; i >= a; i--)
#define ceil(a, b) ((a + b - 1) / (b))
#define all(x) x.begin(), x.end()
#define INF 1000000000000000000
#define MOD 1000000007
#define eps (1e-9)
using namespace std;
#define int long long int
#define lld long double
#define pii pair<int, int>
#define random mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count())
#ifdef wiwihorz
#define print(a...) kout("[" + string(#a) + "] = ", a)
void vprint(auto L, auto R) { while(L < R) cerr << *L << " \n"[next(L) == R], ++L;}
void kout() { cerr << endl; }
template<class T1, class ... T2> void kout(T1 a, T2 ... e) { cerr << a << " ", kout(e...);}
#else
#define print(...) 0
#define vprint(...) 0
#endif
namespace solver {
int n, timestamp, ii, bccid, ans, cnt;
vector<int> L, D, pre, es, sz;
vector<vector<int>> mp1, mp2;
void init_(int _n) {
n = _n, timestamp = 0;
ii = 0, bccid = 0, ans = 0;
L.assign(n + 1, 0);
D.assign(n + 1, 0);
pre.assign(n + 1, 0);
mp1.assign(n + 1, vector<int>());
mp2.assign(2 * n + 1, vector<int>());
sz.assign(2 * n + 1, 0);
}
void add_edge(int a, int b) {
mp1[a].push_back(es.size());
mp1[b].push_back(es.size());
es.push_back(a ^ b);
}
void dfs1(int x, int par) {
cnt ++, pre[ii++] = x;
L[x] = D[x] = ++timestamp;
for(auto i : mp1[x]) if(i != par) {
int to = es[i] ^ x;
if(D[to]) L[x] = min(D[to], L[x]);
else {
dfs1(to, i);
L[x] = min(L[x], L[to]);
if(L[to] >= D[x]) {
bccid ++;
mp2[n + bccid].push_back(x);
mp2[x].push_back(n + bccid);
while(pre[ii] != to) {
ii --;
mp2[n + bccid].push_back(pre[ii]);
mp2[pre[ii]].push_back(n + bccid);
}
}
}
}
return;
}
void dfs2(int x, int par) {
if(x <= n) sz[x] = 1;
for(auto i : mp2[x]) if(i != par) {
dfs2(i, x), sz[x] += sz[i];
if(x > n) ans -= (mp2[x].size() - 1) * sz[i] * (sz[i] - 1);
}
if(x > n) ans -= (mp2[x].size() - 1) * (cnt - sz[x]) * (cnt - sz[x] - 1);
}
int solve() {
rep(i, 1, n) if(!D[i]) {
cnt = 0, dfs1(i, -1);
ans += cnt * (cnt - 1) * (cnt - 2);
dfs2(i, i);
}
return ans;
}
};
using namespace solver;
signed main() {
ios::sync_with_stdio(false), cin.tie(0);
int n, m; cin >> n >> m;
init_(n);
rep(i, 1, m) {
int a, b; cin >> a >> b;
add_edge(a, b);
}
cout << solve() << "\n";
return 0;
}
Compilation message
count_triplets.cpp:4: warning: ignoring '#pragma loop ' [-Wunknown-pragmas]
4 | #pragma loop-opt(on)
|
count_triplets.cpp:24:13: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
24 | void vprint(auto L, auto R) { while(L < R) cerr << *L << " \n"[next(L) == R], ++L;}
| ^~~~
count_triplets.cpp:24:21: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
24 | void vprint(auto L, auto R) { while(L < R) cerr << *L << " \n"[next(L) == R], ++L;}
| ^~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
308 KB |
Output is correct |
9 |
Correct |
1 ms |
204 KB |
Output is correct |
10 |
Correct |
1 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
204 KB |
Output is correct |
13 |
Correct |
1 ms |
204 KB |
Output is correct |
14 |
Correct |
1 ms |
204 KB |
Output is correct |
15 |
Correct |
1 ms |
204 KB |
Output is correct |
16 |
Correct |
1 ms |
204 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
312 KB |
Output is correct |
22 |
Correct |
2 ms |
332 KB |
Output is correct |
23 |
Correct |
2 ms |
204 KB |
Output is correct |
24 |
Correct |
1 ms |
204 KB |
Output is correct |
25 |
Correct |
1 ms |
204 KB |
Output is correct |
26 |
Correct |
1 ms |
204 KB |
Output is correct |
27 |
Correct |
1 ms |
256 KB |
Output is correct |
28 |
Correct |
1 ms |
304 KB |
Output is correct |
29 |
Correct |
1 ms |
312 KB |
Output is correct |
30 |
Correct |
1 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
1 ms |
332 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
308 KB |
Output is correct |
9 |
Correct |
1 ms |
204 KB |
Output is correct |
10 |
Correct |
1 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
204 KB |
Output is correct |
13 |
Correct |
1 ms |
204 KB |
Output is correct |
14 |
Correct |
1 ms |
204 KB |
Output is correct |
15 |
Correct |
1 ms |
204 KB |
Output is correct |
16 |
Correct |
1 ms |
204 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
312 KB |
Output is correct |
22 |
Correct |
2 ms |
332 KB |
Output is correct |
23 |
Correct |
2 ms |
204 KB |
Output is correct |
24 |
Correct |
1 ms |
204 KB |
Output is correct |
25 |
Correct |
1 ms |
204 KB |
Output is correct |
26 |
Correct |
1 ms |
204 KB |
Output is correct |
27 |
Correct |
1 ms |
256 KB |
Output is correct |
28 |
Correct |
1 ms |
304 KB |
Output is correct |
29 |
Correct |
1 ms |
312 KB |
Output is correct |
30 |
Correct |
1 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
1 ms |
332 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
1 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
312 KB |
Output is correct |
39 |
Correct |
1 ms |
204 KB |
Output is correct |
40 |
Correct |
1 ms |
332 KB |
Output is correct |
41 |
Correct |
1 ms |
316 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
1 ms |
204 KB |
Output is correct |
44 |
Correct |
1 ms |
204 KB |
Output is correct |
45 |
Correct |
1 ms |
204 KB |
Output is correct |
46 |
Correct |
1 ms |
204 KB |
Output is correct |
47 |
Correct |
1 ms |
204 KB |
Output is correct |
48 |
Correct |
1 ms |
312 KB |
Output is correct |
49 |
Correct |
1 ms |
204 KB |
Output is correct |
50 |
Correct |
1 ms |
204 KB |
Output is correct |
51 |
Correct |
1 ms |
332 KB |
Output is correct |
52 |
Correct |
1 ms |
308 KB |
Output is correct |
53 |
Correct |
1 ms |
204 KB |
Output is correct |
54 |
Correct |
1 ms |
204 KB |
Output is correct |
55 |
Correct |
1 ms |
204 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
1 ms |
204 KB |
Output is correct |
58 |
Correct |
1 ms |
204 KB |
Output is correct |
59 |
Correct |
1 ms |
308 KB |
Output is correct |
60 |
Correct |
1 ms |
204 KB |
Output is correct |
61 |
Correct |
1 ms |
332 KB |
Output is correct |
62 |
Correct |
1 ms |
204 KB |
Output is correct |
63 |
Correct |
1 ms |
204 KB |
Output is correct |
64 |
Correct |
1 ms |
316 KB |
Output is correct |
65 |
Correct |
1 ms |
320 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
93 ms |
28456 KB |
Output is correct |
2 |
Correct |
94 ms |
28700 KB |
Output is correct |
3 |
Correct |
120 ms |
26952 KB |
Output is correct |
4 |
Correct |
119 ms |
27120 KB |
Output is correct |
5 |
Correct |
105 ms |
24268 KB |
Output is correct |
6 |
Correct |
117 ms |
25852 KB |
Output is correct |
7 |
Correct |
122 ms |
23732 KB |
Output is correct |
8 |
Correct |
163 ms |
24224 KB |
Output is correct |
9 |
Correct |
149 ms |
22260 KB |
Output is correct |
10 |
Correct |
115 ms |
22652 KB |
Output is correct |
11 |
Correct |
92 ms |
20188 KB |
Output is correct |
12 |
Correct |
107 ms |
19916 KB |
Output is correct |
13 |
Correct |
100 ms |
19852 KB |
Output is correct |
14 |
Correct |
91 ms |
19536 KB |
Output is correct |
15 |
Correct |
71 ms |
18540 KB |
Output is correct |
16 |
Correct |
70 ms |
18216 KB |
Output is correct |
17 |
Correct |
11 ms |
11328 KB |
Output is correct |
18 |
Correct |
10 ms |
11332 KB |
Output is correct |
19 |
Correct |
11 ms |
11252 KB |
Output is correct |
20 |
Correct |
10 ms |
11212 KB |
Output is correct |
21 |
Correct |
10 ms |
11312 KB |
Output is correct |
22 |
Correct |
10 ms |
11212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
2 ms |
460 KB |
Output is correct |
4 |
Correct |
2 ms |
588 KB |
Output is correct |
5 |
Correct |
2 ms |
588 KB |
Output is correct |
6 |
Correct |
2 ms |
588 KB |
Output is correct |
7 |
Correct |
2 ms |
588 KB |
Output is correct |
8 |
Correct |
2 ms |
460 KB |
Output is correct |
9 |
Correct |
2 ms |
460 KB |
Output is correct |
10 |
Correct |
2 ms |
460 KB |
Output is correct |
11 |
Correct |
2 ms |
460 KB |
Output is correct |
12 |
Correct |
2 ms |
460 KB |
Output is correct |
13 |
Correct |
2 ms |
460 KB |
Output is correct |
14 |
Correct |
1 ms |
460 KB |
Output is correct |
15 |
Correct |
1 ms |
460 KB |
Output is correct |
16 |
Correct |
1 ms |
460 KB |
Output is correct |
17 |
Correct |
1 ms |
460 KB |
Output is correct |
18 |
Correct |
1 ms |
460 KB |
Output is correct |
19 |
Correct |
1 ms |
460 KB |
Output is correct |
20 |
Correct |
2 ms |
460 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
130 ms |
22620 KB |
Output is correct |
2 |
Correct |
136 ms |
22584 KB |
Output is correct |
3 |
Correct |
125 ms |
22600 KB |
Output is correct |
4 |
Correct |
120 ms |
22584 KB |
Output is correct |
5 |
Correct |
141 ms |
22652 KB |
Output is correct |
6 |
Correct |
143 ms |
29908 KB |
Output is correct |
7 |
Correct |
147 ms |
28020 KB |
Output is correct |
8 |
Correct |
139 ms |
26516 KB |
Output is correct |
9 |
Correct |
141 ms |
25164 KB |
Output is correct |
10 |
Correct |
132 ms |
22680 KB |
Output is correct |
11 |
Correct |
131 ms |
22636 KB |
Output is correct |
12 |
Correct |
134 ms |
22584 KB |
Output is correct |
13 |
Correct |
165 ms |
22592 KB |
Output is correct |
14 |
Correct |
137 ms |
21760 KB |
Output is correct |
15 |
Correct |
123 ms |
20920 KB |
Output is correct |
16 |
Correct |
72 ms |
17948 KB |
Output is correct |
17 |
Correct |
99 ms |
22984 KB |
Output is correct |
18 |
Correct |
131 ms |
22964 KB |
Output is correct |
19 |
Correct |
97 ms |
23332 KB |
Output is correct |
20 |
Correct |
101 ms |
22972 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
2 ms |
460 KB |
Output is correct |
4 |
Correct |
2 ms |
444 KB |
Output is correct |
5 |
Correct |
2 ms |
588 KB |
Output is correct |
6 |
Correct |
2 ms |
460 KB |
Output is correct |
7 |
Correct |
2 ms |
460 KB |
Output is correct |
8 |
Correct |
2 ms |
444 KB |
Output is correct |
9 |
Correct |
2 ms |
460 KB |
Output is correct |
10 |
Correct |
2 ms |
460 KB |
Output is correct |
11 |
Correct |
2 ms |
460 KB |
Output is correct |
12 |
Correct |
2 ms |
588 KB |
Output is correct |
13 |
Correct |
2 ms |
588 KB |
Output is correct |
14 |
Correct |
2 ms |
572 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
2 ms |
460 KB |
Output is correct |
17 |
Correct |
2 ms |
460 KB |
Output is correct |
18 |
Correct |
2 ms |
460 KB |
Output is correct |
19 |
Correct |
2 ms |
460 KB |
Output is correct |
20 |
Correct |
1 ms |
460 KB |
Output is correct |
21 |
Correct |
2 ms |
460 KB |
Output is correct |
22 |
Correct |
2 ms |
460 KB |
Output is correct |
23 |
Correct |
2 ms |
460 KB |
Output is correct |
24 |
Correct |
2 ms |
460 KB |
Output is correct |
25 |
Correct |
1 ms |
332 KB |
Output is correct |
26 |
Correct |
1 ms |
332 KB |
Output is correct |
27 |
Correct |
1 ms |
332 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
136 ms |
22648 KB |
Output is correct |
2 |
Correct |
122 ms |
22328 KB |
Output is correct |
3 |
Correct |
132 ms |
22360 KB |
Output is correct |
4 |
Correct |
139 ms |
21956 KB |
Output is correct |
5 |
Correct |
175 ms |
21048 KB |
Output is correct |
6 |
Correct |
111 ms |
20524 KB |
Output is correct |
7 |
Correct |
107 ms |
20404 KB |
Output is correct |
8 |
Correct |
159 ms |
20152 KB |
Output is correct |
9 |
Correct |
113 ms |
20120 KB |
Output is correct |
10 |
Correct |
101 ms |
20024 KB |
Output is correct |
11 |
Correct |
104 ms |
19964 KB |
Output is correct |
12 |
Correct |
134 ms |
19896 KB |
Output is correct |
13 |
Correct |
116 ms |
19940 KB |
Output is correct |
14 |
Correct |
94 ms |
21944 KB |
Output is correct |
15 |
Correct |
175 ms |
28216 KB |
Output is correct |
16 |
Correct |
144 ms |
26424 KB |
Output is correct |
17 |
Correct |
134 ms |
27088 KB |
Output is correct |
18 |
Correct |
147 ms |
25372 KB |
Output is correct |
19 |
Correct |
151 ms |
21944 KB |
Output is correct |
20 |
Correct |
151 ms |
21952 KB |
Output is correct |
21 |
Correct |
147 ms |
22020 KB |
Output is correct |
22 |
Correct |
137 ms |
21152 KB |
Output is correct |
23 |
Correct |
102 ms |
20372 KB |
Output is correct |
24 |
Correct |
140 ms |
22660 KB |
Output is correct |
25 |
Correct |
129 ms |
22824 KB |
Output is correct |
26 |
Correct |
139 ms |
22084 KB |
Output is correct |
27 |
Correct |
128 ms |
22152 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
308 KB |
Output is correct |
9 |
Correct |
1 ms |
204 KB |
Output is correct |
10 |
Correct |
1 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
204 KB |
Output is correct |
13 |
Correct |
1 ms |
204 KB |
Output is correct |
14 |
Correct |
1 ms |
204 KB |
Output is correct |
15 |
Correct |
1 ms |
204 KB |
Output is correct |
16 |
Correct |
1 ms |
204 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
312 KB |
Output is correct |
22 |
Correct |
2 ms |
332 KB |
Output is correct |
23 |
Correct |
2 ms |
204 KB |
Output is correct |
24 |
Correct |
1 ms |
204 KB |
Output is correct |
25 |
Correct |
1 ms |
204 KB |
Output is correct |
26 |
Correct |
1 ms |
204 KB |
Output is correct |
27 |
Correct |
1 ms |
256 KB |
Output is correct |
28 |
Correct |
1 ms |
304 KB |
Output is correct |
29 |
Correct |
1 ms |
312 KB |
Output is correct |
30 |
Correct |
1 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
1 ms |
332 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
1 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
312 KB |
Output is correct |
39 |
Correct |
1 ms |
204 KB |
Output is correct |
40 |
Correct |
1 ms |
332 KB |
Output is correct |
41 |
Correct |
1 ms |
316 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
1 ms |
204 KB |
Output is correct |
44 |
Correct |
1 ms |
204 KB |
Output is correct |
45 |
Correct |
1 ms |
204 KB |
Output is correct |
46 |
Correct |
1 ms |
204 KB |
Output is correct |
47 |
Correct |
1 ms |
204 KB |
Output is correct |
48 |
Correct |
1 ms |
312 KB |
Output is correct |
49 |
Correct |
1 ms |
204 KB |
Output is correct |
50 |
Correct |
1 ms |
204 KB |
Output is correct |
51 |
Correct |
1 ms |
332 KB |
Output is correct |
52 |
Correct |
1 ms |
308 KB |
Output is correct |
53 |
Correct |
1 ms |
204 KB |
Output is correct |
54 |
Correct |
1 ms |
204 KB |
Output is correct |
55 |
Correct |
1 ms |
204 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
1 ms |
204 KB |
Output is correct |
58 |
Correct |
1 ms |
204 KB |
Output is correct |
59 |
Correct |
1 ms |
308 KB |
Output is correct |
60 |
Correct |
1 ms |
204 KB |
Output is correct |
61 |
Correct |
1 ms |
332 KB |
Output is correct |
62 |
Correct |
1 ms |
204 KB |
Output is correct |
63 |
Correct |
1 ms |
204 KB |
Output is correct |
64 |
Correct |
1 ms |
316 KB |
Output is correct |
65 |
Correct |
1 ms |
320 KB |
Output is correct |
66 |
Correct |
1 ms |
332 KB |
Output is correct |
67 |
Correct |
1 ms |
460 KB |
Output is correct |
68 |
Correct |
1 ms |
460 KB |
Output is correct |
69 |
Correct |
2 ms |
588 KB |
Output is correct |
70 |
Correct |
2 ms |
576 KB |
Output is correct |
71 |
Correct |
1 ms |
460 KB |
Output is correct |
72 |
Correct |
2 ms |
460 KB |
Output is correct |
73 |
Correct |
1 ms |
460 KB |
Output is correct |
74 |
Correct |
2 ms |
460 KB |
Output is correct |
75 |
Correct |
2 ms |
460 KB |
Output is correct |
76 |
Correct |
1 ms |
332 KB |
Output is correct |
77 |
Correct |
2 ms |
452 KB |
Output is correct |
78 |
Correct |
2 ms |
460 KB |
Output is correct |
79 |
Correct |
2 ms |
460 KB |
Output is correct |
80 |
Correct |
1 ms |
444 KB |
Output is correct |
81 |
Correct |
1 ms |
460 KB |
Output is correct |
82 |
Correct |
2 ms |
588 KB |
Output is correct |
83 |
Correct |
1 ms |
460 KB |
Output is correct |
84 |
Correct |
2 ms |
460 KB |
Output is correct |
85 |
Correct |
2 ms |
460 KB |
Output is correct |
86 |
Correct |
2 ms |
452 KB |
Output is correct |
87 |
Correct |
2 ms |
460 KB |
Output is correct |
88 |
Correct |
2 ms |
444 KB |
Output is correct |
89 |
Correct |
2 ms |
460 KB |
Output is correct |
90 |
Correct |
2 ms |
460 KB |
Output is correct |
91 |
Correct |
2 ms |
452 KB |
Output is correct |
92 |
Correct |
2 ms |
452 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
308 KB |
Output is correct |
9 |
Correct |
1 ms |
204 KB |
Output is correct |
10 |
Correct |
1 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
204 KB |
Output is correct |
13 |
Correct |
1 ms |
204 KB |
Output is correct |
14 |
Correct |
1 ms |
204 KB |
Output is correct |
15 |
Correct |
1 ms |
204 KB |
Output is correct |
16 |
Correct |
1 ms |
204 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
204 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
1 ms |
312 KB |
Output is correct |
22 |
Correct |
2 ms |
332 KB |
Output is correct |
23 |
Correct |
2 ms |
204 KB |
Output is correct |
24 |
Correct |
1 ms |
204 KB |
Output is correct |
25 |
Correct |
1 ms |
204 KB |
Output is correct |
26 |
Correct |
1 ms |
204 KB |
Output is correct |
27 |
Correct |
1 ms |
256 KB |
Output is correct |
28 |
Correct |
1 ms |
304 KB |
Output is correct |
29 |
Correct |
1 ms |
312 KB |
Output is correct |
30 |
Correct |
1 ms |
204 KB |
Output is correct |
31 |
Correct |
1 ms |
204 KB |
Output is correct |
32 |
Correct |
1 ms |
204 KB |
Output is correct |
33 |
Correct |
1 ms |
332 KB |
Output is correct |
34 |
Correct |
1 ms |
204 KB |
Output is correct |
35 |
Correct |
1 ms |
204 KB |
Output is correct |
36 |
Correct |
1 ms |
204 KB |
Output is correct |
37 |
Correct |
1 ms |
204 KB |
Output is correct |
38 |
Correct |
1 ms |
312 KB |
Output is correct |
39 |
Correct |
1 ms |
204 KB |
Output is correct |
40 |
Correct |
1 ms |
332 KB |
Output is correct |
41 |
Correct |
1 ms |
316 KB |
Output is correct |
42 |
Correct |
1 ms |
204 KB |
Output is correct |
43 |
Correct |
1 ms |
204 KB |
Output is correct |
44 |
Correct |
1 ms |
204 KB |
Output is correct |
45 |
Correct |
1 ms |
204 KB |
Output is correct |
46 |
Correct |
1 ms |
204 KB |
Output is correct |
47 |
Correct |
1 ms |
204 KB |
Output is correct |
48 |
Correct |
1 ms |
312 KB |
Output is correct |
49 |
Correct |
1 ms |
204 KB |
Output is correct |
50 |
Correct |
1 ms |
204 KB |
Output is correct |
51 |
Correct |
1 ms |
332 KB |
Output is correct |
52 |
Correct |
1 ms |
308 KB |
Output is correct |
53 |
Correct |
1 ms |
204 KB |
Output is correct |
54 |
Correct |
1 ms |
204 KB |
Output is correct |
55 |
Correct |
1 ms |
204 KB |
Output is correct |
56 |
Correct |
1 ms |
204 KB |
Output is correct |
57 |
Correct |
1 ms |
204 KB |
Output is correct |
58 |
Correct |
1 ms |
204 KB |
Output is correct |
59 |
Correct |
1 ms |
308 KB |
Output is correct |
60 |
Correct |
1 ms |
204 KB |
Output is correct |
61 |
Correct |
1 ms |
332 KB |
Output is correct |
62 |
Correct |
1 ms |
204 KB |
Output is correct |
63 |
Correct |
1 ms |
204 KB |
Output is correct |
64 |
Correct |
1 ms |
316 KB |
Output is correct |
65 |
Correct |
1 ms |
320 KB |
Output is correct |
66 |
Correct |
93 ms |
28456 KB |
Output is correct |
67 |
Correct |
94 ms |
28700 KB |
Output is correct |
68 |
Correct |
120 ms |
26952 KB |
Output is correct |
69 |
Correct |
119 ms |
27120 KB |
Output is correct |
70 |
Correct |
105 ms |
24268 KB |
Output is correct |
71 |
Correct |
117 ms |
25852 KB |
Output is correct |
72 |
Correct |
122 ms |
23732 KB |
Output is correct |
73 |
Correct |
163 ms |
24224 KB |
Output is correct |
74 |
Correct |
149 ms |
22260 KB |
Output is correct |
75 |
Correct |
115 ms |
22652 KB |
Output is correct |
76 |
Correct |
92 ms |
20188 KB |
Output is correct |
77 |
Correct |
107 ms |
19916 KB |
Output is correct |
78 |
Correct |
100 ms |
19852 KB |
Output is correct |
79 |
Correct |
91 ms |
19536 KB |
Output is correct |
80 |
Correct |
71 ms |
18540 KB |
Output is correct |
81 |
Correct |
70 ms |
18216 KB |
Output is correct |
82 |
Correct |
11 ms |
11328 KB |
Output is correct |
83 |
Correct |
10 ms |
11332 KB |
Output is correct |
84 |
Correct |
11 ms |
11252 KB |
Output is correct |
85 |
Correct |
10 ms |
11212 KB |
Output is correct |
86 |
Correct |
10 ms |
11312 KB |
Output is correct |
87 |
Correct |
10 ms |
11212 KB |
Output is correct |
88 |
Correct |
2 ms |
460 KB |
Output is correct |
89 |
Correct |
2 ms |
460 KB |
Output is correct |
90 |
Correct |
2 ms |
460 KB |
Output is correct |
91 |
Correct |
2 ms |
588 KB |
Output is correct |
92 |
Correct |
2 ms |
588 KB |
Output is correct |
93 |
Correct |
2 ms |
588 KB |
Output is correct |
94 |
Correct |
2 ms |
588 KB |
Output is correct |
95 |
Correct |
2 ms |
460 KB |
Output is correct |
96 |
Correct |
2 ms |
460 KB |
Output is correct |
97 |
Correct |
2 ms |
460 KB |
Output is correct |
98 |
Correct |
2 ms |
460 KB |
Output is correct |
99 |
Correct |
2 ms |
460 KB |
Output is correct |
100 |
Correct |
2 ms |
460 KB |
Output is correct |
101 |
Correct |
1 ms |
460 KB |
Output is correct |
102 |
Correct |
1 ms |
460 KB |
Output is correct |
103 |
Correct |
1 ms |
460 KB |
Output is correct |
104 |
Correct |
1 ms |
460 KB |
Output is correct |
105 |
Correct |
1 ms |
460 KB |
Output is correct |
106 |
Correct |
1 ms |
460 KB |
Output is correct |
107 |
Correct |
2 ms |
460 KB |
Output is correct |
108 |
Correct |
130 ms |
22620 KB |
Output is correct |
109 |
Correct |
136 ms |
22584 KB |
Output is correct |
110 |
Correct |
125 ms |
22600 KB |
Output is correct |
111 |
Correct |
120 ms |
22584 KB |
Output is correct |
112 |
Correct |
141 ms |
22652 KB |
Output is correct |
113 |
Correct |
143 ms |
29908 KB |
Output is correct |
114 |
Correct |
147 ms |
28020 KB |
Output is correct |
115 |
Correct |
139 ms |
26516 KB |
Output is correct |
116 |
Correct |
141 ms |
25164 KB |
Output is correct |
117 |
Correct |
132 ms |
22680 KB |
Output is correct |
118 |
Correct |
131 ms |
22636 KB |
Output is correct |
119 |
Correct |
134 ms |
22584 KB |
Output is correct |
120 |
Correct |
165 ms |
22592 KB |
Output is correct |
121 |
Correct |
137 ms |
21760 KB |
Output is correct |
122 |
Correct |
123 ms |
20920 KB |
Output is correct |
123 |
Correct |
72 ms |
17948 KB |
Output is correct |
124 |
Correct |
99 ms |
22984 KB |
Output is correct |
125 |
Correct |
131 ms |
22964 KB |
Output is correct |
126 |
Correct |
97 ms |
23332 KB |
Output is correct |
127 |
Correct |
101 ms |
22972 KB |
Output is correct |
128 |
Correct |
2 ms |
460 KB |
Output is correct |
129 |
Correct |
2 ms |
460 KB |
Output is correct |
130 |
Correct |
2 ms |
460 KB |
Output is correct |
131 |
Correct |
2 ms |
444 KB |
Output is correct |
132 |
Correct |
2 ms |
588 KB |
Output is correct |
133 |
Correct |
2 ms |
460 KB |
Output is correct |
134 |
Correct |
2 ms |
460 KB |
Output is correct |
135 |
Correct |
2 ms |
444 KB |
Output is correct |
136 |
Correct |
2 ms |
460 KB |
Output is correct |
137 |
Correct |
2 ms |
460 KB |
Output is correct |
138 |
Correct |
2 ms |
460 KB |
Output is correct |
139 |
Correct |
2 ms |
588 KB |
Output is correct |
140 |
Correct |
2 ms |
588 KB |
Output is correct |
141 |
Correct |
2 ms |
572 KB |
Output is correct |
142 |
Correct |
2 ms |
460 KB |
Output is correct |
143 |
Correct |
2 ms |
460 KB |
Output is correct |
144 |
Correct |
2 ms |
460 KB |
Output is correct |
145 |
Correct |
2 ms |
460 KB |
Output is correct |
146 |
Correct |
2 ms |
460 KB |
Output is correct |
147 |
Correct |
1 ms |
460 KB |
Output is correct |
148 |
Correct |
2 ms |
460 KB |
Output is correct |
149 |
Correct |
2 ms |
460 KB |
Output is correct |
150 |
Correct |
2 ms |
460 KB |
Output is correct |
151 |
Correct |
2 ms |
460 KB |
Output is correct |
152 |
Correct |
1 ms |
332 KB |
Output is correct |
153 |
Correct |
1 ms |
332 KB |
Output is correct |
154 |
Correct |
1 ms |
332 KB |
Output is correct |
155 |
Correct |
136 ms |
22648 KB |
Output is correct |
156 |
Correct |
122 ms |
22328 KB |
Output is correct |
157 |
Correct |
132 ms |
22360 KB |
Output is correct |
158 |
Correct |
139 ms |
21956 KB |
Output is correct |
159 |
Correct |
175 ms |
21048 KB |
Output is correct |
160 |
Correct |
111 ms |
20524 KB |
Output is correct |
161 |
Correct |
107 ms |
20404 KB |
Output is correct |
162 |
Correct |
159 ms |
20152 KB |
Output is correct |
163 |
Correct |
113 ms |
20120 KB |
Output is correct |
164 |
Correct |
101 ms |
20024 KB |
Output is correct |
165 |
Correct |
104 ms |
19964 KB |
Output is correct |
166 |
Correct |
134 ms |
19896 KB |
Output is correct |
167 |
Correct |
116 ms |
19940 KB |
Output is correct |
168 |
Correct |
94 ms |
21944 KB |
Output is correct |
169 |
Correct |
175 ms |
28216 KB |
Output is correct |
170 |
Correct |
144 ms |
26424 KB |
Output is correct |
171 |
Correct |
134 ms |
27088 KB |
Output is correct |
172 |
Correct |
147 ms |
25372 KB |
Output is correct |
173 |
Correct |
151 ms |
21944 KB |
Output is correct |
174 |
Correct |
151 ms |
21952 KB |
Output is correct |
175 |
Correct |
147 ms |
22020 KB |
Output is correct |
176 |
Correct |
137 ms |
21152 KB |
Output is correct |
177 |
Correct |
102 ms |
20372 KB |
Output is correct |
178 |
Correct |
140 ms |
22660 KB |
Output is correct |
179 |
Correct |
129 ms |
22824 KB |
Output is correct |
180 |
Correct |
139 ms |
22084 KB |
Output is correct |
181 |
Correct |
128 ms |
22152 KB |
Output is correct |
182 |
Correct |
1 ms |
332 KB |
Output is correct |
183 |
Correct |
1 ms |
460 KB |
Output is correct |
184 |
Correct |
1 ms |
460 KB |
Output is correct |
185 |
Correct |
2 ms |
588 KB |
Output is correct |
186 |
Correct |
2 ms |
576 KB |
Output is correct |
187 |
Correct |
1 ms |
460 KB |
Output is correct |
188 |
Correct |
2 ms |
460 KB |
Output is correct |
189 |
Correct |
1 ms |
460 KB |
Output is correct |
190 |
Correct |
2 ms |
460 KB |
Output is correct |
191 |
Correct |
2 ms |
460 KB |
Output is correct |
192 |
Correct |
1 ms |
332 KB |
Output is correct |
193 |
Correct |
2 ms |
452 KB |
Output is correct |
194 |
Correct |
2 ms |
460 KB |
Output is correct |
195 |
Correct |
2 ms |
460 KB |
Output is correct |
196 |
Correct |
1 ms |
444 KB |
Output is correct |
197 |
Correct |
1 ms |
460 KB |
Output is correct |
198 |
Correct |
2 ms |
588 KB |
Output is correct |
199 |
Correct |
1 ms |
460 KB |
Output is correct |
200 |
Correct |
2 ms |
460 KB |
Output is correct |
201 |
Correct |
2 ms |
460 KB |
Output is correct |
202 |
Correct |
2 ms |
452 KB |
Output is correct |
203 |
Correct |
2 ms |
460 KB |
Output is correct |
204 |
Correct |
2 ms |
444 KB |
Output is correct |
205 |
Correct |
2 ms |
460 KB |
Output is correct |
206 |
Correct |
2 ms |
460 KB |
Output is correct |
207 |
Correct |
2 ms |
452 KB |
Output is correct |
208 |
Correct |
2 ms |
452 KB |
Output is correct |
209 |
Correct |
11 ms |
11212 KB |
Output is correct |
210 |
Correct |
81 ms |
17692 KB |
Output is correct |
211 |
Correct |
109 ms |
22404 KB |
Output is correct |
212 |
Correct |
131 ms |
25908 KB |
Output is correct |
213 |
Correct |
208 ms |
28396 KB |
Output is correct |
214 |
Correct |
68 ms |
20920 KB |
Output is correct |
215 |
Correct |
63 ms |
20616 KB |
Output is correct |
216 |
Correct |
132 ms |
22920 KB |
Output is correct |
217 |
Correct |
131 ms |
21768 KB |
Output is correct |
218 |
Correct |
123 ms |
20336 KB |
Output is correct |
219 |
Correct |
108 ms |
19952 KB |
Output is correct |
220 |
Correct |
110 ms |
19896 KB |
Output is correct |
221 |
Correct |
95 ms |
19844 KB |
Output is correct |
222 |
Correct |
105 ms |
20840 KB |
Output is correct |
223 |
Correct |
142 ms |
24220 KB |
Output is correct |
224 |
Correct |
133 ms |
23464 KB |
Output is correct |
225 |
Correct |
135 ms |
21548 KB |
Output is correct |
226 |
Correct |
167 ms |
21496 KB |
Output is correct |
227 |
Correct |
139 ms |
21784 KB |
Output is correct |
228 |
Correct |
126 ms |
20772 KB |
Output is correct |
229 |
Correct |
111 ms |
20172 KB |
Output is correct |
230 |
Correct |
136 ms |
21632 KB |
Output is correct |
231 |
Correct |
132 ms |
21816 KB |
Output is correct |