#include<bits/stdc++.h>
#define lf double
#define ll long long
#define ull unsigned ll
#define ii pair<int,int>
#define li pair<ll,int>
#define iii pair<ii,int>
#define iiii pair<ii,ii>
#define iiii2 pair<int,iii>
#define lii pair<ll,ii>
#define lolo pair<ll,ll>
#define heap priority_queue
#define mp make_pair
#define st first
#define nd second
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define all(x) x.begin(),x.end()
#define len(x) strlen(x)
#define sz(x) (int) x.size()
#define orta ((bas+son)/2)
#define min3(x,y,z) min(min(x,y),z)
#define max3(x,y,z) max(max(x,y),z)
#define umin(x,y) x=min(x,y)
#define umax(x,y) x=max(x,y)
#define dbgs(x) cerr<<(#x)<<" --> "<<(x)<<" "
#define dbg(x) cerr<<(#x)<<" --> "<<(x)<<endl;getchar()
#define MOD 1000000007
#define inf 1000000000
#define N 200005
#define LOG 20
#define magic 100
#define KOK 350
#define EPS 0.0025
#define pw(x) ((1ll)<<(x))
#define PI 3.1415926535
#define get(x,y) ((x<0)?(x+y):(x))
using namespace std;
int n,m,x,y,bcc,t,sz;
int total[N],vis[N],low[N],Ap[N];
vector<int> Nodes[N],Gr[N],v[N];
ll ans;
stack<int> S;
void dfs(int B,int ata) {
int sum=total[B]+sz(Nodes[B]);
for(int i:Nodes[B]) {
dfs(i,B);
total[B]+=total[i];
if(B>n) ans-=1ll*sum*total[i]*(total[i]-1);
}
if(B>n) ans-=1ll*sum*(sz-total[B])*(sz-total[B]-1);
}
void found(int x,int node) {
for(int temp=-1;temp!=x;) {
temp=S.top();
S.pop();
if(Ap[temp]) Nodes[bcc].pb(temp);
else total[bcc]++;
}
Ap[node]++;
total[node]=1;
Nodes[node].pb(bcc);
}
void bccF(int node,int ata) {
vis[node]=low[node]=++t;
sz++;
Ap[node]=(ata==-1?-1:0);
for(int i:v[node]) {
if(i==ata) continue ;
if(!vis[i]) {
S.push(i);
bccF(i,node);
umin(low[node],low[i]);
if(low[i]>=vis[node]) {
bcc++;
found(i,node);
}
}
else {
umin(low[node],vis[i]);
}
}
}
int main() {
#if 0
freopen("input.txt","r",stdin);
#endif
scanf("%d %d",&n,&m);
for(int i=1;i<=m;i++) {
scanf("%d %d",&x,&y);
v[x].pb(y);
v[y].pb(x);
}
bcc=n;
for(int i=1;i<=n;i++) {
if(!vis[i]) {
sz=0;
S.push(i);
bccF(i,-1);
S.pop();
ans+=1ll*sz*(sz-1)*(sz-2);
if(Ap[i]) dfs(i,-1);
else {
// total[Nodes[i][0]]++;
dfs(Nodes[i][0],-1);
}
}
}
printf("%lld",ans);
}
Compilation message
count_triplets.cpp: In function 'int main()':
count_triplets.cpp:132:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&n,&m);
~~~~~^~~~~~~~~~~~~~~
count_triplets.cpp:136:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&x,&y);
~~~~~^~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
15 ms |
14456 KB |
Output is correct |
2 |
Correct |
17 ms |
14520 KB |
Output is correct |
3 |
Correct |
16 ms |
14520 KB |
Output is correct |
4 |
Correct |
15 ms |
14544 KB |
Output is correct |
5 |
Correct |
15 ms |
14588 KB |
Output is correct |
6 |
Correct |
15 ms |
14588 KB |
Output is correct |
7 |
Correct |
14 ms |
14592 KB |
Output is correct |
8 |
Correct |
15 ms |
14592 KB |
Output is correct |
9 |
Correct |
15 ms |
14592 KB |
Output is correct |
10 |
Correct |
15 ms |
14600 KB |
Output is correct |
11 |
Correct |
14 ms |
14624 KB |
Output is correct |
12 |
Correct |
18 ms |
14624 KB |
Output is correct |
13 |
Correct |
18 ms |
14700 KB |
Output is correct |
14 |
Correct |
14 ms |
14700 KB |
Output is correct |
15 |
Correct |
14 ms |
14700 KB |
Output is correct |
16 |
Correct |
16 ms |
14700 KB |
Output is correct |
17 |
Correct |
16 ms |
14700 KB |
Output is correct |
18 |
Correct |
18 ms |
14700 KB |
Output is correct |
19 |
Correct |
15 ms |
14700 KB |
Output is correct |
20 |
Correct |
14 ms |
14700 KB |
Output is correct |
21 |
Correct |
14 ms |
14700 KB |
Output is correct |
22 |
Correct |
15 ms |
14716 KB |
Output is correct |
23 |
Correct |
19 ms |
14716 KB |
Output is correct |
24 |
Correct |
16 ms |
14716 KB |
Output is correct |
25 |
Correct |
16 ms |
14716 KB |
Output is correct |
26 |
Correct |
15 ms |
14716 KB |
Output is correct |
27 |
Correct |
16 ms |
14716 KB |
Output is correct |
28 |
Correct |
15 ms |
14716 KB |
Output is correct |
29 |
Correct |
15 ms |
14788 KB |
Output is correct |
30 |
Correct |
17 ms |
14788 KB |
Output is correct |
31 |
Correct |
14 ms |
14788 KB |
Output is correct |
32 |
Correct |
15 ms |
14788 KB |
Output is correct |
33 |
Correct |
13 ms |
14964 KB |
Output is correct |
34 |
Correct |
14 ms |
14964 KB |
Output is correct |
35 |
Correct |
14 ms |
14964 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
15 ms |
14456 KB |
Output is correct |
2 |
Correct |
17 ms |
14520 KB |
Output is correct |
3 |
Correct |
16 ms |
14520 KB |
Output is correct |
4 |
Correct |
15 ms |
14544 KB |
Output is correct |
5 |
Correct |
15 ms |
14588 KB |
Output is correct |
6 |
Correct |
15 ms |
14588 KB |
Output is correct |
7 |
Correct |
14 ms |
14592 KB |
Output is correct |
8 |
Correct |
15 ms |
14592 KB |
Output is correct |
9 |
Correct |
15 ms |
14592 KB |
Output is correct |
10 |
Correct |
15 ms |
14600 KB |
Output is correct |
11 |
Correct |
14 ms |
14624 KB |
Output is correct |
12 |
Correct |
18 ms |
14624 KB |
Output is correct |
13 |
Correct |
18 ms |
14700 KB |
Output is correct |
14 |
Correct |
14 ms |
14700 KB |
Output is correct |
15 |
Correct |
14 ms |
14700 KB |
Output is correct |
16 |
Correct |
16 ms |
14700 KB |
Output is correct |
17 |
Correct |
16 ms |
14700 KB |
Output is correct |
18 |
Correct |
18 ms |
14700 KB |
Output is correct |
19 |
Correct |
15 ms |
14700 KB |
Output is correct |
20 |
Correct |
14 ms |
14700 KB |
Output is correct |
21 |
Correct |
14 ms |
14700 KB |
Output is correct |
22 |
Correct |
15 ms |
14716 KB |
Output is correct |
23 |
Correct |
19 ms |
14716 KB |
Output is correct |
24 |
Correct |
16 ms |
14716 KB |
Output is correct |
25 |
Correct |
16 ms |
14716 KB |
Output is correct |
26 |
Correct |
15 ms |
14716 KB |
Output is correct |
27 |
Correct |
16 ms |
14716 KB |
Output is correct |
28 |
Correct |
15 ms |
14716 KB |
Output is correct |
29 |
Correct |
15 ms |
14788 KB |
Output is correct |
30 |
Correct |
17 ms |
14788 KB |
Output is correct |
31 |
Correct |
14 ms |
14788 KB |
Output is correct |
32 |
Correct |
15 ms |
14788 KB |
Output is correct |
33 |
Correct |
13 ms |
14964 KB |
Output is correct |
34 |
Correct |
14 ms |
14964 KB |
Output is correct |
35 |
Correct |
14 ms |
14964 KB |
Output is correct |
36 |
Correct |
16 ms |
14964 KB |
Output is correct |
37 |
Correct |
15 ms |
14964 KB |
Output is correct |
38 |
Correct |
15 ms |
14964 KB |
Output is correct |
39 |
Correct |
14 ms |
14964 KB |
Output is correct |
40 |
Correct |
15 ms |
14964 KB |
Output is correct |
41 |
Correct |
17 ms |
14964 KB |
Output is correct |
42 |
Correct |
16 ms |
14964 KB |
Output is correct |
43 |
Correct |
15 ms |
14964 KB |
Output is correct |
44 |
Correct |
14 ms |
14964 KB |
Output is correct |
45 |
Correct |
15 ms |
14964 KB |
Output is correct |
46 |
Correct |
17 ms |
14964 KB |
Output is correct |
47 |
Correct |
14 ms |
14964 KB |
Output is correct |
48 |
Correct |
17 ms |
14964 KB |
Output is correct |
49 |
Correct |
14 ms |
14964 KB |
Output is correct |
50 |
Correct |
15 ms |
14964 KB |
Output is correct |
51 |
Correct |
17 ms |
14964 KB |
Output is correct |
52 |
Correct |
17 ms |
14964 KB |
Output is correct |
53 |
Correct |
15 ms |
14964 KB |
Output is correct |
54 |
Correct |
16 ms |
14964 KB |
Output is correct |
55 |
Correct |
15 ms |
14964 KB |
Output is correct |
56 |
Correct |
15 ms |
14964 KB |
Output is correct |
57 |
Correct |
14 ms |
14964 KB |
Output is correct |
58 |
Correct |
17 ms |
14964 KB |
Output is correct |
59 |
Correct |
17 ms |
14964 KB |
Output is correct |
60 |
Correct |
14 ms |
14964 KB |
Output is correct |
61 |
Correct |
13 ms |
14964 KB |
Output is correct |
62 |
Correct |
15 ms |
14964 KB |
Output is correct |
63 |
Correct |
17 ms |
14964 KB |
Output is correct |
64 |
Correct |
15 ms |
14964 KB |
Output is correct |
65 |
Correct |
14 ms |
14964 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
137 ms |
25604 KB |
Output is correct |
2 |
Correct |
106 ms |
25732 KB |
Output is correct |
3 |
Correct |
170 ms |
29188 KB |
Output is correct |
4 |
Correct |
158 ms |
29188 KB |
Output is correct |
5 |
Correct |
163 ms |
29188 KB |
Output is correct |
6 |
Correct |
137 ms |
29188 KB |
Output is correct |
7 |
Correct |
139 ms |
29188 KB |
Output is correct |
8 |
Correct |
163 ms |
29188 KB |
Output is correct |
9 |
Correct |
136 ms |
29188 KB |
Output is correct |
10 |
Correct |
152 ms |
29188 KB |
Output is correct |
11 |
Correct |
103 ms |
29188 KB |
Output is correct |
12 |
Correct |
99 ms |
29188 KB |
Output is correct |
13 |
Correct |
94 ms |
29188 KB |
Output is correct |
14 |
Correct |
92 ms |
29188 KB |
Output is correct |
15 |
Correct |
110 ms |
29188 KB |
Output is correct |
16 |
Correct |
84 ms |
29188 KB |
Output is correct |
17 |
Correct |
18 ms |
29188 KB |
Output is correct |
18 |
Correct |
21 ms |
29188 KB |
Output is correct |
19 |
Correct |
18 ms |
29188 KB |
Output is correct |
20 |
Correct |
22 ms |
29188 KB |
Output is correct |
21 |
Correct |
17 ms |
29188 KB |
Output is correct |
22 |
Correct |
18 ms |
29188 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
15 ms |
29188 KB |
Output is correct |
2 |
Correct |
15 ms |
29188 KB |
Output is correct |
3 |
Correct |
16 ms |
29188 KB |
Output is correct |
4 |
Correct |
14 ms |
29188 KB |
Output is correct |
5 |
Correct |
16 ms |
29188 KB |
Output is correct |
6 |
Correct |
18 ms |
29188 KB |
Output is correct |
7 |
Correct |
15 ms |
29188 KB |
Output is correct |
8 |
Correct |
16 ms |
29188 KB |
Output is correct |
9 |
Correct |
17 ms |
29188 KB |
Output is correct |
10 |
Correct |
17 ms |
29188 KB |
Output is correct |
11 |
Correct |
16 ms |
29188 KB |
Output is correct |
12 |
Correct |
15 ms |
29188 KB |
Output is correct |
13 |
Correct |
17 ms |
29188 KB |
Output is correct |
14 |
Correct |
17 ms |
29188 KB |
Output is correct |
15 |
Correct |
17 ms |
29188 KB |
Output is correct |
16 |
Correct |
16 ms |
29188 KB |
Output is correct |
17 |
Correct |
14 ms |
29188 KB |
Output is correct |
18 |
Correct |
18 ms |
29188 KB |
Output is correct |
19 |
Correct |
17 ms |
29188 KB |
Output is correct |
20 |
Correct |
16 ms |
29188 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
146 ms |
29188 KB |
Output is correct |
2 |
Correct |
166 ms |
29188 KB |
Output is correct |
3 |
Correct |
147 ms |
29188 KB |
Output is correct |
4 |
Correct |
152 ms |
29188 KB |
Output is correct |
5 |
Correct |
133 ms |
29188 KB |
Output is correct |
6 |
Correct |
153 ms |
34564 KB |
Output is correct |
7 |
Correct |
163 ms |
34564 KB |
Output is correct |
8 |
Correct |
196 ms |
34564 KB |
Output is correct |
9 |
Correct |
166 ms |
34564 KB |
Output is correct |
10 |
Correct |
136 ms |
34564 KB |
Output is correct |
11 |
Correct |
192 ms |
34564 KB |
Output is correct |
12 |
Correct |
136 ms |
34564 KB |
Output is correct |
13 |
Correct |
130 ms |
34564 KB |
Output is correct |
14 |
Correct |
133 ms |
34564 KB |
Output is correct |
15 |
Correct |
105 ms |
34564 KB |
Output is correct |
16 |
Correct |
69 ms |
34564 KB |
Output is correct |
17 |
Correct |
80 ms |
34564 KB |
Output is correct |
18 |
Correct |
111 ms |
34564 KB |
Output is correct |
19 |
Correct |
81 ms |
34564 KB |
Output is correct |
20 |
Correct |
79 ms |
34564 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
15 ms |
34564 KB |
Output is correct |
2 |
Correct |
15 ms |
34564 KB |
Output is correct |
3 |
Correct |
17 ms |
34564 KB |
Output is correct |
4 |
Correct |
16 ms |
34564 KB |
Output is correct |
5 |
Correct |
17 ms |
34564 KB |
Output is correct |
6 |
Correct |
18 ms |
34564 KB |
Output is correct |
7 |
Correct |
14 ms |
34564 KB |
Output is correct |
8 |
Correct |
14 ms |
34564 KB |
Output is correct |
9 |
Correct |
15 ms |
34564 KB |
Output is correct |
10 |
Correct |
14 ms |
34564 KB |
Output is correct |
11 |
Correct |
14 ms |
34564 KB |
Output is correct |
12 |
Correct |
15 ms |
34564 KB |
Output is correct |
13 |
Correct |
16 ms |
34564 KB |
Output is correct |
14 |
Correct |
16 ms |
34564 KB |
Output is correct |
15 |
Correct |
14 ms |
34564 KB |
Output is correct |
16 |
Correct |
14 ms |
34564 KB |
Output is correct |
17 |
Correct |
15 ms |
34564 KB |
Output is correct |
18 |
Correct |
15 ms |
34564 KB |
Output is correct |
19 |
Correct |
14 ms |
34564 KB |
Output is correct |
20 |
Correct |
17 ms |
34564 KB |
Output is correct |
21 |
Correct |
16 ms |
34564 KB |
Output is correct |
22 |
Correct |
16 ms |
34564 KB |
Output is correct |
23 |
Correct |
15 ms |
34564 KB |
Output is correct |
24 |
Correct |
14 ms |
34564 KB |
Output is correct |
25 |
Correct |
14 ms |
34564 KB |
Output is correct |
26 |
Correct |
14 ms |
34564 KB |
Output is correct |
27 |
Correct |
13 ms |
34564 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
145 ms |
34564 KB |
Output is correct |
2 |
Correct |
181 ms |
34564 KB |
Output is correct |
3 |
Correct |
146 ms |
34564 KB |
Output is correct |
4 |
Correct |
167 ms |
34564 KB |
Output is correct |
5 |
Correct |
156 ms |
34564 KB |
Output is correct |
6 |
Correct |
124 ms |
34564 KB |
Output is correct |
7 |
Correct |
116 ms |
34564 KB |
Output is correct |
8 |
Correct |
110 ms |
34564 KB |
Output is correct |
9 |
Correct |
117 ms |
34564 KB |
Output is correct |
10 |
Correct |
108 ms |
34564 KB |
Output is correct |
11 |
Correct |
112 ms |
34564 KB |
Output is correct |
12 |
Correct |
110 ms |
34564 KB |
Output is correct |
13 |
Correct |
118 ms |
34564 KB |
Output is correct |
14 |
Correct |
105 ms |
34564 KB |
Output is correct |
15 |
Correct |
159 ms |
34564 KB |
Output is correct |
16 |
Correct |
181 ms |
34564 KB |
Output is correct |
17 |
Correct |
179 ms |
34564 KB |
Output is correct |
18 |
Correct |
170 ms |
34564 KB |
Output is correct |
19 |
Correct |
180 ms |
34564 KB |
Output is correct |
20 |
Correct |
143 ms |
34564 KB |
Output is correct |
21 |
Correct |
191 ms |
34564 KB |
Output is correct |
22 |
Correct |
126 ms |
34564 KB |
Output is correct |
23 |
Correct |
121 ms |
34564 KB |
Output is correct |
24 |
Correct |
131 ms |
34564 KB |
Output is correct |
25 |
Correct |
165 ms |
34564 KB |
Output is correct |
26 |
Correct |
144 ms |
34564 KB |
Output is correct |
27 |
Correct |
148 ms |
34564 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
15 ms |
14456 KB |
Output is correct |
2 |
Correct |
17 ms |
14520 KB |
Output is correct |
3 |
Correct |
16 ms |
14520 KB |
Output is correct |
4 |
Correct |
15 ms |
14544 KB |
Output is correct |
5 |
Correct |
15 ms |
14588 KB |
Output is correct |
6 |
Correct |
15 ms |
14588 KB |
Output is correct |
7 |
Correct |
14 ms |
14592 KB |
Output is correct |
8 |
Correct |
15 ms |
14592 KB |
Output is correct |
9 |
Correct |
15 ms |
14592 KB |
Output is correct |
10 |
Correct |
15 ms |
14600 KB |
Output is correct |
11 |
Correct |
14 ms |
14624 KB |
Output is correct |
12 |
Correct |
18 ms |
14624 KB |
Output is correct |
13 |
Correct |
18 ms |
14700 KB |
Output is correct |
14 |
Correct |
14 ms |
14700 KB |
Output is correct |
15 |
Correct |
14 ms |
14700 KB |
Output is correct |
16 |
Correct |
16 ms |
14700 KB |
Output is correct |
17 |
Correct |
16 ms |
14700 KB |
Output is correct |
18 |
Correct |
18 ms |
14700 KB |
Output is correct |
19 |
Correct |
15 ms |
14700 KB |
Output is correct |
20 |
Correct |
14 ms |
14700 KB |
Output is correct |
21 |
Correct |
14 ms |
14700 KB |
Output is correct |
22 |
Correct |
15 ms |
14716 KB |
Output is correct |
23 |
Correct |
19 ms |
14716 KB |
Output is correct |
24 |
Correct |
16 ms |
14716 KB |
Output is correct |
25 |
Correct |
16 ms |
14716 KB |
Output is correct |
26 |
Correct |
15 ms |
14716 KB |
Output is correct |
27 |
Correct |
16 ms |
14716 KB |
Output is correct |
28 |
Correct |
15 ms |
14716 KB |
Output is correct |
29 |
Correct |
15 ms |
14788 KB |
Output is correct |
30 |
Correct |
17 ms |
14788 KB |
Output is correct |
31 |
Correct |
14 ms |
14788 KB |
Output is correct |
32 |
Correct |
15 ms |
14788 KB |
Output is correct |
33 |
Correct |
13 ms |
14964 KB |
Output is correct |
34 |
Correct |
14 ms |
14964 KB |
Output is correct |
35 |
Correct |
14 ms |
14964 KB |
Output is correct |
36 |
Correct |
16 ms |
14964 KB |
Output is correct |
37 |
Correct |
15 ms |
14964 KB |
Output is correct |
38 |
Correct |
15 ms |
14964 KB |
Output is correct |
39 |
Correct |
14 ms |
14964 KB |
Output is correct |
40 |
Correct |
15 ms |
14964 KB |
Output is correct |
41 |
Correct |
17 ms |
14964 KB |
Output is correct |
42 |
Correct |
16 ms |
14964 KB |
Output is correct |
43 |
Correct |
15 ms |
14964 KB |
Output is correct |
44 |
Correct |
14 ms |
14964 KB |
Output is correct |
45 |
Correct |
15 ms |
14964 KB |
Output is correct |
46 |
Correct |
17 ms |
14964 KB |
Output is correct |
47 |
Correct |
14 ms |
14964 KB |
Output is correct |
48 |
Correct |
17 ms |
14964 KB |
Output is correct |
49 |
Correct |
14 ms |
14964 KB |
Output is correct |
50 |
Correct |
15 ms |
14964 KB |
Output is correct |
51 |
Correct |
17 ms |
14964 KB |
Output is correct |
52 |
Correct |
17 ms |
14964 KB |
Output is correct |
53 |
Correct |
15 ms |
14964 KB |
Output is correct |
54 |
Correct |
16 ms |
14964 KB |
Output is correct |
55 |
Correct |
15 ms |
14964 KB |
Output is correct |
56 |
Correct |
15 ms |
14964 KB |
Output is correct |
57 |
Correct |
14 ms |
14964 KB |
Output is correct |
58 |
Correct |
17 ms |
14964 KB |
Output is correct |
59 |
Correct |
17 ms |
14964 KB |
Output is correct |
60 |
Correct |
14 ms |
14964 KB |
Output is correct |
61 |
Correct |
13 ms |
14964 KB |
Output is correct |
62 |
Correct |
15 ms |
14964 KB |
Output is correct |
63 |
Correct |
17 ms |
14964 KB |
Output is correct |
64 |
Correct |
15 ms |
14964 KB |
Output is correct |
65 |
Correct |
14 ms |
14964 KB |
Output is correct |
66 |
Correct |
14 ms |
34564 KB |
Output is correct |
67 |
Correct |
15 ms |
34564 KB |
Output is correct |
68 |
Correct |
16 ms |
34564 KB |
Output is correct |
69 |
Correct |
18 ms |
34564 KB |
Output is correct |
70 |
Correct |
17 ms |
34564 KB |
Output is correct |
71 |
Correct |
16 ms |
34564 KB |
Output is correct |
72 |
Correct |
16 ms |
34564 KB |
Output is correct |
73 |
Correct |
16 ms |
34564 KB |
Output is correct |
74 |
Correct |
14 ms |
34564 KB |
Output is correct |
75 |
Correct |
15 ms |
34564 KB |
Output is correct |
76 |
Correct |
13 ms |
34564 KB |
Output is correct |
77 |
Correct |
15 ms |
34564 KB |
Output is correct |
78 |
Correct |
15 ms |
34564 KB |
Output is correct |
79 |
Correct |
14 ms |
34564 KB |
Output is correct |
80 |
Correct |
15 ms |
34564 KB |
Output is correct |
81 |
Correct |
14 ms |
34564 KB |
Output is correct |
82 |
Correct |
14 ms |
34564 KB |
Output is correct |
83 |
Correct |
16 ms |
34564 KB |
Output is correct |
84 |
Correct |
15 ms |
34564 KB |
Output is correct |
85 |
Correct |
17 ms |
34564 KB |
Output is correct |
86 |
Correct |
15 ms |
34564 KB |
Output is correct |
87 |
Correct |
14 ms |
34564 KB |
Output is correct |
88 |
Correct |
15 ms |
34564 KB |
Output is correct |
89 |
Correct |
15 ms |
34564 KB |
Output is correct |
90 |
Correct |
14 ms |
34564 KB |
Output is correct |
91 |
Correct |
14 ms |
34564 KB |
Output is correct |
92 |
Correct |
18 ms |
34564 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
15 ms |
14456 KB |
Output is correct |
2 |
Correct |
17 ms |
14520 KB |
Output is correct |
3 |
Correct |
16 ms |
14520 KB |
Output is correct |
4 |
Correct |
15 ms |
14544 KB |
Output is correct |
5 |
Correct |
15 ms |
14588 KB |
Output is correct |
6 |
Correct |
15 ms |
14588 KB |
Output is correct |
7 |
Correct |
14 ms |
14592 KB |
Output is correct |
8 |
Correct |
15 ms |
14592 KB |
Output is correct |
9 |
Correct |
15 ms |
14592 KB |
Output is correct |
10 |
Correct |
15 ms |
14600 KB |
Output is correct |
11 |
Correct |
14 ms |
14624 KB |
Output is correct |
12 |
Correct |
18 ms |
14624 KB |
Output is correct |
13 |
Correct |
18 ms |
14700 KB |
Output is correct |
14 |
Correct |
14 ms |
14700 KB |
Output is correct |
15 |
Correct |
14 ms |
14700 KB |
Output is correct |
16 |
Correct |
16 ms |
14700 KB |
Output is correct |
17 |
Correct |
16 ms |
14700 KB |
Output is correct |
18 |
Correct |
18 ms |
14700 KB |
Output is correct |
19 |
Correct |
15 ms |
14700 KB |
Output is correct |
20 |
Correct |
14 ms |
14700 KB |
Output is correct |
21 |
Correct |
14 ms |
14700 KB |
Output is correct |
22 |
Correct |
15 ms |
14716 KB |
Output is correct |
23 |
Correct |
19 ms |
14716 KB |
Output is correct |
24 |
Correct |
16 ms |
14716 KB |
Output is correct |
25 |
Correct |
16 ms |
14716 KB |
Output is correct |
26 |
Correct |
15 ms |
14716 KB |
Output is correct |
27 |
Correct |
16 ms |
14716 KB |
Output is correct |
28 |
Correct |
15 ms |
14716 KB |
Output is correct |
29 |
Correct |
15 ms |
14788 KB |
Output is correct |
30 |
Correct |
17 ms |
14788 KB |
Output is correct |
31 |
Correct |
14 ms |
14788 KB |
Output is correct |
32 |
Correct |
15 ms |
14788 KB |
Output is correct |
33 |
Correct |
13 ms |
14964 KB |
Output is correct |
34 |
Correct |
14 ms |
14964 KB |
Output is correct |
35 |
Correct |
14 ms |
14964 KB |
Output is correct |
36 |
Correct |
16 ms |
14964 KB |
Output is correct |
37 |
Correct |
15 ms |
14964 KB |
Output is correct |
38 |
Correct |
15 ms |
14964 KB |
Output is correct |
39 |
Correct |
14 ms |
14964 KB |
Output is correct |
40 |
Correct |
15 ms |
14964 KB |
Output is correct |
41 |
Correct |
17 ms |
14964 KB |
Output is correct |
42 |
Correct |
16 ms |
14964 KB |
Output is correct |
43 |
Correct |
15 ms |
14964 KB |
Output is correct |
44 |
Correct |
14 ms |
14964 KB |
Output is correct |
45 |
Correct |
15 ms |
14964 KB |
Output is correct |
46 |
Correct |
17 ms |
14964 KB |
Output is correct |
47 |
Correct |
14 ms |
14964 KB |
Output is correct |
48 |
Correct |
17 ms |
14964 KB |
Output is correct |
49 |
Correct |
14 ms |
14964 KB |
Output is correct |
50 |
Correct |
15 ms |
14964 KB |
Output is correct |
51 |
Correct |
17 ms |
14964 KB |
Output is correct |
52 |
Correct |
17 ms |
14964 KB |
Output is correct |
53 |
Correct |
15 ms |
14964 KB |
Output is correct |
54 |
Correct |
16 ms |
14964 KB |
Output is correct |
55 |
Correct |
15 ms |
14964 KB |
Output is correct |
56 |
Correct |
15 ms |
14964 KB |
Output is correct |
57 |
Correct |
14 ms |
14964 KB |
Output is correct |
58 |
Correct |
17 ms |
14964 KB |
Output is correct |
59 |
Correct |
17 ms |
14964 KB |
Output is correct |
60 |
Correct |
14 ms |
14964 KB |
Output is correct |
61 |
Correct |
13 ms |
14964 KB |
Output is correct |
62 |
Correct |
15 ms |
14964 KB |
Output is correct |
63 |
Correct |
17 ms |
14964 KB |
Output is correct |
64 |
Correct |
15 ms |
14964 KB |
Output is correct |
65 |
Correct |
14 ms |
14964 KB |
Output is correct |
66 |
Correct |
137 ms |
25604 KB |
Output is correct |
67 |
Correct |
106 ms |
25732 KB |
Output is correct |
68 |
Correct |
170 ms |
29188 KB |
Output is correct |
69 |
Correct |
158 ms |
29188 KB |
Output is correct |
70 |
Correct |
163 ms |
29188 KB |
Output is correct |
71 |
Correct |
137 ms |
29188 KB |
Output is correct |
72 |
Correct |
139 ms |
29188 KB |
Output is correct |
73 |
Correct |
163 ms |
29188 KB |
Output is correct |
74 |
Correct |
136 ms |
29188 KB |
Output is correct |
75 |
Correct |
152 ms |
29188 KB |
Output is correct |
76 |
Correct |
103 ms |
29188 KB |
Output is correct |
77 |
Correct |
99 ms |
29188 KB |
Output is correct |
78 |
Correct |
94 ms |
29188 KB |
Output is correct |
79 |
Correct |
92 ms |
29188 KB |
Output is correct |
80 |
Correct |
110 ms |
29188 KB |
Output is correct |
81 |
Correct |
84 ms |
29188 KB |
Output is correct |
82 |
Correct |
18 ms |
29188 KB |
Output is correct |
83 |
Correct |
21 ms |
29188 KB |
Output is correct |
84 |
Correct |
18 ms |
29188 KB |
Output is correct |
85 |
Correct |
22 ms |
29188 KB |
Output is correct |
86 |
Correct |
17 ms |
29188 KB |
Output is correct |
87 |
Correct |
18 ms |
29188 KB |
Output is correct |
88 |
Correct |
15 ms |
29188 KB |
Output is correct |
89 |
Correct |
15 ms |
29188 KB |
Output is correct |
90 |
Correct |
16 ms |
29188 KB |
Output is correct |
91 |
Correct |
14 ms |
29188 KB |
Output is correct |
92 |
Correct |
16 ms |
29188 KB |
Output is correct |
93 |
Correct |
18 ms |
29188 KB |
Output is correct |
94 |
Correct |
15 ms |
29188 KB |
Output is correct |
95 |
Correct |
16 ms |
29188 KB |
Output is correct |
96 |
Correct |
17 ms |
29188 KB |
Output is correct |
97 |
Correct |
17 ms |
29188 KB |
Output is correct |
98 |
Correct |
16 ms |
29188 KB |
Output is correct |
99 |
Correct |
15 ms |
29188 KB |
Output is correct |
100 |
Correct |
17 ms |
29188 KB |
Output is correct |
101 |
Correct |
17 ms |
29188 KB |
Output is correct |
102 |
Correct |
17 ms |
29188 KB |
Output is correct |
103 |
Correct |
16 ms |
29188 KB |
Output is correct |
104 |
Correct |
14 ms |
29188 KB |
Output is correct |
105 |
Correct |
18 ms |
29188 KB |
Output is correct |
106 |
Correct |
17 ms |
29188 KB |
Output is correct |
107 |
Correct |
16 ms |
29188 KB |
Output is correct |
108 |
Correct |
146 ms |
29188 KB |
Output is correct |
109 |
Correct |
166 ms |
29188 KB |
Output is correct |
110 |
Correct |
147 ms |
29188 KB |
Output is correct |
111 |
Correct |
152 ms |
29188 KB |
Output is correct |
112 |
Correct |
133 ms |
29188 KB |
Output is correct |
113 |
Correct |
153 ms |
34564 KB |
Output is correct |
114 |
Correct |
163 ms |
34564 KB |
Output is correct |
115 |
Correct |
196 ms |
34564 KB |
Output is correct |
116 |
Correct |
166 ms |
34564 KB |
Output is correct |
117 |
Correct |
136 ms |
34564 KB |
Output is correct |
118 |
Correct |
192 ms |
34564 KB |
Output is correct |
119 |
Correct |
136 ms |
34564 KB |
Output is correct |
120 |
Correct |
130 ms |
34564 KB |
Output is correct |
121 |
Correct |
133 ms |
34564 KB |
Output is correct |
122 |
Correct |
105 ms |
34564 KB |
Output is correct |
123 |
Correct |
69 ms |
34564 KB |
Output is correct |
124 |
Correct |
80 ms |
34564 KB |
Output is correct |
125 |
Correct |
111 ms |
34564 KB |
Output is correct |
126 |
Correct |
81 ms |
34564 KB |
Output is correct |
127 |
Correct |
79 ms |
34564 KB |
Output is correct |
128 |
Correct |
15 ms |
34564 KB |
Output is correct |
129 |
Correct |
15 ms |
34564 KB |
Output is correct |
130 |
Correct |
17 ms |
34564 KB |
Output is correct |
131 |
Correct |
16 ms |
34564 KB |
Output is correct |
132 |
Correct |
17 ms |
34564 KB |
Output is correct |
133 |
Correct |
18 ms |
34564 KB |
Output is correct |
134 |
Correct |
14 ms |
34564 KB |
Output is correct |
135 |
Correct |
14 ms |
34564 KB |
Output is correct |
136 |
Correct |
15 ms |
34564 KB |
Output is correct |
137 |
Correct |
14 ms |
34564 KB |
Output is correct |
138 |
Correct |
14 ms |
34564 KB |
Output is correct |
139 |
Correct |
15 ms |
34564 KB |
Output is correct |
140 |
Correct |
16 ms |
34564 KB |
Output is correct |
141 |
Correct |
16 ms |
34564 KB |
Output is correct |
142 |
Correct |
14 ms |
34564 KB |
Output is correct |
143 |
Correct |
14 ms |
34564 KB |
Output is correct |
144 |
Correct |
15 ms |
34564 KB |
Output is correct |
145 |
Correct |
15 ms |
34564 KB |
Output is correct |
146 |
Correct |
14 ms |
34564 KB |
Output is correct |
147 |
Correct |
17 ms |
34564 KB |
Output is correct |
148 |
Correct |
16 ms |
34564 KB |
Output is correct |
149 |
Correct |
16 ms |
34564 KB |
Output is correct |
150 |
Correct |
15 ms |
34564 KB |
Output is correct |
151 |
Correct |
14 ms |
34564 KB |
Output is correct |
152 |
Correct |
14 ms |
34564 KB |
Output is correct |
153 |
Correct |
14 ms |
34564 KB |
Output is correct |
154 |
Correct |
13 ms |
34564 KB |
Output is correct |
155 |
Correct |
145 ms |
34564 KB |
Output is correct |
156 |
Correct |
181 ms |
34564 KB |
Output is correct |
157 |
Correct |
146 ms |
34564 KB |
Output is correct |
158 |
Correct |
167 ms |
34564 KB |
Output is correct |
159 |
Correct |
156 ms |
34564 KB |
Output is correct |
160 |
Correct |
124 ms |
34564 KB |
Output is correct |
161 |
Correct |
116 ms |
34564 KB |
Output is correct |
162 |
Correct |
110 ms |
34564 KB |
Output is correct |
163 |
Correct |
117 ms |
34564 KB |
Output is correct |
164 |
Correct |
108 ms |
34564 KB |
Output is correct |
165 |
Correct |
112 ms |
34564 KB |
Output is correct |
166 |
Correct |
110 ms |
34564 KB |
Output is correct |
167 |
Correct |
118 ms |
34564 KB |
Output is correct |
168 |
Correct |
105 ms |
34564 KB |
Output is correct |
169 |
Correct |
159 ms |
34564 KB |
Output is correct |
170 |
Correct |
181 ms |
34564 KB |
Output is correct |
171 |
Correct |
179 ms |
34564 KB |
Output is correct |
172 |
Correct |
170 ms |
34564 KB |
Output is correct |
173 |
Correct |
180 ms |
34564 KB |
Output is correct |
174 |
Correct |
143 ms |
34564 KB |
Output is correct |
175 |
Correct |
191 ms |
34564 KB |
Output is correct |
176 |
Correct |
126 ms |
34564 KB |
Output is correct |
177 |
Correct |
121 ms |
34564 KB |
Output is correct |
178 |
Correct |
131 ms |
34564 KB |
Output is correct |
179 |
Correct |
165 ms |
34564 KB |
Output is correct |
180 |
Correct |
144 ms |
34564 KB |
Output is correct |
181 |
Correct |
148 ms |
34564 KB |
Output is correct |
182 |
Correct |
14 ms |
34564 KB |
Output is correct |
183 |
Correct |
15 ms |
34564 KB |
Output is correct |
184 |
Correct |
16 ms |
34564 KB |
Output is correct |
185 |
Correct |
18 ms |
34564 KB |
Output is correct |
186 |
Correct |
17 ms |
34564 KB |
Output is correct |
187 |
Correct |
16 ms |
34564 KB |
Output is correct |
188 |
Correct |
16 ms |
34564 KB |
Output is correct |
189 |
Correct |
16 ms |
34564 KB |
Output is correct |
190 |
Correct |
14 ms |
34564 KB |
Output is correct |
191 |
Correct |
15 ms |
34564 KB |
Output is correct |
192 |
Correct |
13 ms |
34564 KB |
Output is correct |
193 |
Correct |
15 ms |
34564 KB |
Output is correct |
194 |
Correct |
15 ms |
34564 KB |
Output is correct |
195 |
Correct |
14 ms |
34564 KB |
Output is correct |
196 |
Correct |
15 ms |
34564 KB |
Output is correct |
197 |
Correct |
14 ms |
34564 KB |
Output is correct |
198 |
Correct |
14 ms |
34564 KB |
Output is correct |
199 |
Correct |
16 ms |
34564 KB |
Output is correct |
200 |
Correct |
15 ms |
34564 KB |
Output is correct |
201 |
Correct |
17 ms |
34564 KB |
Output is correct |
202 |
Correct |
15 ms |
34564 KB |
Output is correct |
203 |
Correct |
14 ms |
34564 KB |
Output is correct |
204 |
Correct |
15 ms |
34564 KB |
Output is correct |
205 |
Correct |
15 ms |
34564 KB |
Output is correct |
206 |
Correct |
14 ms |
34564 KB |
Output is correct |
207 |
Correct |
14 ms |
34564 KB |
Output is correct |
208 |
Correct |
18 ms |
34564 KB |
Output is correct |
209 |
Correct |
18 ms |
34564 KB |
Output is correct |
210 |
Correct |
78 ms |
34564 KB |
Output is correct |
211 |
Correct |
106 ms |
34564 KB |
Output is correct |
212 |
Correct |
152 ms |
34564 KB |
Output is correct |
213 |
Correct |
228 ms |
34564 KB |
Output is correct |
214 |
Correct |
71 ms |
34564 KB |
Output is correct |
215 |
Correct |
78 ms |
34564 KB |
Output is correct |
216 |
Correct |
145 ms |
34564 KB |
Output is correct |
217 |
Correct |
146 ms |
34564 KB |
Output is correct |
218 |
Correct |
138 ms |
34564 KB |
Output is correct |
219 |
Correct |
125 ms |
34564 KB |
Output is correct |
220 |
Correct |
118 ms |
34564 KB |
Output is correct |
221 |
Correct |
127 ms |
34564 KB |
Output is correct |
222 |
Correct |
123 ms |
34564 KB |
Output is correct |
223 |
Correct |
176 ms |
34564 KB |
Output is correct |
224 |
Correct |
179 ms |
34564 KB |
Output is correct |
225 |
Correct |
171 ms |
34564 KB |
Output is correct |
226 |
Correct |
163 ms |
34564 KB |
Output is correct |
227 |
Correct |
163 ms |
34564 KB |
Output is correct |
228 |
Correct |
162 ms |
34564 KB |
Output is correct |
229 |
Correct |
125 ms |
34564 KB |
Output is correct |
230 |
Correct |
135 ms |
34564 KB |
Output is correct |
231 |
Correct |
173 ms |
34564 KB |
Output is correct |