답안 #105794

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
105794 2019-04-14T23:13:56 Z imaxblue 철인 이종 경기 (APIO18_duathlon) C++17
100 / 100
237 ms 36912 KB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define pii pair<int, int>
#define p3i pair<pii, int>
#define pll pair<ll, ll>
#define p3l pair<pll, ll>
#define vi vector<int>
#define vpii vector<pii>
#define vp3i vector<p3i>
#define vpll vector<pll>
#define vp3l vector<p3l>
#define lseg L, (L+R)/2, N*2+1
#define rseg (L+R)/2+1, R, N*2+2
#define ub upper_bound
#define lb lower_bound
#define pq priority_queue
#define MN 1000000007
#define fox(k, x) for (int k=0; k<x; ++k)
#define fox1(k, x) for (int k=1; k<=x; ++k)
#define foxr(k, x) for (int k=x-1; k>=0; --k)
#define fox1r(k, x) for (int k=x; k>0; --k)
#define ms multiset
#define flood(x) memset(x, 0x3f3f3f3f, sizeof x)
#define drain(x) memset(x, 0, sizeof x)
#define rng() ((rand() << 14)+rand())
#define scan(X) do{while((X=getchar())<'0'); for(X-='0'; '0'<=(_=getchar()); X=(X<<3)+(X<<1)+_-'0');}while(0)
char _;
#define pi 3.14159265358979323846

int n, m, x, y, c, c2;
vector<vector<int> > comp;
vector<int> curr;
vector<int> v[100005];
vector<int> w[200005];
int ord[100005], low[100005];
ll dp[2][200005];
vector<int> last;
bool crit[100005], current[100005], u[100005];
ll ans;
void dfs2(int N, int P){
  //dont count the articulation point twice
  //counts all paths up to current component
  //counts all paths at an articulation point below it that does not end on it
  ll sz;
  if (N <= 100000){
      sz = comp[N].size();
  }
  fox(l, w[N].size()){
    int nxt = w[N][l];
    if (nxt == P) continue;
    dfs2(nxt, N);
    if (N > 100000){
      //articulation
      ans += dp[1][N]*dp[0][nxt] + dp[0][N]*dp[1][nxt];
      dp[0][N] += dp[0][nxt];
      dp[1][N] += dp[1][nxt];
      dp[1][N] += dp[0][nxt];
    } else {
      //component
      ans += dp[0][nxt]*(sz-1)*(sz-2);
      ans += dp[1][nxt]*(sz-1);
      ans += dp[0][nxt]*dp[1][N];
      ans += dp[1][nxt]*dp[0][N];
      dp[0][N] += dp[0][nxt];
      dp[1][N] += dp[1][nxt];
      dp[1][N] += dp[0][nxt] * (sz - 2);
    }
  }
  if (N <= 100000){
    ans += (sz)*(sz-1)*(sz-2)/2;
    dp[0][N] += (sz-1);
    dp[1][N] += (sz-1)*(sz-2);
  }
  //cout << N << ' ' << sz << ' ' << dp[0][N] << ' ' << dp[1][N] << ' ' << ans << endl;
}
bool spec;
void dfs(int N, int P){
  u[N]=1;
  if (ord[N]) return;
  last.pb(N);
  current[N] = 1;
  low[N] = ord[N] = ++c;
  fox(l, v[N].size()){
    int nxt = v[N][l];
    if (nxt == P) continue;
    if (ord[nxt]){
      low[N] = min(low[N], ord[nxt]);
      continue;
    }
    dfs(nxt, N);
    if (low[nxt] >= ord[N]){
      int top = -1;
      curr.clear();
      while(1){
        top = last.back();
        curr.pb(top);
        last.pop_back();
        if (top == nxt) break;
      }
      curr.pb(N);
      comp.pb(curr);
      //cout << "*" << N << ' ' << curr.size() << endl;
      crit[N] = 1;
    }
    low[N] = min(low[N], current[nxt]?ord[nxt]:low[nxt]);
  }
  current[N] = 0;
  //cout << N << ' ' << ord[N] << ' ' << low[N] << endl;
}
void run(int start){
  fox(l, comp.size()){
    dp[0][l] = dp[1][l]=0;
    w[l].clear();
  }
  comp.clear();
  dfs(start, -1);
  //crit[1] = spec;
  //fox1(l, n) if (crit[l]) c2++;
  //printf("%i\n", c2);
  //fox1(l, n) if (crit[l]) printf("%i ", l); printf("\n");
  //return 0;
  fox(l, comp.size()){
    fox(l2, comp[l].size()){
      //cout << comp[l][l2] << ' ';
      if (crit[comp[l][l2]]){
        //cout << l << ' ' << comp[l][l2] << endl;
        w[l].pb(comp[l][l2] + 100000);
        w[comp[l][l2]+100000].pb(l);
      }
    }
    //cout << endl;
  }
  dfs2(start + 100000, -1);

}
int32_t main(){
  scanf("%i%i", &n, &m);
  fox(l, m){
    scanf("%i%i", &x, &y);
    v[x].pb(y);
    v[y].pb(x);
  }
  fox1(l, n){
    if (!u[l]) run(l);
  }
  cout << ans*2;
  return 0;
}
/*
9 11
1 2
2 3
3 1
3 4
4 5
5 6
6 4
2 7
7 8
8 9
9 7
*/

