답안 #867443

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
867443 2023-10-28T11:53:33 Z ttamx 봉쇄 시간 (IOI23_closing) C++17
100 / 100
203 ms 43452 KB
#include "closing.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<ll,int> p2;
typedef tuple<ll,ll,int> t3;

const int N=2e5+5;

int n;
vector<pair<int,int>> adj[N];
ll distx[N],disty[N],cost1[N],cost2[N];
bool used[N];

void dfs(int u,ll *dist,int p=-1){
    for(auto [v,w]:adj[u])if(v!=p){
        dist[v]=dist[u]+w;
        dfs(v,dist,u);
    }
}

int max_score(int N, int X, int Y, ll K, vector<int> U, vector<int> V, vector<int> W){
    n=N;
    for(int i=0;i<n-1;i++){
        int u=U[i],v=V[i],w=W[i];
        adj[u].emplace_back(v,w);
        adj[v].emplace_back(u,w);
    }
    distx[X]=disty[Y]=0;
    dfs(X,distx);
    dfs(Y,disty);
    for(int i=0;i<n;i++){
        cost1[i]=min(distx[i],disty[i]);
        cost2[i]=max(distx[i],disty[i])-cost1[i];
    }
    ll k=K;
    int ans=0;
    priority_queue<ll,vector<ll>,greater<ll>> pq;
    for(int i=0;i<n;i++)pq.emplace(cost1[i]);
    while(!pq.empty()&&pq.top()<=k){
        k-=pq.top();
        pq.pop();
        ans++;
    }
    k=K;
    int ans2=0;
    priority_queue<ll,vector<ll>,greater<ll>> pq1;
    priority_queue<p2,vector<p2>,greater<p2>> pq2,pq3;
    for(int i=0;i<n;i++){
        if(distx[i]+disty[i]==disty[X]){
            k-=cost1[i];
            ans2++;
            pq1.emplace(cost2[i]);
        }else if(cost1[i]<=cost2[i]){
            pq1.emplace(cost1[i]);
            pq1.emplace(cost2[i]);
        }else{
            pq2.emplace(cost1[i]+cost2[i],i);
            pq3.emplace(cost1[i],i);
        }
    }
    while(!pq1.empty()&&!pq2.empty()){
        ll val=pq1.top();
        pq1.pop();
        ll res1=val+(pq1.empty()?0:pq1.top());
        pq1.emplace(val);
        ll res2=pq2.top().first;
        if(pq1.size()>1&&res1<=res2){
            res1=pq1.top();
            if(res1>k)break;
            k-=res1;
            ans2++;
            pq1.pop();
        }else{
            if(res2>k)break;
            k-=res2;
            ans2+=2;
            used[pq2.top().second]=true;
            pq2.pop();
        }
    }
    while(!pq3.empty()){
        auto [v,i]=pq3.top();
        pq3.pop();
        if(!used[i])pq1.emplace(v);
    }
    while(!pq1.empty()&&pq1.top()<=k){
        k-=pq1.top();
        pq1.pop();
        ans2++;
    }
    for(int i=0;i<n;i++){
        adj[i].clear();
        used[i]=false;
    }
    if(k<0)return ans;
    return max(ans,ans2);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 11356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 117 ms 37184 KB Output is correct
2 Correct 119 ms 37824 KB Output is correct
3 Correct 59 ms 13956 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 11356 KB Output is correct
2 Correct 2 ms 11356 KB Output is correct
3 Correct 2 ms 11356 KB Output is correct
4 Correct 3 ms 11356 KB Output is correct
5 Correct 3 ms 11352 KB Output is correct
6 Correct 3 ms 11352 KB Output is correct
7 Correct 2 ms 11356 KB Output is correct
8 Correct 2 ms 11332 KB Output is correct
9 Correct 3 ms 11356 KB Output is correct
10 Correct 2 ms 11412 KB Output is correct
11 Correct 2 ms 11352 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 11356 KB Output is correct
2 Correct 2 ms 11356 KB Output is correct
3 Correct 2 ms 11356 KB Output is correct
4 Correct 3 ms 11356 KB Output is correct
5 Correct 3 ms 11352 KB Output is correct
6 Correct 3 ms 11352 KB Output is correct
7 Correct 2 ms 11356 KB Output is correct
8 Correct 2 ms 11332 KB Output is correct
9 Correct 3 ms 11356 KB Output is correct
10 Correct 2 ms 11412 KB Output is correct
11 Correct 2 ms 11352 KB Output is correct
12 Correct 2 ms 11352 KB Output is correct
13 Correct 2 ms 11356 KB Output is correct
14 Correct 2 ms 11356 KB Output is correct
15 Correct 2 ms 11352 KB Output is correct
16 Correct 2 ms 11408 KB Output is correct
17 Correct 2 ms 11356 KB Output is correct
18 Correct 2 ms 11608 KB Output is correct
19 Correct 3 ms 11356 KB Output is correct
20 Correct 2 ms 11356 KB Output is correct
21 Correct 3 ms 11356 KB Output is correct
22 Correct 2 ms 11356 KB Output is correct
23 Correct 2 ms 11356 KB Output is correct
24 Correct 2 ms 11416 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 11356 KB Output is correct
2 Correct 2 ms 11356 KB Output is correct
3 Correct 2 ms 11356 KB Output is correct
4 Correct 3 ms 11356 KB Output is correct
5 Correct 3 ms 11352 KB Output is correct
6 Correct 3 ms 11352 KB Output is correct
7 Correct 2 ms 11356 KB Output is correct
8 Correct 2 ms 11332 KB Output is correct
9 Correct 3 ms 11356 KB Output is correct
10 Correct 2 ms 11412 KB Output is correct
11 Correct 2 ms 11352 KB Output is correct
12 Correct 2 ms 11352 KB Output is correct
13 Correct 2 ms 11356 KB Output is correct
14 Correct 2 ms 11356 KB Output is correct
15 Correct 2 ms 11352 KB Output is correct
16 Correct 2 ms 11408 KB Output is correct
17 Correct 2 ms 11356 KB Output is correct
18 Correct 2 ms 11608 KB Output is correct
19 Correct 3 ms 11356 KB Output is correct
20 Correct 2 ms 11356 KB Output is correct
21 Correct 3 ms 11356 KB Output is correct
22 Correct 2 ms 11356 KB Output is correct
23 Correct 2 ms 11356 KB Output is correct
24 Correct 2 ms 11416 KB Output is correct
25 Correct 3 ms 11428 KB Output is correct
26 Correct 4 ms 11868 KB Output is correct
27 Correct 3 ms 11868 KB Output is correct
28 Correct 3 ms 11864 KB Output is correct
29 Correct 4 ms 11868 KB Output is correct
30 Correct 4 ms 12120 KB Output is correct
31 Correct 4 ms 11864 KB Output is correct
32 Correct 4 ms 12120 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 11356 KB Output is correct
2 Correct 2 ms 11356 KB Output is correct
3 Correct 2 ms 11356 KB Output is correct
4 Correct 2 ms 11356 KB Output is correct
5 Correct 3 ms 11356 KB Output is correct
6 Correct 3 ms 11352 KB Output is correct
7 Correct 3 ms 11356 KB Output is correct
8 Correct 2 ms 11356 KB Output is correct
9 Correct 2 ms 11356 KB Output is correct
10 Correct 2 ms 11356 KB Output is correct
11 Correct 2 ms 11356 KB Output is correct
12 Correct 2 ms 11356 KB Output is correct
13 Correct 2 ms 11352 KB Output is correct
14 Correct 2 ms 11356 KB Output is correct
15 Correct 3 ms 11424 KB Output is correct
16 Correct 2 ms 11356 KB Output is correct
17 Correct 3 ms 11356 KB Output is correct
18 Correct 2 ms 11356 KB Output is correct
19 Correct 2 ms 11356 KB Output is correct
20 Correct 2 ms 11356 KB Output is correct
21 Correct 2 ms 11356 KB Output is correct
22 Correct 2 ms 11356 KB Output is correct
23 Correct 2 ms 11356 KB Output is correct
24 Correct 2 ms 11356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 11356 KB Output is correct
2 Correct 2 ms 11356 KB Output is correct
3 Correct 2 ms 11356 KB Output is correct
4 Correct 2 ms 11356 KB Output is correct
5 Correct 3 ms 11356 KB Output is correct
6 Correct 3 ms 11352 KB Output is correct
7 Correct 3 ms 11352 KB Output is correct
8 Correct 2 ms 11356 KB Output is correct
9 Correct 2 ms 11332 KB Output is correct
10 Correct 3 ms 11356 KB Output is correct
11 Correct 2 ms 11412 KB Output is correct
12 Correct 2 ms 11352 KB Output is correct
13 Correct 2 ms 11352 KB Output is correct
14 Correct 2 ms 11356 KB Output is correct
15 Correct 2 ms 11356 KB Output is correct
16 Correct 2 ms 11352 KB Output is correct
17 Correct 2 ms 11408 KB Output is correct
18 Correct 2 ms 11356 KB Output is correct
19 Correct 3 ms 11356 KB Output is correct
20 Correct 2 ms 11356 KB Output is correct
21 Correct 2 ms 11356 KB Output is correct
22 Correct 2 ms 11356 KB Output is correct
23 Correct 2 ms 11356 KB Output is correct
24 Correct 2 ms 11356 KB Output is correct
25 Correct 2 ms 11352 KB Output is correct
26 Correct 2 ms 11356 KB Output is correct
27 Correct 3 ms 11424 KB Output is correct
28 Correct 2 ms 11356 KB Output is correct
29 Correct 3 ms 11356 KB Output is correct
30 Correct 2 ms 11356 KB Output is correct
31 Correct 2 ms 11356 KB Output is correct
32 Correct 2 ms 11356 KB Output is correct
33 Correct 2 ms 11356 KB Output is correct
34 Correct 2 ms 11356 KB Output is correct
35 Correct 2 ms 11356 KB Output is correct
36 Correct 2 ms 11356 KB Output is correct
37 Correct 2 ms 11352 KB Output is correct
38 Correct 2 ms 11356 KB Output is correct
39 Correct 2 ms 11356 KB Output is correct
40 Correct 3 ms 11356 KB Output is correct
41 Correct 2 ms 11352 KB Output is correct
42 Correct 2 ms 11352 KB Output is correct
43 Correct 2 ms 11356 KB Output is correct
44 Correct 2 ms 11356 KB Output is correct
45 Correct 2 ms 11356 KB Output is correct
46 Correct 2 ms 11420 KB Output is correct
47 Correct 3 ms 11356 KB Output is correct
48 Correct 2 ms 11352 KB Output is correct
49 Correct 2 ms 11420 KB Output is correct
50 Correct 2 ms 11352 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 11356 KB Output is correct
2 Correct 2 ms 11356 KB Output is correct
3 Correct 2 ms 11356 KB Output is correct
4 Correct 2 ms 11356 KB Output is correct
5 Correct 3 ms 11356 KB Output is correct
6 Correct 3 ms 11352 KB Output is correct
7 Correct 3 ms 11352 KB Output is correct
8 Correct 2 ms 11356 KB Output is correct
9 Correct 2 ms 11332 KB Output is correct
10 Correct 3 ms 11356 KB Output is correct
11 Correct 2 ms 11412 KB Output is correct
12 Correct 2 ms 11352 KB Output is correct
13 Correct 2 ms 11352 KB Output is correct
14 Correct 2 ms 11356 KB Output is correct
15 Correct 2 ms 11356 KB Output is correct
16 Correct 2 ms 11352 KB Output is correct
17 Correct 2 ms 11408 KB Output is correct
18 Correct 2 ms 11356 KB Output is correct
19 Correct 2 ms 11608 KB Output is correct
20 Correct 3 ms 11356 KB Output is correct
21 Correct 2 ms 11356 KB Output is correct
22 Correct 3 ms 11356 KB Output is correct
23 Correct 2 ms 11356 KB Output is correct
24 Correct 2 ms 11356 KB Output is correct
25 Correct 2 ms 11416 KB Output is correct
26 Correct 3 ms 11356 KB Output is correct
27 Correct 2 ms 11356 KB Output is correct
28 Correct 2 ms 11356 KB Output is correct
29 Correct 2 ms 11356 KB Output is correct
30 Correct 2 ms 11356 KB Output is correct
31 Correct 2 ms 11356 KB Output is correct
32 Correct 2 ms 11352 KB Output is correct
33 Correct 2 ms 11356 KB Output is correct
34 Correct 3 ms 11424 KB Output is correct
35 Correct 2 ms 11356 KB Output is correct
36 Correct 3 ms 11356 KB Output is correct
37 Correct 2 ms 11356 KB Output is correct
38 Correct 2 ms 11356 KB Output is correct
39 Correct 2 ms 11356 KB Output is correct
40 Correct 2 ms 11356 KB Output is correct
41 Correct 2 ms 11356 KB Output is correct
42 Correct 2 ms 11356 KB Output is correct
43 Correct 2 ms 11356 KB Output is correct
44 Correct 2 ms 11352 KB Output is correct
45 Correct 2 ms 11356 KB Output is correct
46 Correct 2 ms 11356 KB Output is correct
47 Correct 3 ms 11356 KB Output is correct
48 Correct 2 ms 11352 KB Output is correct
49 Correct 2 ms 11352 KB Output is correct
50 Correct 2 ms 11356 KB Output is correct
51 Correct 2 ms 11356 KB Output is correct
52 Correct 2 ms 11356 KB Output is correct
53 Correct 2 ms 11420 KB Output is correct
54 Correct 3 ms 11356 KB Output is correct
55 Correct 2 ms 11352 KB Output is correct
56 Correct 2 ms 11420 KB Output is correct
57 Correct 2 ms 11352 KB Output is correct
58 Correct 2 ms 11356 KB Output is correct
59 Correct 2 ms 11356 KB Output is correct
60 Correct 2 ms 11356 KB Output is correct
61 Correct 2 ms 11352 KB Output is correct
62 Correct 3 ms 11352 KB Output is correct
63 Correct 2 ms 11356 KB Output is correct
64 Correct 2 ms 11448 KB Output is correct
65 Correct 2 ms 11356 KB Output is correct
66 Correct 3 ms 11356 KB Output is correct
67 Correct 2 ms 11356 KB Output is correct
68 Correct 2 ms 11416 KB Output is correct
69 Correct 2 ms 11356 KB Output is correct
70 Correct 2 ms 11356 KB Output is correct
71 Correct 2 ms 11360 KB Output is correct
72 Correct 2 ms 11360 KB Output is correct
73 Correct 2 ms 11356 KB Output is correct
74 Correct 2 ms 11360 KB Output is correct
75 Correct 2 ms 11360 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 11356 KB Output is correct
2 Correct 2 ms 11356 KB Output is correct
3 Correct 2 ms 11356 KB Output is correct
4 Correct 2 ms 11356 KB Output is correct
5 Correct 3 ms 11356 KB Output is correct
6 Correct 3 ms 11352 KB Output is correct
7 Correct 3 ms 11352 KB Output is correct
8 Correct 2 ms 11356 KB Output is correct
9 Correct 2 ms 11332 KB Output is correct
10 Correct 3 ms 11356 KB Output is correct
11 Correct 2 ms 11412 KB Output is correct
12 Correct 2 ms 11352 KB Output is correct
13 Correct 2 ms 11352 KB Output is correct
14 Correct 2 ms 11356 KB Output is correct
15 Correct 2 ms 11356 KB Output is correct
16 Correct 2 ms 11352 KB Output is correct
17 Correct 2 ms 11408 KB Output is correct
18 Correct 2 ms 11356 KB Output is correct
19 Correct 2 ms 11608 KB Output is correct
20 Correct 3 ms 11356 KB Output is correct
21 Correct 2 ms 11356 KB Output is correct
22 Correct 3 ms 11356 KB Output is correct
23 Correct 2 ms 11356 KB Output is correct
24 Correct 2 ms 11356 KB Output is correct
25 Correct 2 ms 11416 KB Output is correct
26 Correct 3 ms 11428 KB Output is correct
27 Correct 4 ms 11868 KB Output is correct
28 Correct 3 ms 11868 KB Output is correct
29 Correct 3 ms 11864 KB Output is correct
30 Correct 4 ms 11868 KB Output is correct
31 Correct 4 ms 12120 KB Output is correct
32 Correct 4 ms 11864 KB Output is correct
33 Correct 4 ms 12120 KB Output is correct
34 Correct 3 ms 11356 KB Output is correct
35 Correct 2 ms 11356 KB Output is correct
36 Correct 2 ms 11356 KB Output is correct
37 Correct 2 ms 11356 KB Output is correct
38 Correct 2 ms 11356 KB Output is correct
39 Correct 2 ms 11356 KB Output is correct
40 Correct 2 ms 11352 KB Output is correct
41 Correct 2 ms 11356 KB Output is correct
42 Correct 3 ms 11424 KB Output is correct
43 Correct 2 ms 11356 KB Output is correct
44 Correct 3 ms 11356 KB Output is correct
45 Correct 2 ms 11356 KB Output is correct
46 Correct 2 ms 11356 KB Output is correct
47 Correct 2 ms 11356 KB Output is correct
48 Correct 2 ms 11356 KB Output is correct
49 Correct 2 ms 11356 KB Output is correct
50 Correct 2 ms 11356 KB Output is correct
51 Correct 2 ms 11356 KB Output is correct
52 Correct 2 ms 11352 KB Output is correct
53 Correct 2 ms 11356 KB Output is correct
54 Correct 2 ms 11356 KB Output is correct
55 Correct 3 ms 11356 KB Output is correct
56 Correct 2 ms 11352 KB Output is correct
57 Correct 2 ms 11352 KB Output is correct
58 Correct 2 ms 11356 KB Output is correct
59 Correct 2 ms 11356 KB Output is correct
60 Correct 2 ms 11356 KB Output is correct
61 Correct 2 ms 11420 KB Output is correct
62 Correct 3 ms 11356 KB Output is correct
63 Correct 2 ms 11352 KB Output is correct
64 Correct 2 ms 11420 KB Output is correct
65 Correct 2 ms 11352 KB Output is correct
66 Correct 2 ms 11356 KB Output is correct
67 Correct 2 ms 11356 KB Output is correct
68 Correct 2 ms 11356 KB Output is correct
69 Correct 2 ms 11352 KB Output is correct
70 Correct 3 ms 11352 KB Output is correct
71 Correct 2 ms 11356 KB Output is correct
72 Correct 2 ms 11448 KB Output is correct
73 Correct 2 ms 11356 KB Output is correct
74 Correct 3 ms 11356 KB Output is correct
75 Correct 2 ms 11356 KB Output is correct
76 Correct 2 ms 11416 KB Output is correct
77 Correct 2 ms 11356 KB Output is correct
78 Correct 2 ms 11356 KB Output is correct
79 Correct 2 ms 11360 KB Output is correct
80 Correct 2 ms 11360 KB Output is correct
81 Correct 2 ms 11356 KB Output is correct
82 Correct 2 ms 11360 KB Output is correct
83 Correct 2 ms 11360 KB Output is correct
84 Correct 3 ms 11544 KB Output is correct
85 Correct 4 ms 11356 KB Output is correct
86 Correct 3 ms 11352 KB Output is correct
87 Correct 3 ms 11356 KB Output is correct
88 Correct 3 ms 11352 KB Output is correct
89 Correct 4 ms 11868 KB Output is correct
90 Correct 4 ms 11612 KB Output is correct
91 Correct 3 ms 11868 KB Output is correct
92 Correct 4 ms 11636 KB Output is correct
93 Correct 4 ms 11868 KB Output is correct
94 Correct 3 ms 11864 KB Output is correct
95 Correct 4 ms 11612 KB Output is correct
96 Correct 3 ms 11612 KB Output is correct
97 Correct 4 ms 11748 KB Output is correct
98 Correct 4 ms 11768 KB Output is correct
99 Correct 4 ms 11868 KB Output is correct
100 Correct 4 ms 11612 KB Output is correct
101 Correct 3 ms 11476 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 11356 KB Output is correct
2 Correct 2 ms 11356 KB Output is correct
3 Correct 2 ms 11356 KB Output is correct
4 Correct 2 ms 11356 KB Output is correct
5 Correct 3 ms 11356 KB Output is correct
6 Correct 3 ms 11352 KB Output is correct
7 Correct 3 ms 11352 KB Output is correct
8 Correct 2 ms 11356 KB Output is correct
9 Correct 2 ms 11332 KB Output is correct
10 Correct 3 ms 11356 KB Output is correct
11 Correct 2 ms 11412 KB Output is correct
12 Correct 2 ms 11352 KB Output is correct
13 Correct 2 ms 11352 KB Output is correct
14 Correct 2 ms 11356 KB Output is correct
15 Correct 2 ms 11356 KB Output is correct
16 Correct 2 ms 11352 KB Output is correct
17 Correct 2 ms 11408 KB Output is correct
18 Correct 2 ms 11356 KB Output is correct
19 Correct 2 ms 11608 KB Output is correct
20 Correct 3 ms 11356 KB Output is correct
21 Correct 2 ms 11356 KB Output is correct
22 Correct 3 ms 11356 KB Output is correct
23 Correct 2 ms 11356 KB Output is correct
24 Correct 2 ms 11356 KB Output is correct
25 Correct 2 ms 11416 KB Output is correct
26 Correct 3 ms 11428 KB Output is correct
27 Correct 4 ms 11868 KB Output is correct
28 Correct 3 ms 11868 KB Output is correct
29 Correct 3 ms 11864 KB Output is correct
30 Correct 4 ms 11868 KB Output is correct
31 Correct 4 ms 12120 KB Output is correct
32 Correct 4 ms 11864 KB Output is correct
33 Correct 4 ms 12120 KB Output is correct
34 Correct 3 ms 11356 KB Output is correct
35 Correct 2 ms 11356 KB Output is correct
36 Correct 2 ms 11356 KB Output is correct
37 Correct 2 ms 11356 KB Output is correct
38 Correct 2 ms 11356 KB Output is correct
39 Correct 2 ms 11356 KB Output is correct
40 Correct 2 ms 11352 KB Output is correct
41 Correct 2 ms 11356 KB Output is correct
42 Correct 3 ms 11424 KB Output is correct
43 Correct 2 ms 11356 KB Output is correct
44 Correct 3 ms 11356 KB Output is correct
45 Correct 2 ms 11356 KB Output is correct
46 Correct 2 ms 11356 KB Output is correct
47 Correct 2 ms 11356 KB Output is correct
48 Correct 2 ms 11356 KB Output is correct
49 Correct 2 ms 11356 KB Output is correct
50 Correct 2 ms 11356 KB Output is correct
51 Correct 2 ms 11356 KB Output is correct
52 Correct 2 ms 11352 KB Output is correct
53 Correct 2 ms 11356 KB Output is correct
54 Correct 2 ms 11356 KB Output is correct
55 Correct 3 ms 11356 KB Output is correct
56 Correct 2 ms 11352 KB Output is correct
57 Correct 2 ms 11352 KB Output is correct
58 Correct 2 ms 11356 KB Output is correct
59 Correct 2 ms 11356 KB Output is correct
60 Correct 2 ms 11356 KB Output is correct
61 Correct 2 ms 11420 KB Output is correct
62 Correct 3 ms 11356 KB Output is correct
63 Correct 2 ms 11352 KB Output is correct
64 Correct 2 ms 11420 KB Output is correct
65 Correct 2 ms 11352 KB Output is correct
66 Correct 2 ms 11356 KB Output is correct
67 Correct 2 ms 11356 KB Output is correct
68 Correct 2 ms 11356 KB Output is correct
69 Correct 2 ms 11352 KB Output is correct
70 Correct 3 ms 11352 KB Output is correct
71 Correct 2 ms 11356 KB Output is correct
72 Correct 2 ms 11448 KB Output is correct
73 Correct 2 ms 11356 KB Output is correct
74 Correct 3 ms 11356 KB Output is correct
75 Correct 2 ms 11356 KB Output is correct
76 Correct 2 ms 11416 KB Output is correct
77 Correct 2 ms 11356 KB Output is correct
78 Correct 2 ms 11356 KB Output is correct
79 Correct 2 ms 11360 KB Output is correct
80 Correct 2 ms 11360 KB Output is correct
81 Correct 2 ms 11356 KB Output is correct
82 Correct 2 ms 11360 KB Output is correct
83 Correct 2 ms 11360 KB Output is correct
84 Correct 3 ms 11544 KB Output is correct
85 Correct 4 ms 11356 KB Output is correct
86 Correct 3 ms 11352 KB Output is correct
87 Correct 3 ms 11356 KB Output is correct
88 Correct 3 ms 11352 KB Output is correct
89 Correct 4 ms 11868 KB Output is correct
90 Correct 4 ms 11612 KB Output is correct
91 Correct 3 ms 11868 KB Output is correct
92 Correct 4 ms 11636 KB Output is correct
93 Correct 4 ms 11868 KB Output is correct
94 Correct 3 ms 11864 KB Output is correct
95 Correct 4 ms 11612 KB Output is correct
96 Correct 3 ms 11612 KB Output is correct
97 Correct 4 ms 11748 KB Output is correct
98 Correct 4 ms 11768 KB Output is correct
99 Correct 4 ms 11868 KB Output is correct
100 Correct 4 ms 11612 KB Output is correct
101 Correct 3 ms 11476 KB Output is correct
102 Correct 81 ms 16524 KB Output is correct
103 Correct 90 ms 16676 KB Output is correct
104 Correct 157 ms 40604 KB Output is correct
105 Correct 94 ms 17892 KB Output is correct
106 Correct 98 ms 17632 KB Output is correct
107 Correct 89 ms 32708 KB Output is correct
108 Correct 88 ms 31936 KB Output is correct
109 Correct 74 ms 41668 KB Output is correct
110 Correct 203 ms 38592 KB Output is correct
111 Correct 114 ms 43452 KB Output is correct
112 Correct 147 ms 38384 KB Output is correct
113 Correct 121 ms 39612 KB Output is correct
114 Correct 122 ms 38352 KB Output is correct
115 Correct 112 ms 41416 KB Output is correct
116 Correct 174 ms 41320 KB Output is correct
117 Correct 146 ms 41668 KB Output is correct
118 Correct 162 ms 38720 KB Output is correct
119 Correct 110 ms 20512 KB Output is correct
120 Correct 75 ms 15964 KB Output is correct