#include<bits/stdc++.h>
using namespace std;
#define int long long
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define pii pair<int,int>
#define pb push_back
#define sz(x) (int)(x.size())
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define vi vector<int>
#define vp vector<pii>
#define vvi vector<vi>
#define ykh mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count())
#define __lg(x) 63-__builtin_clzll(x)
#define pow2(x) (1LL<<x)
void __print(int x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
void setIO(string s) {
freopen((s + ".in").c_str(), "r", stdin);
freopen((s + ".out").c_str(), "w", stdout);
}
#ifdef local
void CHECK();
void setio(){
freopen("/Users/iantsai/cpp/input.txt","r",stdin);
freopen("/Users/iantsai/cpp/output.txt","w",stdout);
}
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
void setio(){}
#define debug(x...)
#endif
#define TOI_is_so_de ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);setio();
const int mxn = 2e5+5;
vector<int>adj[mxn], st, adj2[mxn];
int n, m, low[mxn], lv[mxn], tmr = 0, w[mxn], cnt, siz[mxn], num;
void tarjan(int v, int pa = -1){
st.pb(v);
w[v] = -1;
low[v] = lv[v] = ++tmr;
num++;
for(auto u : adj[v]){
if(u == pa) continue;
if(lv[u]){
chmin(low[v], lv[u]);
}
else{
tarjan(u, v);
chmin(low[v], low[u]);
if(low[u] >= lv[v]){
cnt++;
int k;
do{
k = st.back();
st.pop_back();
adj2[k].pb(cnt);
adj2[cnt].pb(k);
} while(k != u);
adj2[v].pb(cnt);
adj2[cnt].pb(v);
w[cnt] = sz(adj2[cnt]);
}
}
}
}
int dp[mxn];
void dfs(int v, int pa = -1){
siz[v] = (v <= n);
for(auto u : adj2[v]){
if(u == pa) continue;
dfs(u, v);
dp[v] += siz[v] * siz[u] * w[v] * 2;
siz[v] += siz[u];
}
dp[v] += siz[v] * (num - siz[v]) * w[v] * 2;
}
signed main(){
TOI_is_so_de;
cin >> n >> m;
cnt = n;
for(int i=0;i<m;i++){
int a, b;
cin >> a >> b;
adj[a].pb(b);
adj[b].pb(a);
}
int ans = 0;
for(int i=1;i<=n;i++){
if(!lv[i]) {
num = 0;
tarjan(i);
dfs(i);
}
}
for(int i=1;i<=2*n;i++){
ans += dp[i];
//cerr << w[i] << ',' << lv[i] << ',' << dp[i] << '\n';
}
cout << ans << '\n';
#ifdef local
CHECK();
#endif
}
/*
input:
*/
#ifdef local
void CHECK(){
cerr << "\n[Time]: " << 1000.0 * clock() / CLOCKS_PER_SEC << " ms.\n";
function<bool(string,string)> compareFiles = [](string p1, string p2)->bool {
std::ifstream file1(p1);
std::ifstream file2(p2);
if (!file1.is_open() || !file2.is_open())return false;
std::string line1, line2;
while (getline(file1, line1) && getline(file2, line2)) {
if (line1 != line2)return false;
}
int cnta=0,cntb=0;
while(getline(file1,line1))cnta++;
while(getline(file2,line2))cntb++;
return cntb-cnta<=1;
};
bool check = compareFiles("output.txt","expected.txt");
if (check) cerr<<"ACCEPTED\n";
else cerr<<"WRONG ANSWER!\n";
}
#else
#endif
Compilation message
count_triplets.cpp: In function 'void setIO(std::string)':
count_triplets.cpp:35:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
35 | freopen((s + ".in").c_str(), "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
count_triplets.cpp:36:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
36 | freopen((s + ".out").c_str(), "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
9824 KB |
Output is correct |
2 |
Correct |
4 ms |
9816 KB |
Output is correct |
3 |
Correct |
4 ms |
9820 KB |
Output is correct |
4 |
Correct |
4 ms |
9820 KB |
Output is correct |
5 |
Correct |
4 ms |
9820 KB |
Output is correct |
6 |
Correct |
4 ms |
9820 KB |
Output is correct |
7 |
Correct |
4 ms |
9820 KB |
Output is correct |
8 |
Correct |
4 ms |
9820 KB |
Output is correct |
9 |
Correct |
4 ms |
9820 KB |
Output is correct |
10 |
Correct |
4 ms |
9820 KB |
Output is correct |
11 |
Correct |
5 ms |
9660 KB |
Output is correct |
12 |
Correct |
4 ms |
9820 KB |
Output is correct |
13 |
Correct |
4 ms |
9816 KB |
Output is correct |
14 |
Correct |
4 ms |
9820 KB |
Output is correct |
15 |
Correct |
5 ms |
9820 KB |
Output is correct |
16 |
Correct |
4 ms |
9816 KB |
Output is correct |
17 |
Correct |
6 ms |
9820 KB |
Output is correct |
18 |
Correct |
4 ms |
9888 KB |
Output is correct |
19 |
Correct |
4 ms |
9820 KB |
Output is correct |
20 |
Correct |
4 ms |
9820 KB |
Output is correct |
21 |
Correct |
4 ms |
9820 KB |
Output is correct |
22 |
Correct |
4 ms |
9820 KB |
Output is correct |
23 |
Correct |
4 ms |
9808 KB |
Output is correct |
24 |
Correct |
4 ms |
9892 KB |
Output is correct |
25 |
Correct |
4 ms |
9892 KB |
Output is correct |
26 |
Correct |
4 ms |
9820 KB |
Output is correct |
27 |
Correct |
4 ms |
9648 KB |
Output is correct |
28 |
Correct |
4 ms |
9816 KB |
Output is correct |
29 |
Correct |
4 ms |
9820 KB |
Output is correct |
30 |
Correct |
4 ms |
9820 KB |
Output is correct |
31 |
Correct |
4 ms |
9824 KB |
Output is correct |
32 |
Correct |
4 ms |
9824 KB |
Output is correct |
33 |
Correct |
4 ms |
9824 KB |
Output is correct |
34 |
Correct |
4 ms |
9824 KB |
Output is correct |
35 |
Correct |
4 ms |
9824 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
9824 KB |
Output is correct |
2 |
Correct |
4 ms |
9816 KB |
Output is correct |
3 |
Correct |
4 ms |
9820 KB |
Output is correct |
4 |
Correct |
4 ms |
9820 KB |
Output is correct |
5 |
Correct |
4 ms |
9820 KB |
Output is correct |
6 |
Correct |
4 ms |
9820 KB |
Output is correct |
7 |
Correct |
4 ms |
9820 KB |
Output is correct |
8 |
Correct |
4 ms |
9820 KB |
Output is correct |
9 |
Correct |
4 ms |
9820 KB |
Output is correct |
10 |
Correct |
4 ms |
9820 KB |
Output is correct |
11 |
Correct |
5 ms |
9660 KB |
Output is correct |
12 |
Correct |
4 ms |
9820 KB |
Output is correct |
13 |
Correct |
4 ms |
9816 KB |
Output is correct |
14 |
Correct |
4 ms |
9820 KB |
Output is correct |
15 |
Correct |
5 ms |
9820 KB |
Output is correct |
16 |
Correct |
4 ms |
9816 KB |
Output is correct |
17 |
Correct |
6 ms |
9820 KB |
Output is correct |
18 |
Correct |
4 ms |
9888 KB |
Output is correct |
19 |
Correct |
4 ms |
9820 KB |
Output is correct |
20 |
Correct |
4 ms |
9820 KB |
Output is correct |
21 |
Correct |
4 ms |
9820 KB |
Output is correct |
22 |
Correct |
4 ms |
9820 KB |
Output is correct |
23 |
Correct |
4 ms |
9808 KB |
Output is correct |
24 |
Correct |
4 ms |
9892 KB |
Output is correct |
25 |
Correct |
4 ms |
9892 KB |
Output is correct |
26 |
Correct |
4 ms |
9820 KB |
Output is correct |
27 |
Correct |
4 ms |
9648 KB |
Output is correct |
28 |
Correct |
4 ms |
9816 KB |
Output is correct |
29 |
Correct |
4 ms |
9820 KB |
Output is correct |
30 |
Correct |
4 ms |
9820 KB |
Output is correct |
31 |
Correct |
4 ms |
9824 KB |
Output is correct |
32 |
Correct |
4 ms |
9824 KB |
Output is correct |
33 |
Correct |
4 ms |
9824 KB |
Output is correct |
34 |
Correct |
4 ms |
9824 KB |
Output is correct |
35 |
Correct |
4 ms |
9824 KB |
Output is correct |
36 |
Correct |
4 ms |
9824 KB |
Output is correct |
37 |
Correct |
4 ms |
9896 KB |
Output is correct |
38 |
Correct |
4 ms |
9824 KB |
Output is correct |
39 |
Correct |
4 ms |
9816 KB |
Output is correct |
40 |
Correct |
4 ms |
9820 KB |
Output is correct |
41 |
Correct |
4 ms |
9816 KB |
Output is correct |
42 |
Correct |
4 ms |
9820 KB |
Output is correct |
43 |
Correct |
4 ms |
9820 KB |
Output is correct |
44 |
Correct |
5 ms |
9820 KB |
Output is correct |
45 |
Correct |
5 ms |
9832 KB |
Output is correct |
46 |
Correct |
4 ms |
9832 KB |
Output is correct |
47 |
Correct |
4 ms |
9816 KB |
Output is correct |
48 |
Correct |
6 ms |
9820 KB |
Output is correct |
49 |
Correct |
4 ms |
9788 KB |
Output is correct |
50 |
Correct |
4 ms |
9816 KB |
Output is correct |
51 |
Correct |
4 ms |
9816 KB |
Output is correct |
52 |
Correct |
4 ms |
9820 KB |
Output is correct |
53 |
Correct |
4 ms |
9820 KB |
Output is correct |
54 |
Correct |
6 ms |
9820 KB |
Output is correct |
55 |
Correct |
5 ms |
9820 KB |
Output is correct |
56 |
Correct |
4 ms |
9816 KB |
Output is correct |
57 |
Correct |
4 ms |
9820 KB |
Output is correct |
58 |
Correct |
4 ms |
9816 KB |
Output is correct |
59 |
Correct |
6 ms |
9856 KB |
Output is correct |
60 |
Correct |
4 ms |
9860 KB |
Output is correct |
61 |
Correct |
5 ms |
9820 KB |
Output is correct |
62 |
Correct |
4 ms |
9820 KB |
Output is correct |
63 |
Correct |
4 ms |
9848 KB |
Output is correct |
64 |
Correct |
4 ms |
9820 KB |
Output is correct |
65 |
Correct |
4 ms |
9820 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
50 ms |
33224 KB |
Output is correct |
2 |
Correct |
70 ms |
33732 KB |
Output is correct |
3 |
Correct |
56 ms |
31248 KB |
Output is correct |
4 |
Correct |
54 ms |
32132 KB |
Output is correct |
5 |
Correct |
88 ms |
27848 KB |
Output is correct |
6 |
Correct |
58 ms |
29964 KB |
Output is correct |
7 |
Correct |
54 ms |
28036 KB |
Output is correct |
8 |
Correct |
58 ms |
28460 KB |
Output is correct |
9 |
Correct |
56 ms |
26452 KB |
Output is correct |
10 |
Correct |
52 ms |
26636 KB |
Output is correct |
11 |
Correct |
42 ms |
24016 KB |
Output is correct |
12 |
Correct |
44 ms |
24012 KB |
Output is correct |
13 |
Correct |
41 ms |
23840 KB |
Output is correct |
14 |
Correct |
47 ms |
23504 KB |
Output is correct |
15 |
Correct |
36 ms |
22196 KB |
Output is correct |
16 |
Correct |
30 ms |
21960 KB |
Output is correct |
17 |
Correct |
7 ms |
14560 KB |
Output is correct |
18 |
Correct |
7 ms |
14656 KB |
Output is correct |
19 |
Correct |
7 ms |
14556 KB |
Output is correct |
20 |
Correct |
7 ms |
14556 KB |
Output is correct |
21 |
Correct |
7 ms |
14548 KB |
Output is correct |
22 |
Correct |
7 ms |
14508 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
10076 KB |
Output is correct |
2 |
Correct |
4 ms |
10076 KB |
Output is correct |
3 |
Correct |
4 ms |
9820 KB |
Output is correct |
4 |
Correct |
4 ms |
10076 KB |
Output is correct |
5 |
Correct |
4 ms |
10076 KB |
Output is correct |
6 |
Correct |
4 ms |
10076 KB |
Output is correct |
7 |
Correct |
4 ms |
10076 KB |
Output is correct |
8 |
Correct |
4 ms |
10076 KB |
Output is correct |
9 |
Correct |
4 ms |
10112 KB |
Output is correct |
10 |
Correct |
5 ms |
9820 KB |
Output is correct |
11 |
Correct |
5 ms |
9836 KB |
Output is correct |
12 |
Correct |
4 ms |
9820 KB |
Output is correct |
13 |
Correct |
4 ms |
10068 KB |
Output is correct |
14 |
Correct |
5 ms |
9820 KB |
Output is correct |
15 |
Correct |
5 ms |
9820 KB |
Output is correct |
16 |
Correct |
4 ms |
9876 KB |
Output is correct |
17 |
Correct |
4 ms |
10076 KB |
Output is correct |
18 |
Correct |
4 ms |
9912 KB |
Output is correct |
19 |
Correct |
4 ms |
10076 KB |
Output is correct |
20 |
Correct |
4 ms |
10076 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
72 ms |
27436 KB |
Output is correct |
2 |
Correct |
59 ms |
27988 KB |
Output is correct |
3 |
Correct |
56 ms |
27732 KB |
Output is correct |
4 |
Correct |
56 ms |
27728 KB |
Output is correct |
5 |
Correct |
57 ms |
27748 KB |
Output is correct |
6 |
Correct |
65 ms |
35532 KB |
Output is correct |
7 |
Correct |
68 ms |
33460 KB |
Output is correct |
8 |
Correct |
68 ms |
31908 KB |
Output is correct |
9 |
Correct |
68 ms |
30544 KB |
Output is correct |
10 |
Correct |
55 ms |
27732 KB |
Output is correct |
11 |
Correct |
56 ms |
27732 KB |
Output is correct |
12 |
Correct |
54 ms |
27736 KB |
Output is correct |
13 |
Correct |
58 ms |
27728 KB |
Output is correct |
14 |
Correct |
52 ms |
26960 KB |
Output is correct |
15 |
Correct |
42 ms |
25720 KB |
Output is correct |
16 |
Correct |
34 ms |
22216 KB |
Output is correct |
17 |
Correct |
47 ms |
28100 KB |
Output is correct |
18 |
Correct |
41 ms |
28224 KB |
Output is correct |
19 |
Correct |
43 ms |
28624 KB |
Output is correct |
20 |
Correct |
42 ms |
28096 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
9976 KB |
Output is correct |
2 |
Correct |
7 ms |
9820 KB |
Output is correct |
3 |
Correct |
4 ms |
9820 KB |
Output is correct |
4 |
Correct |
4 ms |
9944 KB |
Output is correct |
5 |
Correct |
5 ms |
9820 KB |
Output is correct |
6 |
Correct |
4 ms |
9816 KB |
Output is correct |
7 |
Correct |
4 ms |
9820 KB |
Output is correct |
8 |
Correct |
5 ms |
9904 KB |
Output is correct |
9 |
Correct |
4 ms |
9820 KB |
Output is correct |
10 |
Correct |
4 ms |
9820 KB |
Output is correct |
11 |
Correct |
5 ms |
9832 KB |
Output is correct |
12 |
Correct |
4 ms |
10076 KB |
Output is correct |
13 |
Correct |
4 ms |
10076 KB |
Output is correct |
14 |
Correct |
5 ms |
10076 KB |
Output is correct |
15 |
Correct |
5 ms |
10076 KB |
Output is correct |
16 |
Correct |
4 ms |
9820 KB |
Output is correct |
17 |
Correct |
5 ms |
9820 KB |
Output is correct |
18 |
Correct |
4 ms |
9820 KB |
Output is correct |
19 |
Correct |
4 ms |
9820 KB |
Output is correct |
20 |
Correct |
4 ms |
9820 KB |
Output is correct |
21 |
Correct |
4 ms |
9820 KB |
Output is correct |
22 |
Correct |
4 ms |
9820 KB |
Output is correct |
23 |
Correct |
5 ms |
9820 KB |
Output is correct |
24 |
Correct |
4 ms |
10056 KB |
Output is correct |
25 |
Correct |
5 ms |
9824 KB |
Output is correct |
26 |
Correct |
4 ms |
9824 KB |
Output is correct |
27 |
Correct |
4 ms |
9824 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
57 ms |
27956 KB |
Output is correct |
2 |
Correct |
57 ms |
27736 KB |
Output is correct |
3 |
Correct |
68 ms |
27256 KB |
Output is correct |
4 |
Correct |
60 ms |
26200 KB |
Output is correct |
5 |
Correct |
54 ms |
24580 KB |
Output is correct |
6 |
Correct |
59 ms |
23888 KB |
Output is correct |
7 |
Correct |
48 ms |
23632 KB |
Output is correct |
8 |
Correct |
50 ms |
23124 KB |
Output is correct |
9 |
Correct |
57 ms |
23120 KB |
Output is correct |
10 |
Correct |
46 ms |
22852 KB |
Output is correct |
11 |
Correct |
47 ms |
22612 KB |
Output is correct |
12 |
Correct |
50 ms |
22876 KB |
Output is correct |
13 |
Correct |
46 ms |
22840 KB |
Output is correct |
14 |
Correct |
46 ms |
25288 KB |
Output is correct |
15 |
Correct |
87 ms |
33224 KB |
Output is correct |
16 |
Correct |
65 ms |
31312 KB |
Output is correct |
17 |
Correct |
66 ms |
31776 KB |
Output is correct |
18 |
Correct |
65 ms |
30156 KB |
Output is correct |
19 |
Correct |
59 ms |
26196 KB |
Output is correct |
20 |
Correct |
58 ms |
26192 KB |
Output is correct |
21 |
Correct |
59 ms |
26180 KB |
Output is correct |
22 |
Correct |
58 ms |
25424 KB |
Output is correct |
23 |
Correct |
58 ms |
24272 KB |
Output is correct |
24 |
Correct |
53 ms |
27192 KB |
Output is correct |
25 |
Correct |
59 ms |
27344 KB |
Output is correct |
26 |
Correct |
65 ms |
26572 KB |
Output is correct |
27 |
Correct |
57 ms |
26448 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
9824 KB |
Output is correct |
2 |
Correct |
4 ms |
9816 KB |
Output is correct |
3 |
Correct |
4 ms |
9820 KB |
Output is correct |
4 |
Correct |
4 ms |
9820 KB |
Output is correct |
5 |
Correct |
4 ms |
9820 KB |
Output is correct |
6 |
Correct |
4 ms |
9820 KB |
Output is correct |
7 |
Correct |
4 ms |
9820 KB |
Output is correct |
8 |
Correct |
4 ms |
9820 KB |
Output is correct |
9 |
Correct |
4 ms |
9820 KB |
Output is correct |
10 |
Correct |
4 ms |
9820 KB |
Output is correct |
11 |
Correct |
5 ms |
9660 KB |
Output is correct |
12 |
Correct |
4 ms |
9820 KB |
Output is correct |
13 |
Correct |
4 ms |
9816 KB |
Output is correct |
14 |
Correct |
4 ms |
9820 KB |
Output is correct |
15 |
Correct |
5 ms |
9820 KB |
Output is correct |
16 |
Correct |
4 ms |
9816 KB |
Output is correct |
17 |
Correct |
6 ms |
9820 KB |
Output is correct |
18 |
Correct |
4 ms |
9888 KB |
Output is correct |
19 |
Correct |
4 ms |
9820 KB |
Output is correct |
20 |
Correct |
4 ms |
9820 KB |
Output is correct |
21 |
Correct |
4 ms |
9820 KB |
Output is correct |
22 |
Correct |
4 ms |
9820 KB |
Output is correct |
23 |
Correct |
4 ms |
9808 KB |
Output is correct |
24 |
Correct |
4 ms |
9892 KB |
Output is correct |
25 |
Correct |
4 ms |
9892 KB |
Output is correct |
26 |
Correct |
4 ms |
9820 KB |
Output is correct |
27 |
Correct |
4 ms |
9648 KB |
Output is correct |
28 |
Correct |
4 ms |
9816 KB |
Output is correct |
29 |
Correct |
4 ms |
9820 KB |
Output is correct |
30 |
Correct |
4 ms |
9820 KB |
Output is correct |
31 |
Correct |
4 ms |
9824 KB |
Output is correct |
32 |
Correct |
4 ms |
9824 KB |
Output is correct |
33 |
Correct |
4 ms |
9824 KB |
Output is correct |
34 |
Correct |
4 ms |
9824 KB |
Output is correct |
35 |
Correct |
4 ms |
9824 KB |
Output is correct |
36 |
Correct |
4 ms |
9824 KB |
Output is correct |
37 |
Correct |
4 ms |
9896 KB |
Output is correct |
38 |
Correct |
4 ms |
9824 KB |
Output is correct |
39 |
Correct |
4 ms |
9816 KB |
Output is correct |
40 |
Correct |
4 ms |
9820 KB |
Output is correct |
41 |
Correct |
4 ms |
9816 KB |
Output is correct |
42 |
Correct |
4 ms |
9820 KB |
Output is correct |
43 |
Correct |
4 ms |
9820 KB |
Output is correct |
44 |
Correct |
5 ms |
9820 KB |
Output is correct |
45 |
Correct |
5 ms |
9832 KB |
Output is correct |
46 |
Correct |
4 ms |
9832 KB |
Output is correct |
47 |
Correct |
4 ms |
9816 KB |
Output is correct |
48 |
Correct |
6 ms |
9820 KB |
Output is correct |
49 |
Correct |
4 ms |
9788 KB |
Output is correct |
50 |
Correct |
4 ms |
9816 KB |
Output is correct |
51 |
Correct |
4 ms |
9816 KB |
Output is correct |
52 |
Correct |
4 ms |
9820 KB |
Output is correct |
53 |
Correct |
4 ms |
9820 KB |
Output is correct |
54 |
Correct |
6 ms |
9820 KB |
Output is correct |
55 |
Correct |
5 ms |
9820 KB |
Output is correct |
56 |
Correct |
4 ms |
9816 KB |
Output is correct |
57 |
Correct |
4 ms |
9820 KB |
Output is correct |
58 |
Correct |
4 ms |
9816 KB |
Output is correct |
59 |
Correct |
6 ms |
9856 KB |
Output is correct |
60 |
Correct |
4 ms |
9860 KB |
Output is correct |
61 |
Correct |
5 ms |
9820 KB |
Output is correct |
62 |
Correct |
4 ms |
9820 KB |
Output is correct |
63 |
Correct |
4 ms |
9848 KB |
Output is correct |
64 |
Correct |
4 ms |
9820 KB |
Output is correct |
65 |
Correct |
4 ms |
9820 KB |
Output is correct |
66 |
Correct |
4 ms |
10072 KB |
Output is correct |
67 |
Correct |
4 ms |
9820 KB |
Output is correct |
68 |
Correct |
5 ms |
9816 KB |
Output is correct |
69 |
Correct |
5 ms |
9940 KB |
Output is correct |
70 |
Correct |
5 ms |
10328 KB |
Output is correct |
71 |
Correct |
5 ms |
9820 KB |
Output is correct |
72 |
Correct |
5 ms |
9948 KB |
Output is correct |
73 |
Correct |
4 ms |
9820 KB |
Output is correct |
74 |
Correct |
4 ms |
9944 KB |
Output is correct |
75 |
Correct |
4 ms |
9820 KB |
Output is correct |
76 |
Correct |
4 ms |
9820 KB |
Output is correct |
77 |
Correct |
4 ms |
9820 KB |
Output is correct |
78 |
Correct |
5 ms |
9820 KB |
Output is correct |
79 |
Correct |
6 ms |
9864 KB |
Output is correct |
80 |
Correct |
5 ms |
9816 KB |
Output is correct |
81 |
Correct |
4 ms |
9816 KB |
Output is correct |
82 |
Correct |
4 ms |
10076 KB |
Output is correct |
83 |
Correct |
5 ms |
10076 KB |
Output is correct |
84 |
Correct |
4 ms |
10072 KB |
Output is correct |
85 |
Correct |
5 ms |
10076 KB |
Output is correct |
86 |
Correct |
4 ms |
9820 KB |
Output is correct |
87 |
Correct |
4 ms |
9820 KB |
Output is correct |
88 |
Correct |
5 ms |
9820 KB |
Output is correct |
89 |
Correct |
4 ms |
9984 KB |
Output is correct |
90 |
Correct |
5 ms |
9820 KB |
Output is correct |
91 |
Correct |
5 ms |
9892 KB |
Output is correct |
92 |
Correct |
4 ms |
9820 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
9824 KB |
Output is correct |
2 |
Correct |
4 ms |
9816 KB |
Output is correct |
3 |
Correct |
4 ms |
9820 KB |
Output is correct |
4 |
Correct |
4 ms |
9820 KB |
Output is correct |
5 |
Correct |
4 ms |
9820 KB |
Output is correct |
6 |
Correct |
4 ms |
9820 KB |
Output is correct |
7 |
Correct |
4 ms |
9820 KB |
Output is correct |
8 |
Correct |
4 ms |
9820 KB |
Output is correct |
9 |
Correct |
4 ms |
9820 KB |
Output is correct |
10 |
Correct |
4 ms |
9820 KB |
Output is correct |
11 |
Correct |
5 ms |
9660 KB |
Output is correct |
12 |
Correct |
4 ms |
9820 KB |
Output is correct |
13 |
Correct |
4 ms |
9816 KB |
Output is correct |
14 |
Correct |
4 ms |
9820 KB |
Output is correct |
15 |
Correct |
5 ms |
9820 KB |
Output is correct |
16 |
Correct |
4 ms |
9816 KB |
Output is correct |
17 |
Correct |
6 ms |
9820 KB |
Output is correct |
18 |
Correct |
4 ms |
9888 KB |
Output is correct |
19 |
Correct |
4 ms |
9820 KB |
Output is correct |
20 |
Correct |
4 ms |
9820 KB |
Output is correct |
21 |
Correct |
4 ms |
9820 KB |
Output is correct |
22 |
Correct |
4 ms |
9820 KB |
Output is correct |
23 |
Correct |
4 ms |
9808 KB |
Output is correct |
24 |
Correct |
4 ms |
9892 KB |
Output is correct |
25 |
Correct |
4 ms |
9892 KB |
Output is correct |
26 |
Correct |
4 ms |
9820 KB |
Output is correct |
27 |
Correct |
4 ms |
9648 KB |
Output is correct |
28 |
Correct |
4 ms |
9816 KB |
Output is correct |
29 |
Correct |
4 ms |
9820 KB |
Output is correct |
30 |
Correct |
4 ms |
9820 KB |
Output is correct |
31 |
Correct |
4 ms |
9824 KB |
Output is correct |
32 |
Correct |
4 ms |
9824 KB |
Output is correct |
33 |
Correct |
4 ms |
9824 KB |
Output is correct |
34 |
Correct |
4 ms |
9824 KB |
Output is correct |
35 |
Correct |
4 ms |
9824 KB |
Output is correct |
36 |
Correct |
4 ms |
9824 KB |
Output is correct |
37 |
Correct |
4 ms |
9896 KB |
Output is correct |
38 |
Correct |
4 ms |
9824 KB |
Output is correct |
39 |
Correct |
4 ms |
9816 KB |
Output is correct |
40 |
Correct |
4 ms |
9820 KB |
Output is correct |
41 |
Correct |
4 ms |
9816 KB |
Output is correct |
42 |
Correct |
4 ms |
9820 KB |
Output is correct |
43 |
Correct |
4 ms |
9820 KB |
Output is correct |
44 |
Correct |
5 ms |
9820 KB |
Output is correct |
45 |
Correct |
5 ms |
9832 KB |
Output is correct |
46 |
Correct |
4 ms |
9832 KB |
Output is correct |
47 |
Correct |
4 ms |
9816 KB |
Output is correct |
48 |
Correct |
6 ms |
9820 KB |
Output is correct |
49 |
Correct |
4 ms |
9788 KB |
Output is correct |
50 |
Correct |
4 ms |
9816 KB |
Output is correct |
51 |
Correct |
4 ms |
9816 KB |
Output is correct |
52 |
Correct |
4 ms |
9820 KB |
Output is correct |
53 |
Correct |
4 ms |
9820 KB |
Output is correct |
54 |
Correct |
6 ms |
9820 KB |
Output is correct |
55 |
Correct |
5 ms |
9820 KB |
Output is correct |
56 |
Correct |
4 ms |
9816 KB |
Output is correct |
57 |
Correct |
4 ms |
9820 KB |
Output is correct |
58 |
Correct |
4 ms |
9816 KB |
Output is correct |
59 |
Correct |
6 ms |
9856 KB |
Output is correct |
60 |
Correct |
4 ms |
9860 KB |
Output is correct |
61 |
Correct |
5 ms |
9820 KB |
Output is correct |
62 |
Correct |
4 ms |
9820 KB |
Output is correct |
63 |
Correct |
4 ms |
9848 KB |
Output is correct |
64 |
Correct |
4 ms |
9820 KB |
Output is correct |
65 |
Correct |
4 ms |
9820 KB |
Output is correct |
66 |
Correct |
50 ms |
33224 KB |
Output is correct |
67 |
Correct |
70 ms |
33732 KB |
Output is correct |
68 |
Correct |
56 ms |
31248 KB |
Output is correct |
69 |
Correct |
54 ms |
32132 KB |
Output is correct |
70 |
Correct |
88 ms |
27848 KB |
Output is correct |
71 |
Correct |
58 ms |
29964 KB |
Output is correct |
72 |
Correct |
54 ms |
28036 KB |
Output is correct |
73 |
Correct |
58 ms |
28460 KB |
Output is correct |
74 |
Correct |
56 ms |
26452 KB |
Output is correct |
75 |
Correct |
52 ms |
26636 KB |
Output is correct |
76 |
Correct |
42 ms |
24016 KB |
Output is correct |
77 |
Correct |
44 ms |
24012 KB |
Output is correct |
78 |
Correct |
41 ms |
23840 KB |
Output is correct |
79 |
Correct |
47 ms |
23504 KB |
Output is correct |
80 |
Correct |
36 ms |
22196 KB |
Output is correct |
81 |
Correct |
30 ms |
21960 KB |
Output is correct |
82 |
Correct |
7 ms |
14560 KB |
Output is correct |
83 |
Correct |
7 ms |
14656 KB |
Output is correct |
84 |
Correct |
7 ms |
14556 KB |
Output is correct |
85 |
Correct |
7 ms |
14556 KB |
Output is correct |
86 |
Correct |
7 ms |
14548 KB |
Output is correct |
87 |
Correct |
7 ms |
14508 KB |
Output is correct |
88 |
Correct |
5 ms |
10076 KB |
Output is correct |
89 |
Correct |
4 ms |
10076 KB |
Output is correct |
90 |
Correct |
4 ms |
9820 KB |
Output is correct |
91 |
Correct |
4 ms |
10076 KB |
Output is correct |
92 |
Correct |
4 ms |
10076 KB |
Output is correct |
93 |
Correct |
4 ms |
10076 KB |
Output is correct |
94 |
Correct |
4 ms |
10076 KB |
Output is correct |
95 |
Correct |
4 ms |
10076 KB |
Output is correct |
96 |
Correct |
4 ms |
10112 KB |
Output is correct |
97 |
Correct |
5 ms |
9820 KB |
Output is correct |
98 |
Correct |
5 ms |
9836 KB |
Output is correct |
99 |
Correct |
4 ms |
9820 KB |
Output is correct |
100 |
Correct |
4 ms |
10068 KB |
Output is correct |
101 |
Correct |
5 ms |
9820 KB |
Output is correct |
102 |
Correct |
5 ms |
9820 KB |
Output is correct |
103 |
Correct |
4 ms |
9876 KB |
Output is correct |
104 |
Correct |
4 ms |
10076 KB |
Output is correct |
105 |
Correct |
4 ms |
9912 KB |
Output is correct |
106 |
Correct |
4 ms |
10076 KB |
Output is correct |
107 |
Correct |
4 ms |
10076 KB |
Output is correct |
108 |
Correct |
72 ms |
27436 KB |
Output is correct |
109 |
Correct |
59 ms |
27988 KB |
Output is correct |
110 |
Correct |
56 ms |
27732 KB |
Output is correct |
111 |
Correct |
56 ms |
27728 KB |
Output is correct |
112 |
Correct |
57 ms |
27748 KB |
Output is correct |
113 |
Correct |
65 ms |
35532 KB |
Output is correct |
114 |
Correct |
68 ms |
33460 KB |
Output is correct |
115 |
Correct |
68 ms |
31908 KB |
Output is correct |
116 |
Correct |
68 ms |
30544 KB |
Output is correct |
117 |
Correct |
55 ms |
27732 KB |
Output is correct |
118 |
Correct |
56 ms |
27732 KB |
Output is correct |
119 |
Correct |
54 ms |
27736 KB |
Output is correct |
120 |
Correct |
58 ms |
27728 KB |
Output is correct |
121 |
Correct |
52 ms |
26960 KB |
Output is correct |
122 |
Correct |
42 ms |
25720 KB |
Output is correct |
123 |
Correct |
34 ms |
22216 KB |
Output is correct |
124 |
Correct |
47 ms |
28100 KB |
Output is correct |
125 |
Correct |
41 ms |
28224 KB |
Output is correct |
126 |
Correct |
43 ms |
28624 KB |
Output is correct |
127 |
Correct |
42 ms |
28096 KB |
Output is correct |
128 |
Correct |
4 ms |
9976 KB |
Output is correct |
129 |
Correct |
7 ms |
9820 KB |
Output is correct |
130 |
Correct |
4 ms |
9820 KB |
Output is correct |
131 |
Correct |
4 ms |
9944 KB |
Output is correct |
132 |
Correct |
5 ms |
9820 KB |
Output is correct |
133 |
Correct |
4 ms |
9816 KB |
Output is correct |
134 |
Correct |
4 ms |
9820 KB |
Output is correct |
135 |
Correct |
5 ms |
9904 KB |
Output is correct |
136 |
Correct |
4 ms |
9820 KB |
Output is correct |
137 |
Correct |
4 ms |
9820 KB |
Output is correct |
138 |
Correct |
5 ms |
9832 KB |
Output is correct |
139 |
Correct |
4 ms |
10076 KB |
Output is correct |
140 |
Correct |
4 ms |
10076 KB |
Output is correct |
141 |
Correct |
5 ms |
10076 KB |
Output is correct |
142 |
Correct |
5 ms |
10076 KB |
Output is correct |
143 |
Correct |
4 ms |
9820 KB |
Output is correct |
144 |
Correct |
5 ms |
9820 KB |
Output is correct |
145 |
Correct |
4 ms |
9820 KB |
Output is correct |
146 |
Correct |
4 ms |
9820 KB |
Output is correct |
147 |
Correct |
4 ms |
9820 KB |
Output is correct |
148 |
Correct |
4 ms |
9820 KB |
Output is correct |
149 |
Correct |
4 ms |
9820 KB |
Output is correct |
150 |
Correct |
5 ms |
9820 KB |
Output is correct |
151 |
Correct |
4 ms |
10056 KB |
Output is correct |
152 |
Correct |
5 ms |
9824 KB |
Output is correct |
153 |
Correct |
4 ms |
9824 KB |
Output is correct |
154 |
Correct |
4 ms |
9824 KB |
Output is correct |
155 |
Correct |
57 ms |
27956 KB |
Output is correct |
156 |
Correct |
57 ms |
27736 KB |
Output is correct |
157 |
Correct |
68 ms |
27256 KB |
Output is correct |
158 |
Correct |
60 ms |
26200 KB |
Output is correct |
159 |
Correct |
54 ms |
24580 KB |
Output is correct |
160 |
Correct |
59 ms |
23888 KB |
Output is correct |
161 |
Correct |
48 ms |
23632 KB |
Output is correct |
162 |
Correct |
50 ms |
23124 KB |
Output is correct |
163 |
Correct |
57 ms |
23120 KB |
Output is correct |
164 |
Correct |
46 ms |
22852 KB |
Output is correct |
165 |
Correct |
47 ms |
22612 KB |
Output is correct |
166 |
Correct |
50 ms |
22876 KB |
Output is correct |
167 |
Correct |
46 ms |
22840 KB |
Output is correct |
168 |
Correct |
46 ms |
25288 KB |
Output is correct |
169 |
Correct |
87 ms |
33224 KB |
Output is correct |
170 |
Correct |
65 ms |
31312 KB |
Output is correct |
171 |
Correct |
66 ms |
31776 KB |
Output is correct |
172 |
Correct |
65 ms |
30156 KB |
Output is correct |
173 |
Correct |
59 ms |
26196 KB |
Output is correct |
174 |
Correct |
58 ms |
26192 KB |
Output is correct |
175 |
Correct |
59 ms |
26180 KB |
Output is correct |
176 |
Correct |
58 ms |
25424 KB |
Output is correct |
177 |
Correct |
58 ms |
24272 KB |
Output is correct |
178 |
Correct |
53 ms |
27192 KB |
Output is correct |
179 |
Correct |
59 ms |
27344 KB |
Output is correct |
180 |
Correct |
65 ms |
26572 KB |
Output is correct |
181 |
Correct |
57 ms |
26448 KB |
Output is correct |
182 |
Correct |
4 ms |
10072 KB |
Output is correct |
183 |
Correct |
4 ms |
9820 KB |
Output is correct |
184 |
Correct |
5 ms |
9816 KB |
Output is correct |
185 |
Correct |
5 ms |
9940 KB |
Output is correct |
186 |
Correct |
5 ms |
10328 KB |
Output is correct |
187 |
Correct |
5 ms |
9820 KB |
Output is correct |
188 |
Correct |
5 ms |
9948 KB |
Output is correct |
189 |
Correct |
4 ms |
9820 KB |
Output is correct |
190 |
Correct |
4 ms |
9944 KB |
Output is correct |
191 |
Correct |
4 ms |
9820 KB |
Output is correct |
192 |
Correct |
4 ms |
9820 KB |
Output is correct |
193 |
Correct |
4 ms |
9820 KB |
Output is correct |
194 |
Correct |
5 ms |
9820 KB |
Output is correct |
195 |
Correct |
6 ms |
9864 KB |
Output is correct |
196 |
Correct |
5 ms |
9816 KB |
Output is correct |
197 |
Correct |
4 ms |
9816 KB |
Output is correct |
198 |
Correct |
4 ms |
10076 KB |
Output is correct |
199 |
Correct |
5 ms |
10076 KB |
Output is correct |
200 |
Correct |
4 ms |
10072 KB |
Output is correct |
201 |
Correct |
5 ms |
10076 KB |
Output is correct |
202 |
Correct |
4 ms |
9820 KB |
Output is correct |
203 |
Correct |
4 ms |
9820 KB |
Output is correct |
204 |
Correct |
5 ms |
9820 KB |
Output is correct |
205 |
Correct |
4 ms |
9984 KB |
Output is correct |
206 |
Correct |
5 ms |
9820 KB |
Output is correct |
207 |
Correct |
5 ms |
9892 KB |
Output is correct |
208 |
Correct |
4 ms |
9820 KB |
Output is correct |
209 |
Correct |
7 ms |
14548 KB |
Output is correct |
210 |
Correct |
40 ms |
21720 KB |
Output is correct |
211 |
Correct |
52 ms |
26828 KB |
Output is correct |
212 |
Correct |
62 ms |
30668 KB |
Output is correct |
213 |
Correct |
93 ms |
33396 KB |
Output is correct |
214 |
Correct |
35 ms |
24656 KB |
Output is correct |
215 |
Correct |
36 ms |
24528 KB |
Output is correct |
216 |
Correct |
77 ms |
27264 KB |
Output is correct |
217 |
Correct |
60 ms |
25464 KB |
Output is correct |
218 |
Correct |
49 ms |
23372 KB |
Output is correct |
219 |
Correct |
46 ms |
22868 KB |
Output is correct |
220 |
Correct |
54 ms |
22608 KB |
Output is correct |
221 |
Correct |
48 ms |
22620 KB |
Output is correct |
222 |
Correct |
44 ms |
24012 KB |
Output is correct |
223 |
Correct |
60 ms |
28476 KB |
Output is correct |
224 |
Correct |
68 ms |
27600 KB |
Output is correct |
225 |
Correct |
56 ms |
25172 KB |
Output is correct |
226 |
Correct |
55 ms |
25172 KB |
Output is correct |
227 |
Correct |
55 ms |
25168 KB |
Output is correct |
228 |
Correct |
50 ms |
24404 KB |
Output is correct |
229 |
Correct |
50 ms |
23628 KB |
Output is correct |
230 |
Correct |
74 ms |
25552 KB |
Output is correct |
231 |
Correct |
60 ms |
25680 KB |
Output is correct |