Compilation message

count_triplets.cpp: In function 'void dfs2(int, int)':
count_triplets.cpp:23:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define fox(k, x) for (int k=0; k<x; ++k)
count_triplets.cpp:53:7:
   fox(l, w[N].size()){
       ~~~~~~~~~~~~~~              
count_triplets.cpp:53:3: note: in expansion of macro 'fox'
   fox(l, w[N].size()){
   ^~~
count_triplets.cpp: In function 'void dfs(int, int)':
count_triplets.cpp:23:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define fox(k, x) for (int k=0; k<x; ++k)
count_triplets.cpp:88:7:
   fox(l, v[N].size()){
       ~~~~~~~~~~~~~~              
count_triplets.cpp:88:3: note: in expansion of macro 'fox'
   fox(l, v[N].size()){
   ^~~
count_triplets.cpp: In function 'void run(int)':
count_triplets.cpp:23:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define fox(k, x) for (int k=0; k<x; ++k)
count_triplets.cpp:116:7:
   fox(l, comp.size()){
       ~~~~~~~~~~~~~~              
count_triplets.cpp:116:3: note: in expansion of macro 'fox'
   fox(l, comp.size()){
   ^~~
count_triplets.cpp:23:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define fox(k, x) for (int k=0; k<x; ++k)
count_triplets.cpp:127:7:
   fox(l, comp.size()){
       ~~~~~~~~~~~~~~              
count_triplets.cpp:127:3: note: in expansion of macro 'fox'
   fox(l, comp.size()){
   ^~~
count_triplets.cpp:23:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define fox(k, x) for (int k=0; k<x; ++k)
count_triplets.cpp:128:9:
     fox(l2, comp[l].size()){
         ~~~~~~~~~~~~~~~~~~        
count_triplets.cpp:128:5: note: in expansion of macro 'fox'
     fox(l2, comp[l].size()){
     ^~~
count_triplets.cpp: In function 'int32_t main()':
count_triplets.cpp:142:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%i%i", &n, &m);
   ~~~~~^~~~~~~~~~~~~~~~
count_triplets.cpp:144:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%i%i", &x, &y);
     ~~~~~^~~~~~~~~~~~~~~~
count_triplets.cpp: In function 'void dfs2(int, int)':
count_triplets.cpp:65:28: warning: 'sz' may be used uninitialized in this function [-Wmaybe-uninitialized]
       ans += dp[0][nxt]*(sz-1)*(sz-2);
                         ~~~^~~
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 7456 KB Output is correct
2 Correct 8 ms 7424 KB Output is correct
3 Correct 8 ms 7424 KB Output is correct
4 Correct 8 ms 7424 KB Output is correct
5 Correct 8 ms 7424 KB Output is correct
6 Correct 8 ms 7424 KB Output is correct
7 Correct 8 ms 7424 KB Output is correct
8 Correct 8 ms 7424 KB Output is correct
9 Correct 9 ms 7424 KB Output is correct
10 Correct 9 ms 7424 KB Output is correct
11 Correct 8 ms 7552 KB Output is correct
12 Correct 9 ms 7424 KB Output is correct
13 Correct 9 ms 7424 KB Output is correct
14 Correct 10 ms 7424 KB Output is correct
15 Correct 8 ms 7424 KB Output is correct
16 Correct 9 ms 7424 KB Output is correct
17 Correct 22 ms 7416 KB Output is correct
18 Correct 9 ms 7424 KB Output is correct
19 Correct 9 ms 7424 KB Output is correct
20 Correct 10 ms 7396 KB Output is correct
21 Correct 9 ms 7424 KB Output is correct
22 Correct 10 ms 7424 KB Output is correct
23 Correct 9 ms 7424 KB Output is correct
24 Correct 12 ms 7424 KB Output is correct
25 Correct 9 ms 7424 KB Output is correct
26 Correct 9 ms 7424 KB Output is correct
27 Correct 10 ms 7424 KB Output is correct
28 Correct 9 ms 7424 KB Output is correct
29 Correct 9 ms 7424 KB Output is correct
30 Correct 9 ms 7424 KB Output is correct
31 Correct 9 ms 7424 KB Output is correct
32 Correct 10 ms 7424 KB Output is correct
33 Correct 9 ms 7424 KB Output is correct
34 Correct 9 ms 7424 KB Output is correct
35 Correct 11 ms 7424 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 7456 KB Output is correct
2 Correct 8 ms 7424 KB Output is correct
3 Correct 8 ms 7424 KB Output is correct
4 Correct 8 ms 7424 KB Output is correct
5 Correct 8 ms 7424 KB Output is correct
6 Correct 8 ms 7424 KB Output is correct
7 Correct 8 ms 7424 KB Output is correct
8 Correct 8 ms 7424 KB Output is correct
9 Correct 9 ms 7424 KB Output is correct
10 Correct 9 ms 7424 KB Output is correct
11 Correct 8 ms 7552 KB Output is correct
12 Correct 9 ms 7424 KB Output is correct
13 Correct 9 ms 7424 KB Output is correct
14 Correct 10 ms 7424 KB Output is correct
15 Correct 8 ms 7424 KB Output is correct
16 Correct 9 ms 7424 KB Output is correct
17 Correct 22 ms 7416 KB Output is correct
18 Correct 9 ms 7424 KB Output is correct
19 Correct 9 ms 7424 KB Output is correct
20 Correct 10 ms 7396 KB Output is correct
21 Correct 9 ms 7424 KB Output is correct
22 Correct 10 ms 7424 KB Output is correct
23 Correct 9 ms 7424 KB Output is correct
24 Correct 12 ms 7424 KB Output is correct
25 Correct 9 ms 7424 KB Output is correct
26 Correct 9 ms 7424 KB Output is correct
27 Correct 10 ms 7424 KB Output is correct
28 Correct 9 ms 7424 KB Output is correct
29 Correct 9 ms 7424 KB Output is correct
30 Correct 9 ms 7424 KB Output is correct
31 Correct 9 ms 7424 KB Output is correct
32 Correct 10 ms 7424 KB Output is correct
33 Correct 9 ms 7424 KB Output is correct
34 Correct 9 ms 7424 KB Output is correct
35 Correct 11 ms 7424 KB Output is correct
36 Correct 8 ms 7424 KB Output is correct
37 Correct 9 ms 7552 KB Output is correct
38 Correct 8 ms 7424 KB Output is correct
39 Correct 9 ms 7424 KB Output is correct
40 Correct 10 ms 7424 KB Output is correct
41 Correct 11 ms 7424 KB Output is correct
42 Correct 8 ms 7424 KB Output is correct
43 Correct 9 ms 7424 KB Output is correct
44 Correct 9 ms 7424 KB Output is correct
45 Correct 9 ms 7424 KB Output is correct
46 Correct 9 ms 7424 KB Output is correct
47 Correct 9 ms 7424 KB Output is correct
48 Correct 11 ms 7424 KB Output is correct
49 Correct 10 ms 7424 KB Output is correct
50 Correct 9 ms 7424 KB Output is correct
51 Correct 9 ms 7424 KB Output is correct
52 Correct 8 ms 7424 KB Output is correct
53 Correct 9 ms 7424 KB Output is correct
54 Correct 10 ms 7424 KB Output is correct
55 Correct 9 ms 7424 KB Output is correct
56 Correct 9 ms 7424 KB Output is correct
57 Correct 9 ms 7424 KB Output is correct
58 Correct 18 ms 7424 KB Output is correct
59 Correct 8 ms 7424 KB Output is correct
60 Correct 10 ms 7424 KB Output is correct
61 Correct 9 ms 7552 KB Output is correct
62 Correct 9 ms 7424 KB Output is correct
63 Correct 10 ms 7424 KB Output is correct
64 Correct 11 ms 7424 KB Output is correct
65 Correct 8 ms 7424 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 120 ms 22148 KB Output is correct
2 Correct 121 ms 22260 KB Output is correct
3 Correct 162 ms 27944 KB Output is correct
4 Correct 194 ms 24248 KB Output is correct
5 Correct 141 ms 22824 KB Output is correct
6 Correct 165 ms 27048 KB Output is correct
7 Correct 167 ms 20832 KB Output is correct
8 Correct 198 ms 22516 KB Output is correct
9 Correct 166 ms 17992 KB Output is correct
10 Correct 156 ms 19216 KB Output is correct
11 Correct 114 ms 14604 KB Output is correct
12 Correct 146 ms 14440 KB Output is correct
13 Correct 100 ms 14584 KB Output is correct
14 Correct 86 ms 14432 KB Output is correct
15 Correct 72 ms 13992 KB Output is correct
16 Correct 65 ms 13812 KB Output is correct
17 Correct 13 ms 9852 KB Output is correct
18 Correct 13 ms 9976 KB Output is correct
19 Correct 12 ms 9724 KB Output is correct
20 Correct 15 ms 9724 KB Output is correct
21 Correct 12 ms 9596 KB Output is correct
22 Correct 16 ms 9596 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 7552 KB Output is correct
2 Correct 8 ms 7552 KB Output is correct
3 Correct 10 ms 7552 KB Output is correct
4 Correct 11 ms 7808 KB Output is correct
5 Correct 9 ms 7680 KB Output is correct
6 Correct 9 ms 7680 KB Output is correct
7 Correct 9 ms 7680 KB Output is correct
8 Correct 8 ms 7680 KB Output is correct
9 Correct 9 ms 7680 KB Output is correct
10 Correct 8 ms 7552 KB Output is correct
11 Correct 9 ms 7552 KB Output is correct
12 Correct 11 ms 7552 KB Output is correct
13 Correct 8 ms 7552 KB Output is correct
14 Correct 8 ms 7424 KB Output is correct
15 Correct 10 ms 7424 KB Output is correct
16 Correct 9 ms 7424 KB Output is correct
17 Correct 8 ms 7552 KB Output is correct
18 Correct 8 ms 7552 KB Output is correct
19 Correct 9 ms 7524 KB Output is correct
20 Correct 9 ms 7552 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 159 ms 25128 KB Output is correct
2 Correct 165 ms 25120 KB Output is correct
3 Correct 182 ms 25144 KB Output is correct
4 Correct 171 ms 25156 KB Output is correct
5 Correct 186 ms 25220 KB Output is correct
6 Correct 235 ms 36912 KB Output is correct
7 Correct 237 ms 32672 KB Output is correct
8 Correct 237 ms 30772 KB Output is correct
9 Correct 193 ms 28928 KB Output is correct
10 Correct 140 ms 20268 KB Output is correct
11 Correct 190 ms 23840 KB Output is correct
12 Correct 143 ms 18220 KB Output is correct
13 Correct 148 ms 17456 KB Output is correct
14 Correct 120 ms 14840 KB Output is correct
15 Correct 116 ms 14824 KB Output is correct
16 Correct 97 ms 13836 KB Output is correct
17 Correct 97 ms 22516 KB Output is correct
18 Correct 98 ms 22556 KB Output is correct
19 Correct 92 ms 22684 KB Output is correct
20 Correct 129 ms 22612 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 7552 KB Output is correct
2 Correct 10 ms 7552 KB Output is correct
3 Correct 9 ms 7552 KB Output is correct
4 Correct 12 ms 7552 KB Output is correct
5 Correct 9 ms 7552 KB Output is correct
6 Correct 11 ms 7552 KB Output is correct
7 Correct 9 ms 7552 KB Output is correct
8 Correct 11 ms 7552 KB Output is correct
9 Correct 9 ms 7516 KB Output is correct
10 Correct 9 ms 7552 KB Output is correct
11 Correct 11 ms 7492 KB Output is correct
12 Correct 11 ms 7680 KB Output is correct
13 Correct 10 ms 7680 KB Output is correct
14 Correct 9 ms 7680 KB Output is correct
15 Correct 10 ms 7680 KB Output is correct
16 Correct 11 ms 7552 KB Output is correct
17 Correct 10 ms 7576 KB Output is correct
18 Correct 10 ms 7552 KB Output is correct
19 Correct 11 ms 7424 KB Output is correct
20 Correct 11 ms 7552 KB Output is correct
21 Correct 11 ms 7552 KB Output is correct
22 Correct 9 ms 7552 KB Output is correct
23 Correct 8 ms 7552 KB Output is correct
24 Correct 9 ms 7552 KB Output is correct
25 Correct 9 ms 7424 KB Output is correct
26 Correct 11 ms 7424 KB Output is correct
27 Correct 9 ms 7424 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 178 ms 25064 KB Output is correct
2 Correct 187 ms 25396 KB Output is correct
3 Correct 155 ms 23456 KB Output is correct
4 Correct 157 ms 22264 KB Output is correct
5 Correct 145 ms 19192 KB Output is correct
6 Correct 150 ms 17956 KB Output is correct
7 Correct 158 ms 17244 KB Output is correct
8 Correct 136 ms 16640 KB Output is correct
9 Correct 160 ms 16180 KB Output is correct
10 Correct 131 ms 15892 KB Output is correct
11 Correct 116 ms 15480 KB Output is correct
12 Correct 110 ms 15180 KB Output is correct
13 Correct 137 ms 15096 KB Output is correct
14 Correct 106 ms 16220 KB Output is correct
15 Correct 226 ms 32676 KB Output is correct
16 Correct 211 ms 30168 KB Output is correct
17 Correct 205 ms 29844 KB Output is correct
18 Correct 185 ms 27812 KB Output is correct
19 Correct 164 ms 21672 KB Output is correct
20 Correct 169 ms 19088 KB Output is correct
21 Correct 188 ms 18312 KB Output is correct
22 Correct 136 ms 15864 KB Output is correct
23 Correct 105 ms 15480 KB Output is correct
24 Correct 166 ms 24728 KB Output is correct
25 Correct 172 ms 24664 KB Output is correct
26 Correct 161 ms 23076 KB Output is correct
27 Correct 177 ms 23200 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 7456 KB Output is correct
2 Correct 8 ms 7424 KB Output is correct
3 Correct 8 ms 7424 KB Output is correct
4 Correct 8 ms 7424 KB Output is correct
5 Correct 8 ms 7424 KB Output is correct
6 Correct 8 ms 7424 KB Output is correct
7 Correct 8 ms 7424 KB Output is correct
8 Correct 8 ms 7424 KB Output is correct
9 Correct 9 ms 7424 KB Output is correct
10 Correct 9 ms 7424 KB Output is correct
11 Correct 8 ms 7552 KB Output is correct
12 Correct 9 ms 7424 KB Output is correct
13 Correct 9 ms 7424 KB Output is correct
14 Correct 10 ms 7424 KB Output is correct
15 Correct 8 ms 7424 KB Output is correct
16 Correct 9 ms 7424 KB Output is correct
17 Correct 22 ms 7416 KB Output is correct
18 Correct 9 ms 7424 KB Output is correct
19 Correct 9 ms 7424 KB Output is correct
20 Correct 10 ms 7396 KB Output is correct
21 Correct 9 ms 7424 KB Output is correct
22 Correct 10 ms 7424 KB Output is correct
23 Correct 9 ms 7424 KB Output is correct
24 Correct 12 ms 7424 KB Output is correct
25 Correct 9 ms 7424 KB Output is correct
26 Correct 9 ms 7424 KB Output is correct
27 Correct 10 ms 7424 KB Output is correct
28 Correct 9 ms 7424 KB Output is correct
29 Correct 9 ms 7424 KB Output is correct
30 Correct 9 ms 7424 KB Output is correct
31 Correct 9 ms 7424 KB Output is correct
32 Correct 10 ms 7424 KB Output is correct
33 Correct 9 ms 7424 KB Output is correct
34 Correct 9 ms 7424 KB Output is correct
35 Correct 11 ms 7424 KB Output is correct
36 Correct 8 ms 7424 KB Output is correct
37 Correct 9 ms 7552 KB Output is correct
38 Correct 8 ms 7424 KB Output is correct
39 Correct 9 ms 7424 KB Output is correct
40 Correct 10 ms 7424 KB Output is correct
41 Correct 11 ms 7424 KB Output is correct
42 Correct 8 ms 7424 KB Output is correct
43 Correct 9 ms 7424 KB Output is correct
44 Correct 9 ms 7424 KB Output is correct
45 Correct 9 ms 7424 KB Output is correct
46 Correct 9 ms 7424 KB Output is correct
47 Correct 9 ms 7424 KB Output is correct
48 Correct 11 ms 7424 KB Output is correct
49 Correct 10 ms 7424 KB Output is correct
50 Correct 9 ms 7424 KB Output is correct
51 Correct 9 ms 7424 KB Output is correct
52 Correct 8 ms 7424 KB Output is correct
53 Correct 9 ms 7424 KB Output is correct
54 Correct 10 ms 7424 KB Output is correct
55 Correct 9 ms 7424 KB Output is correct
56 Correct 9 ms 7424 KB Output is correct
57 Correct 9 ms 7424 KB Output is correct
58 Correct 18 ms 7424 KB Output is correct
59 Correct 8 ms 7424 KB Output is correct
60 Correct 10 ms 7424 KB Output is correct
61 Correct 9 ms 7552 KB Output is correct
62 Correct 9 ms 7424 KB Output is correct
63 Correct 10 ms 7424 KB Output is correct
64 Correct 11 ms 7424 KB Output is correct
65 Correct 8 ms 7424 KB Output is correct
66 Correct 10 ms 7424 KB Output is correct
67 Correct 9 ms 7424 KB Output is correct
68 Correct 10 ms 7552 KB Output is correct
69 Correct 10 ms 7552 KB Output is correct
70 Correct 9 ms 7552 KB Output is correct
71 Correct 9 ms 7552 KB Output is correct
72 Correct 8 ms 7552 KB Output is correct
73 Correct 10 ms 7552 KB Output is correct
74 Correct 8 ms 7552 KB Output is correct
75 Correct 8 ms 7552 KB Output is correct
76 Correct 8 ms 7424 KB Output is correct
77 Correct 10 ms 7552 KB Output is correct
78 Correct 10 ms 7552 KB Output is correct
79 Correct 10 ms 7552 KB Output is correct
80 Correct 9 ms 7424 KB Output is correct
81 Correct 10 ms 7552 KB Output is correct
82 Correct 9 ms 7552 KB Output is correct
83 Correct 9 ms 7552 KB Output is correct
84 Correct 11 ms 7552 KB Output is correct
85 Correct 11 ms 7552 KB Output is correct
86 Correct 9 ms 7552 KB Output is correct
87 Correct 10 ms 7552 KB Output is correct
88 Correct 10 ms 7424 KB Output is correct
89 Correct 10 ms 7448 KB Output is correct
90 Correct 12 ms 7424 KB Output is correct
91 Correct 10 ms 7552 KB Output is correct
92 Correct 10 ms 7552 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 7456 KB Output is correct
2 Correct 8 ms 7424 KB Output is correct
3 Correct 8 ms 7424 KB Output is correct
4 Correct 8 ms 7424 KB Output is correct
5 Correct 8 ms 7424 KB Output is correct
6 Correct 8 ms 7424 KB Output is correct
7 Correct 8 ms 7424 KB Output is correct
8 Correct 8 ms 7424 KB Output is correct
9 Correct 9 ms 7424 KB Output is correct
10 Correct 9 ms 7424 KB Output is correct
11 Correct 8 ms 7552 KB Output is correct
12 Correct 9 ms 7424 KB Output is correct
13 Correct 9 ms 7424 KB Output is correct
14 Correct 10 ms 7424 KB Output is correct
15 Correct 8 ms 7424 KB Output is correct
16 Correct 9 ms 7424 KB Output is correct
17 Correct 22 ms 7416 KB Output is correct
18 Correct 9 ms 7424 KB Output is correct
19 Correct 9 ms 7424 KB Output is correct
20 Correct 10 ms 7396 KB Output is correct
21 Correct 9 ms 7424 KB Output is correct
22 Correct 10 ms 7424 KB Output is correct
23 Correct 9 ms 7424 KB Output is correct
24 Correct 12 ms 7424 KB Output is correct
25 Correct 9 ms 7424 KB Output is correct
26 Correct 9 ms 7424 KB Output is correct
27 Correct 10 ms 7424 KB Output is correct
28 Correct 9 ms 7424 KB Output is correct
29 Correct 9 ms 7424 KB Output is correct
30 Correct 9 ms 7424 KB Output is correct
31 Correct 9 ms 7424 KB Output is correct
32 Correct 10 ms 7424 KB Output is correct
33 Correct 9 ms 7424 KB Output is correct
34 Correct 9 ms 7424 KB Output is correct
35 Correct 11 ms 7424 KB Output is correct
36 Correct 8 ms 7424 KB Output is correct
37 Correct 9 ms 7552 KB Output is correct
38 Correct 8 ms 7424 KB Output is correct
39 Correct 9 ms 7424 KB Output is correct
40 Correct 10 ms 7424 KB Output is correct
41 Correct 11 ms 7424 KB Output is correct
42 Correct 8 ms 7424 KB Output is correct
43 Correct 9 ms 7424 KB Output is correct
44 Correct 9 ms 7424 KB Output is correct
45 Correct 9 ms 7424 KB Output is correct
46 Correct 9 ms 7424 KB Output is correct
47 Correct 9 ms 7424 KB Output is correct
48 Correct 11 ms 7424 KB Output is correct
49 Correct 10 ms 7424 KB Output is correct
50 Correct 9 ms 7424 KB Output is correct
51 Correct 9 ms 7424 KB Output is correct
52 Correct 8 ms 7424 KB Output is correct
53 Correct 9 ms 7424 KB Output is correct
54 Correct 10 ms 7424 KB Output is correct
55 Correct 9 ms 7424 KB Output is correct
56 Correct 9 ms 7424 KB Output is correct
57 Correct 9 ms 7424 KB Output is correct
58 Correct 18 ms 7424 KB Output is correct
59 Correct 8 ms 7424 KB Output is correct
60 Correct 10 ms 7424 KB Output is correct
61 Correct 9 ms 7552 KB Output is correct
62 Correct 9 ms 7424 KB Output is correct
63 Correct 10 ms 7424 KB Output is correct
64 Correct 11 ms 7424 KB Output is correct
65 Correct 8 ms 7424 KB Output is correct
66 Correct 120 ms 22148 KB Output is correct
67 Correct 121 ms 22260 KB Output is correct
68 Correct 162 ms 27944 KB Output is correct
69 Correct 194 ms 24248 KB Output is correct
70 Correct 141 ms 22824 KB Output is correct
71 Correct 165 ms 27048 KB Output is correct
72 Correct 167 ms 20832 KB Output is correct
73 Correct 198 ms 22516 KB Output is correct
74 Correct 166 ms 17992 KB Output is correct
75 Correct 156 ms 19216 KB Output is correct
76 Correct 114 ms 14604 KB Output is correct
77 Correct 146 ms 14440 KB Output is correct
78 Correct 100 ms 14584 KB Output is correct
79 Correct 86 ms 14432 KB Output is correct
80 Correct 72 ms 13992 KB Output is correct
81 Correct 65 ms 13812 KB Output is correct
82 Correct 13 ms 9852 KB Output is correct
83 Correct 13 ms 9976 KB Output is correct
84 Correct 12 ms 9724 KB Output is correct
85 Correct 15 ms 9724 KB Output is correct
86 Correct 12 ms 9596 KB Output is correct
87 Correct 16 ms 9596 KB Output is correct
88 Correct 11 ms 7552 KB Output is correct
89 Correct 8 ms 7552 KB Output is correct
90 Correct 10 ms 7552 KB Output is correct
91 Correct 11 ms 7808 KB Output is correct
92 Correct 9 ms 7680 KB Output is correct
93 Correct 9 ms 7680 KB Output is correct
94 Correct 9 ms 7680 KB Output is correct
95 Correct 8 ms 7680 KB Output is correct
96 Correct 9 ms 7680 KB Output is correct
97 Correct 8 ms 7552 KB Output is correct
98 Correct 9 ms 7552 KB Output is correct
99 Correct 11 ms 7552 KB Output is correct
100 Correct 8 ms 7552 KB Output is correct
101 Correct 8 ms 7424 KB Output is correct
102 Correct 10 ms 7424 KB Output is correct
103 Correct 9 ms 7424 KB Output is correct
104 Correct 8 ms 7552 KB Output is correct
105 Correct 8 ms 7552 KB Output is correct
106 Correct 9 ms 7524 KB Output is correct
107 Correct 9 ms 7552 KB Output is correct
108 Correct 159 ms 25128 KB Output is correct
109 Correct 165 ms 25120 KB Output is correct
110 Correct 182 ms 25144 KB Output is correct
111 Correct 171 ms 25156 KB Output is correct
112 Correct 186 ms 25220 KB Output is correct
113 Correct 235 ms 36912 KB Output is correct
114 Correct 237 ms 32672 KB Output is correct
115 Correct 237 ms 30772 KB Output is correct
116 Correct 193 ms 28928 KB Output is correct
117 Correct 140 ms 20268 KB Output is correct
118 Correct 190 ms 23840 KB Output is correct
119 Correct 143 ms 18220 KB Output is correct
120 Correct 148 ms 17456 KB Output is correct
121 Correct 120 ms 14840 KB Output is correct
122 Correct 116 ms 14824 KB Output is correct
123 Correct 97 ms 13836 KB Output is correct
124 Correct 97 ms 22516 KB Output is correct
125 Correct 98 ms 22556 KB Output is correct
126 Correct 92 ms 22684 KB Output is correct
127 Correct 129 ms 22612 KB Output is correct
128 Correct 8 ms 7552 KB Output is correct
129 Correct 10 ms 7552 KB Output is correct
130 Correct 9 ms 7552 KB Output is correct
131 Correct 12 ms 7552 KB Output is correct
132 Correct 9 ms 7552 KB Output is correct
133 Correct 11 ms 7552 KB Output is correct
134 Correct 9 ms 7552 KB Output is correct
135 Correct 11 ms 7552 KB Output is correct
136 Correct 9 ms 7516 KB Output is correct
137 Correct 9 ms 7552 KB Output is correct
138 Correct 11 ms 7492 KB Output is correct
139 Correct 11 ms 7680 KB Output is correct
140 Correct 10 ms 7680 KB Output is correct
141 Correct 9 ms 7680 KB Output is correct
142 Correct 10 ms 7680 KB Output is correct
143 Correct 11 ms 7552 KB Output is correct
144 Correct 10 ms 7576 KB Output is correct
145 Correct 10 ms 7552 KB Output is correct
146 Correct 11 ms 7424 KB Output is correct
147 Correct 11 ms 7552 KB Output is correct
148 Correct 11 ms 7552 KB Output is correct
149 Correct 9 ms 7552 KB Output is correct
150 Correct 8 ms 7552 KB Output is correct
151 Correct 9 ms 7552 KB Output is correct
152 Correct 9 ms 7424 KB Output is correct
153 Correct 11 ms 7424 KB Output is correct
154 Correct 9 ms 7424 KB Output is correct
155 Correct 178 ms 25064 KB Output is correct
156 Correct 187 ms 25396 KB Output is correct
157 Correct 155 ms 23456 KB Output is correct
158 Correct 157 ms 22264 KB Output is correct
159 Correct 145 ms 19192 KB Output is correct
160 Correct 150 ms 17956 KB Output is correct
161 Correct 158 ms 17244 KB Output is correct
162 Correct 136 ms 16640 KB Output is correct
163 Correct 160 ms 16180 KB Output is correct
164 Correct 131 ms 15892 KB Output is correct
165 Correct 116 ms 15480 KB Output is correct
166 Correct 110 ms 15180 KB Output is correct
167 Correct 137 ms 15096 KB Output is correct
168 Correct 106 ms 16220 KB Output is correct
169 Correct 226 ms 32676 KB Output is correct
170 Correct 211 ms 30168 KB Output is correct
171 Correct 205 ms 29844 KB Output is correct
172 Correct 185 ms 27812 KB Output is correct
173 Correct 164 ms 21672 KB Output is correct
174 Correct 169 ms 19088 KB Output is correct
175 Correct 188 ms 18312 KB Output is correct
176 Correct 136 ms 15864 KB Output is correct
177 Correct 105 ms 15480 KB Output is correct
178 Correct 166 ms 24728 KB Output is correct
179 Correct 172 ms 24664 KB Output is correct
180 Correct 161 ms 23076 KB Output is correct
181 Correct 177 ms 23200 KB Output is correct
182 Correct 10 ms 7424 KB Output is correct
183 Correct 9 ms 7424 KB Output is correct
184 Correct 10 ms 7552 KB Output is correct
185 Correct 10 ms 7552 KB Output is correct
186 Correct 9 ms 7552 KB Output is correct
187 Correct 9 ms 7552 KB Output is correct
188 Correct 8 ms 7552 KB Output is correct
189 Correct 10 ms 7552 KB Output is correct
190 Correct 8 ms 7552 KB Output is correct
191 Correct 8 ms 7552 KB Output is correct
192 Correct 8 ms 7424 KB Output is correct
193 Correct 10 ms 7552 KB Output is correct
194 Correct 10 ms 7552 KB Output is correct
195 Correct 10 ms 7552 KB Output is correct
196 Correct 9 ms 7424 KB Output is correct
197 Correct 10 ms 7552 KB Output is correct
198 Correct 9 ms 7552 KB Output is correct
199 Correct 9 ms 7552 KB Output is correct
200 Correct 11 ms 7552 KB Output is correct
201 Correct 11 ms 7552 KB Output is correct
202 Correct 9 ms 7552 KB Output is correct
203 Correct 10 ms 7552 KB Output is correct
204 Correct 10 ms 7424 KB Output is correct
205 Correct 10 ms 7448 KB Output is correct
206 Correct 12 ms 7424 KB Output is correct
207 Correct 10 ms 7552 KB Output is correct
208 Correct 10 ms 7552 KB Output is correct
209 Correct 12 ms 8952 KB Output is correct
210 Correct 79 ms 14500 KB Output is correct
211 Correct 140 ms 21368 KB Output is correct
212 Correct 163 ms 22824 KB Output is correct
213 Correct 183 ms 24056 KB Output is correct
214 Correct 56 ms 15608 KB Output is correct
215 Correct 63 ms 15736 KB Output is correct
216 Correct 184 ms 22988 KB Output is correct
217 Correct 170 ms 19724 KB Output is correct
218 Correct 132 ms 16720 KB Output is correct
219 Correct 122 ms 15744 KB Output is correct
220 Correct 132 ms 15352 KB Output is correct
221 Correct 122 ms 14968 KB Output is correct
222 Correct 123 ms 15016 KB Output is correct
223 Correct 196 ms 22956 KB Output is correct
224 Correct 202 ms 22136 KB Output is correct
225 Correct 139 ms 17968 KB Output is correct
226 Correct 143 ms 17216 KB Output is correct
227 Correct 157 ms 16856 KB Output is correct
228 Correct 118 ms 15580 KB Output is correct
229 Correct 125 ms 15352 KB Output is correct
230 Correct 121 ms 17904 KB Output is correct
231 Correct 127 ms 18084 KB Output is correct