//#define NDEBUG
#include <bits/stdc++.h>
#include <bits/extc++.h>
#define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define iter(a) a.begin(), a.end()
#define riter(a) a.rbegin(), a.rend()
#define lsort(a) sort(iter(a))
#define gsort(a) sort(riter(a))
#define pb(a) push_back(a)
#define eb(a) emplace_back(a)
#define pf(a) push_front(a)
#define pob pop_back()
#define pof pop_front()
#define mp(a, b) make_pair(a, b)
#define F first
#define S second
#define mt make_tuple
#define gt(t, i) get<i>(t)
#define iceil(a, b) (((a) + (b) - 1) / (b))
#define tomax(a, b) ((a) = max((a), (b)))
#define printv(a, b) {bool pvaspace=false; \
for(auto pva : a){ \
if(pvaspace) b << " "; pvaspace=true;\
b << pva;\
}\
b << "\n";}
//#define TEST
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<ld, ld>;
using tiii = tuple<int, int, int>;
const ll MOD = 1000000007;
const ll MAX = 2147483647;
template<typename A, typename B>
ostream& operator<<(ostream& o, pair<A, B> p){
return o << '(' << p.F << ',' << p.S << ')';
}
vector<vector<int>> tg, g;
int bcc;
vector<int> low, in;
int tts = 1;
stack<int> st;
vector<vector<int>> c;
vector<bool> iscut;
void dfsbcc(int now, int p){
low[now] = in[now] = tts++;
for(int i : tg[now]){
if(i == p) continue;
if(in[i]) low[now] = min(low[now], in[i]);
else{
dfsbcc(i, now);
low[now] = min(low[now], low[i]);
c[now].eb(i);
}
if(low[i] >= in[now] && now != 1) iscut[now] = true;
}
if(now == 1 && c[now].size() > 1) iscut[now] = true;
}
void dfsbcc2(int now, int p){
st.push(now);
for(int i : c[now]){
dfsbcc2(i, now);
}
if(now == 1){
if(st.size() > 1){
while(!st.empty()){
g[st.top()].eb(bcc);
g[bcc].eb(st.top());
st.pop();
}
bcc++;
}
}
else if((p != 1 && low[now] >= in[p]) || (p == 1 && c[p].size() > 1)){
while(!st.empty()){
int t = st.top();
g[st.top()].eb(bcc);
g[bcc].eb(st.top());
st.pop();
if(t == now) break;
}
g[bcc].eb(p);
g[p].eb(bcc);
bcc++;
}
}
vector<int> sz, cnt;
ll ans = 0;
int n;
void dfs1(int now, int p){
sz[now] = now <= n;
for(int i : g[now]){
if(i == p) continue;
dfs1(i, now);
sz[now] += sz[i];
}
}
void dfs2(int now, int p, int r){
ll s = 0;
ll t = now <= n;
for(int i : g[now]){
if(i == p) continue;
s += (ll) t * sz[i] * 2;
t += sz[i];
dfs2(i, now, r);
}
s += (ll) (sz[r] - sz[now]) * sz[now] * 2;
// cerr << now << " " << s << "\n";
ans += (ll) cnt[now] * s;
}
int main(){
StarBurstStream
int m;
cin >> n >> m;
tg.resize(n + 1);
g.resize(3 * n + 1);
bcc = n + 1;
low.resize(n + 1);
in.resize(n + 1);
c.resize(n + 1);
iscut.resize(n + 1);
for(int i = 0; i < m; i++){
int u, v;
cin >> u >> v;
tg[u].eb(v);
tg[v].eb(u);
}
for(int i = 1; i <= n; i++){
if(in[i]) continue;
dfsbcc(i, i);
dfsbcc2(i, i);
}
// for(int i = 1; i < bcc; i++){
// cerr << i << " ";
// printv(g[i], cerr);
// }
sz.resize(3 * n + 1, -MAX);
cnt.resize(3 * n + 1);
for(int i = n + 1; i < bcc; i++){
cnt[i] = g[i].size();
}
for(int i = 1; i <= n; i++) cnt[i] = -1;
// printv(cnt, cerr);
for(int i = 1; i < bcc; i++){
if(sz[i] != -MAX) continue;
dfs1(i, i);
dfs2(i, i, i);
}
cout << ans << "\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
384 KB |
Output is correct |
2 |
Correct |
0 ms |
384 KB |
Output is correct |
3 |
Correct |
1 ms |
384 KB |
Output is correct |
4 |
Correct |
1 ms |
384 KB |
Output is correct |
5 |
Correct |
0 ms |
384 KB |
Output is correct |
6 |
Correct |
1 ms |
384 KB |
Output is correct |
7 |
Correct |
0 ms |
384 KB |
Output is correct |
8 |
Correct |
1 ms |
384 KB |
Output is correct |
9 |
Correct |
0 ms |
384 KB |
Output is correct |
10 |
Correct |
1 ms |
384 KB |
Output is correct |
11 |
Correct |
0 ms |
384 KB |
Output is correct |
12 |
Correct |
1 ms |
384 KB |
Output is correct |
13 |
Correct |
0 ms |
384 KB |
Output is correct |
14 |
Correct |
0 ms |
384 KB |
Output is correct |
15 |
Correct |
0 ms |
384 KB |
Output is correct |
16 |
Correct |
0 ms |
384 KB |
Output is correct |
17 |
Correct |
0 ms |
384 KB |
Output is correct |
18 |
Correct |
0 ms |
384 KB |
Output is correct |
19 |
Correct |
0 ms |
384 KB |
Output is correct |
20 |
Correct |
1 ms |
384 KB |
Output is correct |
21 |
Correct |
0 ms |
384 KB |
Output is correct |
22 |
Correct |
1 ms |
384 KB |
Output is correct |
23 |
Correct |
0 ms |
384 KB |
Output is correct |
24 |
Correct |
0 ms |
384 KB |
Output is correct |
25 |
Correct |
0 ms |
384 KB |
Output is correct |
26 |
Correct |
1 ms |
384 KB |
Output is correct |
27 |
Correct |
1 ms |
288 KB |
Output is correct |
28 |
Correct |
1 ms |
384 KB |
Output is correct |
29 |
Correct |
0 ms |
384 KB |
Output is correct |
30 |
Correct |
1 ms |
384 KB |
Output is correct |
31 |
Correct |
1 ms |
384 KB |
Output is correct |
32 |
Correct |
1 ms |
384 KB |
Output is correct |
33 |
Correct |
1 ms |
384 KB |
Output is correct |
34 |
Correct |
0 ms |
384 KB |
Output is correct |
35 |
Correct |
1 ms |
384 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
384 KB |
Output is correct |
2 |
Correct |
0 ms |
384 KB |
Output is correct |
3 |
Correct |
1 ms |
384 KB |
Output is correct |
4 |
Correct |
1 ms |
384 KB |
Output is correct |
5 |
Correct |
0 ms |
384 KB |
Output is correct |
6 |
Correct |
1 ms |
384 KB |
Output is correct |
7 |
Correct |
0 ms |
384 KB |
Output is correct |
8 |
Correct |
1 ms |
384 KB |
Output is correct |
9 |
Correct |
0 ms |
384 KB |
Output is correct |
10 |
Correct |
1 ms |
384 KB |
Output is correct |
11 |
Correct |
0 ms |
384 KB |
Output is correct |
12 |
Correct |
1 ms |
384 KB |
Output is correct |
13 |
Correct |
0 ms |
384 KB |
Output is correct |
14 |
Correct |
0 ms |
384 KB |
Output is correct |
15 |
Correct |
0 ms |
384 KB |
Output is correct |
16 |
Correct |
0 ms |
384 KB |
Output is correct |
17 |
Correct |
0 ms |
384 KB |
Output is correct |
18 |
Correct |
0 ms |
384 KB |
Output is correct |
19 |
Correct |
0 ms |
384 KB |
Output is correct |
20 |
Correct |
1 ms |
384 KB |
Output is correct |
21 |
Correct |
0 ms |
384 KB |
Output is correct |
22 |
Correct |
1 ms |
384 KB |
Output is correct |
23 |
Correct |
0 ms |
384 KB |
Output is correct |
24 |
Correct |
0 ms |
384 KB |
Output is correct |
25 |
Correct |
0 ms |
384 KB |
Output is correct |
26 |
Correct |
1 ms |
384 KB |
Output is correct |
27 |
Correct |
1 ms |
288 KB |
Output is correct |
28 |
Correct |
1 ms |
384 KB |
Output is correct |
29 |
Correct |
0 ms |
384 KB |
Output is correct |
30 |
Correct |
1 ms |
384 KB |
Output is correct |
31 |
Correct |
1 ms |
384 KB |
Output is correct |
32 |
Correct |
1 ms |
384 KB |
Output is correct |
33 |
Correct |
1 ms |
384 KB |
Output is correct |
34 |
Correct |
0 ms |
384 KB |
Output is correct |
35 |
Correct |
1 ms |
384 KB |
Output is correct |
36 |
Correct |
1 ms |
384 KB |
Output is correct |
37 |
Correct |
1 ms |
384 KB |
Output is correct |
38 |
Correct |
0 ms |
384 KB |
Output is correct |
39 |
Correct |
0 ms |
384 KB |
Output is correct |
40 |
Correct |
1 ms |
384 KB |
Output is correct |
41 |
Correct |
0 ms |
384 KB |
Output is correct |
42 |
Correct |
0 ms |
384 KB |
Output is correct |
43 |
Correct |
1 ms |
384 KB |
Output is correct |
44 |
Correct |
1 ms |
520 KB |
Output is correct |
45 |
Correct |
1 ms |
384 KB |
Output is correct |
46 |
Correct |
1 ms |
384 KB |
Output is correct |
47 |
Correct |
1 ms |
384 KB |
Output is correct |
48 |
Correct |
1 ms |
384 KB |
Output is correct |
49 |
Correct |
1 ms |
384 KB |
Output is correct |
50 |
Correct |
1 ms |
384 KB |
Output is correct |
51 |
Correct |
1 ms |
384 KB |
Output is correct |
52 |
Correct |
0 ms |
384 KB |
Output is correct |
53 |
Correct |
1 ms |
384 KB |
Output is correct |
54 |
Correct |
1 ms |
384 KB |
Output is correct |
55 |
Correct |
1 ms |
384 KB |
Output is correct |
56 |
Correct |
1 ms |
384 KB |
Output is correct |
57 |
Correct |
0 ms |
384 KB |
Output is correct |
58 |
Correct |
1 ms |
384 KB |
Output is correct |
59 |
Correct |
1 ms |
384 KB |
Output is correct |
60 |
Correct |
1 ms |
384 KB |
Output is correct |
61 |
Correct |
0 ms |
384 KB |
Output is correct |
62 |
Correct |
1 ms |
384 KB |
Output is correct |
63 |
Correct |
1 ms |
384 KB |
Output is correct |
64 |
Correct |
1 ms |
384 KB |
Output is correct |
65 |
Correct |
1 ms |
384 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
128 ms |
34416 KB |
Output is correct |
2 |
Correct |
132 ms |
34528 KB |
Output is correct |
3 |
Correct |
151 ms |
32884 KB |
Output is correct |
4 |
Correct |
144 ms |
34160 KB |
Output is correct |
5 |
Correct |
141 ms |
31348 KB |
Output is correct |
6 |
Correct |
162 ms |
33012 KB |
Output is correct |
7 |
Correct |
157 ms |
31096 KB |
Output is correct |
8 |
Correct |
163 ms |
31608 KB |
Output is correct |
9 |
Correct |
158 ms |
29560 KB |
Output is correct |
10 |
Correct |
165 ms |
29816 KB |
Output is correct |
11 |
Correct |
133 ms |
27104 KB |
Output is correct |
12 |
Correct |
133 ms |
27000 KB |
Output is correct |
13 |
Correct |
117 ms |
26872 KB |
Output is correct |
14 |
Correct |
123 ms |
26616 KB |
Output is correct |
15 |
Correct |
99 ms |
25976 KB |
Output is correct |
16 |
Correct |
97 ms |
25848 KB |
Output is correct |
17 |
Correct |
39 ms |
21496 KB |
Output is correct |
18 |
Correct |
41 ms |
21568 KB |
Output is correct |
19 |
Correct |
39 ms |
21496 KB |
Output is correct |
20 |
Correct |
39 ms |
21504 KB |
Output is correct |
21 |
Correct |
39 ms |
21496 KB |
Output is correct |
22 |
Correct |
38 ms |
21528 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
640 KB |
Output is correct |
2 |
Correct |
1 ms |
640 KB |
Output is correct |
3 |
Correct |
1 ms |
640 KB |
Output is correct |
4 |
Correct |
1 ms |
768 KB |
Output is correct |
5 |
Correct |
1 ms |
640 KB |
Output is correct |
6 |
Correct |
1 ms |
640 KB |
Output is correct |
7 |
Correct |
1 ms |
640 KB |
Output is correct |
8 |
Correct |
1 ms |
640 KB |
Output is correct |
9 |
Correct |
1 ms |
640 KB |
Output is correct |
10 |
Correct |
1 ms |
640 KB |
Output is correct |
11 |
Correct |
2 ms |
652 KB |
Output is correct |
12 |
Correct |
1 ms |
640 KB |
Output is correct |
13 |
Correct |
1 ms |
640 KB |
Output is correct |
14 |
Correct |
1 ms |
640 KB |
Output is correct |
15 |
Correct |
1 ms |
640 KB |
Output is correct |
16 |
Correct |
1 ms |
640 KB |
Output is correct |
17 |
Correct |
1 ms |
640 KB |
Output is correct |
18 |
Correct |
1 ms |
640 KB |
Output is correct |
19 |
Correct |
1 ms |
640 KB |
Output is correct |
20 |
Correct |
2 ms |
640 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
149 ms |
26616 KB |
Output is correct |
2 |
Correct |
159 ms |
26488 KB |
Output is correct |
3 |
Correct |
144 ms |
26656 KB |
Output is correct |
4 |
Correct |
149 ms |
26488 KB |
Output is correct |
5 |
Correct |
152 ms |
26488 KB |
Output is correct |
6 |
Correct |
173 ms |
36344 KB |
Output is correct |
7 |
Correct |
182 ms |
32744 KB |
Output is correct |
8 |
Correct |
173 ms |
31096 KB |
Output is correct |
9 |
Correct |
176 ms |
29560 KB |
Output is correct |
10 |
Correct |
159 ms |
26488 KB |
Output is correct |
11 |
Correct |
154 ms |
27640 KB |
Output is correct |
12 |
Correct |
153 ms |
27768 KB |
Output is correct |
13 |
Correct |
150 ms |
27768 KB |
Output is correct |
14 |
Correct |
139 ms |
27512 KB |
Output is correct |
15 |
Correct |
127 ms |
27144 KB |
Output is correct |
16 |
Correct |
94 ms |
25848 KB |
Output is correct |
17 |
Correct |
94 ms |
26992 KB |
Output is correct |
18 |
Correct |
95 ms |
27120 KB |
Output is correct |
19 |
Correct |
94 ms |
27244 KB |
Output is correct |
20 |
Correct |
97 ms |
27000 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
640 KB |
Output is correct |
2 |
Correct |
1 ms |
640 KB |
Output is correct |
3 |
Correct |
1 ms |
640 KB |
Output is correct |
4 |
Correct |
1 ms |
640 KB |
Output is correct |
5 |
Correct |
1 ms |
640 KB |
Output is correct |
6 |
Correct |
1 ms |
640 KB |
Output is correct |
7 |
Correct |
1 ms |
640 KB |
Output is correct |
8 |
Correct |
1 ms |
520 KB |
Output is correct |
9 |
Correct |
1 ms |
640 KB |
Output is correct |
10 |
Correct |
2 ms |
768 KB |
Output is correct |
11 |
Correct |
1 ms |
640 KB |
Output is correct |
12 |
Correct |
1 ms |
640 KB |
Output is correct |
13 |
Correct |
1 ms |
640 KB |
Output is correct |
14 |
Correct |
1 ms |
640 KB |
Output is correct |
15 |
Correct |
2 ms |
640 KB |
Output is correct |
16 |
Correct |
1 ms |
768 KB |
Output is correct |
17 |
Correct |
1 ms |
640 KB |
Output is correct |
18 |
Correct |
1 ms |
640 KB |
Output is correct |
19 |
Correct |
1 ms |
640 KB |
Output is correct |
20 |
Correct |
1 ms |
640 KB |
Output is correct |
21 |
Correct |
1 ms |
640 KB |
Output is correct |
22 |
Correct |
2 ms |
640 KB |
Output is correct |
23 |
Correct |
1 ms |
544 KB |
Output is correct |
24 |
Correct |
1 ms |
640 KB |
Output is correct |
25 |
Correct |
1 ms |
512 KB |
Output is correct |
26 |
Correct |
1 ms |
512 KB |
Output is correct |
27 |
Correct |
1 ms |
512 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
147 ms |
26488 KB |
Output is correct |
2 |
Correct |
180 ms |
26744 KB |
Output is correct |
3 |
Correct |
166 ms |
26360 KB |
Output is correct |
4 |
Correct |
165 ms |
25976 KB |
Output is correct |
5 |
Correct |
157 ms |
25592 KB |
Output is correct |
6 |
Correct |
145 ms |
25464 KB |
Output is correct |
7 |
Correct |
155 ms |
25336 KB |
Output is correct |
8 |
Correct |
134 ms |
25336 KB |
Output is correct |
9 |
Correct |
135 ms |
25336 KB |
Output is correct |
10 |
Correct |
130 ms |
25336 KB |
Output is correct |
11 |
Correct |
142 ms |
25336 KB |
Output is correct |
12 |
Correct |
127 ms |
25592 KB |
Output is correct |
13 |
Correct |
130 ms |
25580 KB |
Output is correct |
14 |
Correct |
135 ms |
27768 KB |
Output is correct |
15 |
Correct |
188 ms |
32636 KB |
Output is correct |
16 |
Correct |
193 ms |
30584 KB |
Output is correct |
17 |
Correct |
173 ms |
31352 KB |
Output is correct |
18 |
Correct |
169 ms |
29432 KB |
Output is correct |
19 |
Correct |
167 ms |
25976 KB |
Output is correct |
20 |
Correct |
165 ms |
27384 KB |
Output is correct |
21 |
Correct |
166 ms |
27384 KB |
Output is correct |
22 |
Correct |
152 ms |
27128 KB |
Output is correct |
23 |
Correct |
136 ms |
26872 KB |
Output is correct |
24 |
Correct |
140 ms |
27768 KB |
Output is correct |
25 |
Correct |
149 ms |
27896 KB |
Output is correct |
26 |
Correct |
141 ms |
27636 KB |
Output is correct |
27 |
Correct |
157 ms |
27512 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
384 KB |
Output is correct |
2 |
Correct |
0 ms |
384 KB |
Output is correct |
3 |
Correct |
1 ms |
384 KB |
Output is correct |
4 |
Correct |
1 ms |
384 KB |
Output is correct |
5 |
Correct |
0 ms |
384 KB |
Output is correct |
6 |
Correct |
1 ms |
384 KB |
Output is correct |
7 |
Correct |
0 ms |
384 KB |
Output is correct |
8 |
Correct |
1 ms |
384 KB |
Output is correct |
9 |
Correct |
0 ms |
384 KB |
Output is correct |
10 |
Correct |
1 ms |
384 KB |
Output is correct |
11 |
Correct |
0 ms |
384 KB |
Output is correct |
12 |
Correct |
1 ms |
384 KB |
Output is correct |
13 |
Correct |
0 ms |
384 KB |
Output is correct |
14 |
Correct |
0 ms |
384 KB |
Output is correct |
15 |
Correct |
0 ms |
384 KB |
Output is correct |
16 |
Correct |
0 ms |
384 KB |
Output is correct |
17 |
Correct |
0 ms |
384 KB |
Output is correct |
18 |
Correct |
0 ms |
384 KB |
Output is correct |
19 |
Correct |
0 ms |
384 KB |
Output is correct |
20 |
Correct |
1 ms |
384 KB |
Output is correct |
21 |
Correct |
0 ms |
384 KB |
Output is correct |
22 |
Correct |
1 ms |
384 KB |
Output is correct |
23 |
Correct |
0 ms |
384 KB |
Output is correct |
24 |
Correct |
0 ms |
384 KB |
Output is correct |
25 |
Correct |
0 ms |
384 KB |
Output is correct |
26 |
Correct |
1 ms |
384 KB |
Output is correct |
27 |
Correct |
1 ms |
288 KB |
Output is correct |
28 |
Correct |
1 ms |
384 KB |
Output is correct |
29 |
Correct |
0 ms |
384 KB |
Output is correct |
30 |
Correct |
1 ms |
384 KB |
Output is correct |
31 |
Correct |
1 ms |
384 KB |
Output is correct |
32 |
Correct |
1 ms |
384 KB |
Output is correct |
33 |
Correct |
1 ms |
384 KB |
Output is correct |
34 |
Correct |
0 ms |
384 KB |
Output is correct |
35 |
Correct |
1 ms |
384 KB |
Output is correct |
36 |
Correct |
1 ms |
384 KB |
Output is correct |
37 |
Correct |
1 ms |
384 KB |
Output is correct |
38 |
Correct |
0 ms |
384 KB |
Output is correct |
39 |
Correct |
0 ms |
384 KB |
Output is correct |
40 |
Correct |
1 ms |
384 KB |
Output is correct |
41 |
Correct |
0 ms |
384 KB |
Output is correct |
42 |
Correct |
0 ms |
384 KB |
Output is correct |
43 |
Correct |
1 ms |
384 KB |
Output is correct |
44 |
Correct |
1 ms |
520 KB |
Output is correct |
45 |
Correct |
1 ms |
384 KB |
Output is correct |
46 |
Correct |
1 ms |
384 KB |
Output is correct |
47 |
Correct |
1 ms |
384 KB |
Output is correct |
48 |
Correct |
1 ms |
384 KB |
Output is correct |
49 |
Correct |
1 ms |
384 KB |
Output is correct |
50 |
Correct |
1 ms |
384 KB |
Output is correct |
51 |
Correct |
1 ms |
384 KB |
Output is correct |
52 |
Correct |
0 ms |
384 KB |
Output is correct |
53 |
Correct |
1 ms |
384 KB |
Output is correct |
54 |
Correct |
1 ms |
384 KB |
Output is correct |
55 |
Correct |
1 ms |
384 KB |
Output is correct |
56 |
Correct |
1 ms |
384 KB |
Output is correct |
57 |
Correct |
0 ms |
384 KB |
Output is correct |
58 |
Correct |
1 ms |
384 KB |
Output is correct |
59 |
Correct |
1 ms |
384 KB |
Output is correct |
60 |
Correct |
1 ms |
384 KB |
Output is correct |
61 |
Correct |
0 ms |
384 KB |
Output is correct |
62 |
Correct |
1 ms |
384 KB |
Output is correct |
63 |
Correct |
1 ms |
384 KB |
Output is correct |
64 |
Correct |
1 ms |
384 KB |
Output is correct |
65 |
Correct |
1 ms |
384 KB |
Output is correct |
66 |
Correct |
1 ms |
512 KB |
Output is correct |
67 |
Correct |
1 ms |
640 KB |
Output is correct |
68 |
Correct |
1 ms |
640 KB |
Output is correct |
69 |
Correct |
1 ms |
640 KB |
Output is correct |
70 |
Correct |
1 ms |
640 KB |
Output is correct |
71 |
Correct |
1 ms |
640 KB |
Output is correct |
72 |
Correct |
1 ms |
640 KB |
Output is correct |
73 |
Correct |
1 ms |
640 KB |
Output is correct |
74 |
Correct |
1 ms |
640 KB |
Output is correct |
75 |
Correct |
1 ms |
640 KB |
Output is correct |
76 |
Correct |
1 ms |
384 KB |
Output is correct |
77 |
Correct |
1 ms |
640 KB |
Output is correct |
78 |
Correct |
1 ms |
640 KB |
Output is correct |
79 |
Correct |
1 ms |
640 KB |
Output is correct |
80 |
Correct |
1 ms |
640 KB |
Output is correct |
81 |
Correct |
1 ms |
640 KB |
Output is correct |
82 |
Correct |
1 ms |
640 KB |
Output is correct |
83 |
Correct |
1 ms |
640 KB |
Output is correct |
84 |
Correct |
2 ms |
640 KB |
Output is correct |
85 |
Correct |
1 ms |
640 KB |
Output is correct |
86 |
Correct |
2 ms |
640 KB |
Output is correct |
87 |
Correct |
1 ms |
640 KB |
Output is correct |
88 |
Correct |
1 ms |
640 KB |
Output is correct |
89 |
Correct |
1 ms |
640 KB |
Output is correct |
90 |
Correct |
1 ms |
640 KB |
Output is correct |
91 |
Correct |
1 ms |
640 KB |
Output is correct |
92 |
Correct |
1 ms |
640 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
384 KB |
Output is correct |
2 |
Correct |
0 ms |
384 KB |
Output is correct |
3 |
Correct |
1 ms |
384 KB |
Output is correct |
4 |
Correct |
1 ms |
384 KB |
Output is correct |
5 |
Correct |
0 ms |
384 KB |
Output is correct |
6 |
Correct |
1 ms |
384 KB |
Output is correct |
7 |
Correct |
0 ms |
384 KB |
Output is correct |
8 |
Correct |
1 ms |
384 KB |
Output is correct |
9 |
Correct |
0 ms |
384 KB |
Output is correct |
10 |
Correct |
1 ms |
384 KB |
Output is correct |
11 |
Correct |
0 ms |
384 KB |
Output is correct |
12 |
Correct |
1 ms |
384 KB |
Output is correct |
13 |
Correct |
0 ms |
384 KB |
Output is correct |
14 |
Correct |
0 ms |
384 KB |
Output is correct |
15 |
Correct |
0 ms |
384 KB |
Output is correct |
16 |
Correct |
0 ms |
384 KB |
Output is correct |
17 |
Correct |
0 ms |
384 KB |
Output is correct |
18 |
Correct |
0 ms |
384 KB |
Output is correct |
19 |
Correct |
0 ms |
384 KB |
Output is correct |
20 |
Correct |
1 ms |
384 KB |
Output is correct |
21 |
Correct |
0 ms |
384 KB |
Output is correct |
22 |
Correct |
1 ms |
384 KB |
Output is correct |
23 |
Correct |
0 ms |
384 KB |
Output is correct |
24 |
Correct |
0 ms |
384 KB |
Output is correct |
25 |
Correct |
0 ms |
384 KB |
Output is correct |
26 |
Correct |
1 ms |
384 KB |
Output is correct |
27 |
Correct |
1 ms |
288 KB |
Output is correct |
28 |
Correct |
1 ms |
384 KB |
Output is correct |
29 |
Correct |
0 ms |
384 KB |
Output is correct |
30 |
Correct |
1 ms |
384 KB |
Output is correct |
31 |
Correct |
1 ms |
384 KB |
Output is correct |
32 |
Correct |
1 ms |
384 KB |
Output is correct |
33 |
Correct |
1 ms |
384 KB |
Output is correct |
34 |
Correct |
0 ms |
384 KB |
Output is correct |
35 |
Correct |
1 ms |
384 KB |
Output is correct |
36 |
Correct |
1 ms |
384 KB |
Output is correct |
37 |
Correct |
1 ms |
384 KB |
Output is correct |
38 |
Correct |
0 ms |
384 KB |
Output is correct |
39 |
Correct |
0 ms |
384 KB |
Output is correct |
40 |
Correct |
1 ms |
384 KB |
Output is correct |
41 |
Correct |
0 ms |
384 KB |
Output is correct |
42 |
Correct |
0 ms |
384 KB |
Output is correct |
43 |
Correct |
1 ms |
384 KB |
Output is correct |
44 |
Correct |
1 ms |
520 KB |
Output is correct |
45 |
Correct |
1 ms |
384 KB |
Output is correct |
46 |
Correct |
1 ms |
384 KB |
Output is correct |
47 |
Correct |
1 ms |
384 KB |
Output is correct |
48 |
Correct |
1 ms |
384 KB |
Output is correct |
49 |
Correct |
1 ms |
384 KB |
Output is correct |
50 |
Correct |
1 ms |
384 KB |
Output is correct |
51 |
Correct |
1 ms |
384 KB |
Output is correct |
52 |
Correct |
0 ms |
384 KB |
Output is correct |
53 |
Correct |
1 ms |
384 KB |
Output is correct |
54 |
Correct |
1 ms |
384 KB |
Output is correct |
55 |
Correct |
1 ms |
384 KB |
Output is correct |
56 |
Correct |
1 ms |
384 KB |
Output is correct |
57 |
Correct |
0 ms |
384 KB |
Output is correct |
58 |
Correct |
1 ms |
384 KB |
Output is correct |
59 |
Correct |
1 ms |
384 KB |
Output is correct |
60 |
Correct |
1 ms |
384 KB |
Output is correct |
61 |
Correct |
0 ms |
384 KB |
Output is correct |
62 |
Correct |
1 ms |
384 KB |
Output is correct |
63 |
Correct |
1 ms |
384 KB |
Output is correct |
64 |
Correct |
1 ms |
384 KB |
Output is correct |
65 |
Correct |
1 ms |
384 KB |
Output is correct |
66 |
Correct |
128 ms |
34416 KB |
Output is correct |
67 |
Correct |
132 ms |
34528 KB |
Output is correct |
68 |
Correct |
151 ms |
32884 KB |
Output is correct |
69 |
Correct |
144 ms |
34160 KB |
Output is correct |
70 |
Correct |
141 ms |
31348 KB |
Output is correct |
71 |
Correct |
162 ms |
33012 KB |
Output is correct |
72 |
Correct |
157 ms |
31096 KB |
Output is correct |
73 |
Correct |
163 ms |
31608 KB |
Output is correct |
74 |
Correct |
158 ms |
29560 KB |
Output is correct |
75 |
Correct |
165 ms |
29816 KB |
Output is correct |
76 |
Correct |
133 ms |
27104 KB |
Output is correct |
77 |
Correct |
133 ms |
27000 KB |
Output is correct |
78 |
Correct |
117 ms |
26872 KB |
Output is correct |
79 |
Correct |
123 ms |
26616 KB |
Output is correct |
80 |
Correct |
99 ms |
25976 KB |
Output is correct |
81 |
Correct |
97 ms |
25848 KB |
Output is correct |
82 |
Correct |
39 ms |
21496 KB |
Output is correct |
83 |
Correct |
41 ms |
21568 KB |
Output is correct |
84 |
Correct |
39 ms |
21496 KB |
Output is correct |
85 |
Correct |
39 ms |
21504 KB |
Output is correct |
86 |
Correct |
39 ms |
21496 KB |
Output is correct |
87 |
Correct |
38 ms |
21528 KB |
Output is correct |
88 |
Correct |
1 ms |
640 KB |
Output is correct |
89 |
Correct |
1 ms |
640 KB |
Output is correct |
90 |
Correct |
1 ms |
640 KB |
Output is correct |
91 |
Correct |
1 ms |
768 KB |
Output is correct |
92 |
Correct |
1 ms |
640 KB |
Output is correct |
93 |
Correct |
1 ms |
640 KB |
Output is correct |
94 |
Correct |
1 ms |
640 KB |
Output is correct |
95 |
Correct |
1 ms |
640 KB |
Output is correct |
96 |
Correct |
1 ms |
640 KB |
Output is correct |
97 |
Correct |
1 ms |
640 KB |
Output is correct |
98 |
Correct |
2 ms |
652 KB |
Output is correct |
99 |
Correct |
1 ms |
640 KB |
Output is correct |
100 |
Correct |
1 ms |
640 KB |
Output is correct |
101 |
Correct |
1 ms |
640 KB |
Output is correct |
102 |
Correct |
1 ms |
640 KB |
Output is correct |
103 |
Correct |
1 ms |
640 KB |
Output is correct |
104 |
Correct |
1 ms |
640 KB |
Output is correct |
105 |
Correct |
1 ms |
640 KB |
Output is correct |
106 |
Correct |
1 ms |
640 KB |
Output is correct |
107 |
Correct |
2 ms |
640 KB |
Output is correct |
108 |
Correct |
149 ms |
26616 KB |
Output is correct |
109 |
Correct |
159 ms |
26488 KB |
Output is correct |
110 |
Correct |
144 ms |
26656 KB |
Output is correct |
111 |
Correct |
149 ms |
26488 KB |
Output is correct |
112 |
Correct |
152 ms |
26488 KB |
Output is correct |
113 |
Correct |
173 ms |
36344 KB |
Output is correct |
114 |
Correct |
182 ms |
32744 KB |
Output is correct |
115 |
Correct |
173 ms |
31096 KB |
Output is correct |
116 |
Correct |
176 ms |
29560 KB |
Output is correct |
117 |
Correct |
159 ms |
26488 KB |
Output is correct |
118 |
Correct |
154 ms |
27640 KB |
Output is correct |
119 |
Correct |
153 ms |
27768 KB |
Output is correct |
120 |
Correct |
150 ms |
27768 KB |
Output is correct |
121 |
Correct |
139 ms |
27512 KB |
Output is correct |
122 |
Correct |
127 ms |
27144 KB |
Output is correct |
123 |
Correct |
94 ms |
25848 KB |
Output is correct |
124 |
Correct |
94 ms |
26992 KB |
Output is correct |
125 |
Correct |
95 ms |
27120 KB |
Output is correct |
126 |
Correct |
94 ms |
27244 KB |
Output is correct |
127 |
Correct |
97 ms |
27000 KB |
Output is correct |
128 |
Correct |
1 ms |
640 KB |
Output is correct |
129 |
Correct |
1 ms |
640 KB |
Output is correct |
130 |
Correct |
1 ms |
640 KB |
Output is correct |
131 |
Correct |
1 ms |
640 KB |
Output is correct |
132 |
Correct |
1 ms |
640 KB |
Output is correct |
133 |
Correct |
1 ms |
640 KB |
Output is correct |
134 |
Correct |
1 ms |
640 KB |
Output is correct |
135 |
Correct |
1 ms |
520 KB |
Output is correct |
136 |
Correct |
1 ms |
640 KB |
Output is correct |
137 |
Correct |
2 ms |
768 KB |
Output is correct |
138 |
Correct |
1 ms |
640 KB |
Output is correct |
139 |
Correct |
1 ms |
640 KB |
Output is correct |
140 |
Correct |
1 ms |
640 KB |
Output is correct |
141 |
Correct |
1 ms |
640 KB |
Output is correct |
142 |
Correct |
2 ms |
640 KB |
Output is correct |
143 |
Correct |
1 ms |
768 KB |
Output is correct |
144 |
Correct |
1 ms |
640 KB |
Output is correct |
145 |
Correct |
1 ms |
640 KB |
Output is correct |
146 |
Correct |
1 ms |
640 KB |
Output is correct |
147 |
Correct |
1 ms |
640 KB |
Output is correct |
148 |
Correct |
1 ms |
640 KB |
Output is correct |
149 |
Correct |
2 ms |
640 KB |
Output is correct |
150 |
Correct |
1 ms |
544 KB |
Output is correct |
151 |
Correct |
1 ms |
640 KB |
Output is correct |
152 |
Correct |
1 ms |
512 KB |
Output is correct |
153 |
Correct |
1 ms |
512 KB |
Output is correct |
154 |
Correct |
1 ms |
512 KB |
Output is correct |
155 |
Correct |
147 ms |
26488 KB |
Output is correct |
156 |
Correct |
180 ms |
26744 KB |
Output is correct |
157 |
Correct |
166 ms |
26360 KB |
Output is correct |
158 |
Correct |
165 ms |
25976 KB |
Output is correct |
159 |
Correct |
157 ms |
25592 KB |
Output is correct |
160 |
Correct |
145 ms |
25464 KB |
Output is correct |
161 |
Correct |
155 ms |
25336 KB |
Output is correct |
162 |
Correct |
134 ms |
25336 KB |
Output is correct |
163 |
Correct |
135 ms |
25336 KB |
Output is correct |
164 |
Correct |
130 ms |
25336 KB |
Output is correct |
165 |
Correct |
142 ms |
25336 KB |
Output is correct |
166 |
Correct |
127 ms |
25592 KB |
Output is correct |
167 |
Correct |
130 ms |
25580 KB |
Output is correct |
168 |
Correct |
135 ms |
27768 KB |
Output is correct |
169 |
Correct |
188 ms |
32636 KB |
Output is correct |
170 |
Correct |
193 ms |
30584 KB |
Output is correct |
171 |
Correct |
173 ms |
31352 KB |
Output is correct |
172 |
Correct |
169 ms |
29432 KB |
Output is correct |
173 |
Correct |
167 ms |
25976 KB |
Output is correct |
174 |
Correct |
165 ms |
27384 KB |
Output is correct |
175 |
Correct |
166 ms |
27384 KB |
Output is correct |
176 |
Correct |
152 ms |
27128 KB |
Output is correct |
177 |
Correct |
136 ms |
26872 KB |
Output is correct |
178 |
Correct |
140 ms |
27768 KB |
Output is correct |
179 |
Correct |
149 ms |
27896 KB |
Output is correct |
180 |
Correct |
141 ms |
27636 KB |
Output is correct |
181 |
Correct |
157 ms |
27512 KB |
Output is correct |
182 |
Correct |
1 ms |
512 KB |
Output is correct |
183 |
Correct |
1 ms |
640 KB |
Output is correct |
184 |
Correct |
1 ms |
640 KB |
Output is correct |
185 |
Correct |
1 ms |
640 KB |
Output is correct |
186 |
Correct |
1 ms |
640 KB |
Output is correct |
187 |
Correct |
1 ms |
640 KB |
Output is correct |
188 |
Correct |
1 ms |
640 KB |
Output is correct |
189 |
Correct |
1 ms |
640 KB |
Output is correct |
190 |
Correct |
1 ms |
640 KB |
Output is correct |
191 |
Correct |
1 ms |
640 KB |
Output is correct |
192 |
Correct |
1 ms |
384 KB |
Output is correct |
193 |
Correct |
1 ms |
640 KB |
Output is correct |
194 |
Correct |
1 ms |
640 KB |
Output is correct |
195 |
Correct |
1 ms |
640 KB |
Output is correct |
196 |
Correct |
1 ms |
640 KB |
Output is correct |
197 |
Correct |
1 ms |
640 KB |
Output is correct |
198 |
Correct |
1 ms |
640 KB |
Output is correct |
199 |
Correct |
1 ms |
640 KB |
Output is correct |
200 |
Correct |
2 ms |
640 KB |
Output is correct |
201 |
Correct |
1 ms |
640 KB |
Output is correct |
202 |
Correct |
2 ms |
640 KB |
Output is correct |
203 |
Correct |
1 ms |
640 KB |
Output is correct |
204 |
Correct |
1 ms |
640 KB |
Output is correct |
205 |
Correct |
1 ms |
640 KB |
Output is correct |
206 |
Correct |
1 ms |
640 KB |
Output is correct |
207 |
Correct |
1 ms |
640 KB |
Output is correct |
208 |
Correct |
1 ms |
640 KB |
Output is correct |
209 |
Correct |
42 ms |
21496 KB |
Output is correct |
210 |
Correct |
99 ms |
25336 KB |
Output is correct |
211 |
Correct |
149 ms |
28660 KB |
Output is correct |
212 |
Correct |
184 ms |
31088 KB |
Output is correct |
213 |
Correct |
186 ms |
33392 KB |
Output is correct |
214 |
Correct |
82 ms |
26764 KB |
Output is correct |
215 |
Correct |
82 ms |
26364 KB |
Output is correct |
216 |
Correct |
160 ms |
27484 KB |
Output is correct |
217 |
Correct |
156 ms |
27000 KB |
Output is correct |
218 |
Correct |
141 ms |
26488 KB |
Output is correct |
219 |
Correct |
133 ms |
26488 KB |
Output is correct |
220 |
Correct |
139 ms |
26616 KB |
Output is correct |
221 |
Correct |
133 ms |
26616 KB |
Output is correct |
222 |
Correct |
136 ms |
27896 KB |
Output is correct |
223 |
Correct |
168 ms |
29432 KB |
Output is correct |
224 |
Correct |
175 ms |
28664 KB |
Output is correct |
225 |
Correct |
154 ms |
26868 KB |
Output is correct |
226 |
Correct |
160 ms |
26872 KB |
Output is correct |
227 |
Correct |
157 ms |
27000 KB |
Output is correct |
228 |
Correct |
150 ms |
26872 KB |
Output is correct |
229 |
Correct |
135 ms |
26744 KB |
Output is correct |
230 |
Correct |
140 ms |
27000 KB |
Output is correct |
231 |
Correct |
151 ms |
27128 KB |
Output is correct |