답안 #840280

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
840280 2023-08-31T09:24:06 Z mohammad_kilani 봉쇄 시간 (IOI23_closing) C++17
100 / 100
221 ms 49376 KB
#include "closing.h"
#include <vector>
#include <bits/stdc++.h>
using namespace std;

int n , x , y;

long long k;
const int N = 200010;

vector< pair< int , int > > g[N];

long long a[N] , b[N];

void DFS(int node,int prnt,long long *a,long long dist){
    a[node] = dist;
    for(int i = 0 ;i < (int)g[node].size();i++){
        if(g[node][i].first != prnt)
            DFS(g[node][i].first , node , a , dist + g[node][i].second);
    }
}

vector< bool > onpath;

bool DFS(int node,int prnt){
    onpath[node] = true;
    if(node == y)
    return true;
    for(int i = 0 ;i < (int)g[node].size();i++){
        if(g[node][i].first == prnt) continue;
        if(DFS(g[node][i].first , node))
        return true;
    }
    onpath[node] = false;
    return false;
}

long long seg[4 * N];

int seg2[4 * N];

void update(int s,int e,int idx,int Idx,long long val,int val2){
    if(s > Idx || e < Idx)
        return;
    if(s == e){
       seg[idx] = val;
        seg2[idx] = val2;
        return;
    }
    update(s, ((s+e) >> 1) , (idx << 1) , Idx , val , val2);
    update(((s+e) >> 1) + 1,e,(idx << 1) + 1 , Idx , val , val2);
    seg[idx] = seg[(idx << 1)] + seg[(idx << 1) + 1];
    seg2[idx] = seg2[(idx << 1)] + seg2[(idx << 1) + 1];
}

int get(int s,int e,int idx,long long can){
    if(can >= seg[idx])
        return seg2[idx];
    if(s == e)
        return 0;
    if(can >= seg[(idx << 1)])
        return get(((s+e) >> 1) + 1,e,(idx << 1) + 1, can - seg[(idx << 1)]) + seg2[(idx << 1)];
    return get(s, ((s+e) >> 1),(idx << 1), can);
}

int max_score(int N, int X, int Y, long long K,std::vector<int> U, std::vector<int> V, std::vector<int> W)
{   
    n = N, x = X , y = Y , k = K;
    for(int i = 0;i < n;i++) g[i].clear();
    onpath = vector< bool > (n , 0);
    for(int i = 0 ;i < 4 * n;i++) seg[i] = 0, seg2[i] = 0;
    for(int i = 0 ;i < (int)U.size();i++){
        g[U[i]].push_back(make_pair(V[i] , W[i]));
        g[V[i]].push_back(make_pair(U[i] , W[i]));
    }
    DFS(X , -1 , a , 0);
    DFS(Y, - 1, b , 0);
    vector< long long > v;
    for(int i = 0 ;i < n;i++){
        if(a[i] > b[i]) swap(a[i] , b[i]);
        v.push_back(a[i]);
    }
    sort(v.begin(),v.end());
    int ans = 0;
    long long cur = 0;
    while(ans < (int)v.size() && v[ans] + cur <= k) cur += v[ans++];

    cur = 0;
    DFS(X , -1);

    vector< pair< long long , long long > > v2;
    vector< pair< long long , pair< long long , int > > > v3;

    priority_queue < long long > q1;

    int has = 0;
    for(int i = 0 ;i < n;i++){
        if(onpath[i]){
            cur += a[i];
            q1.push(a[i] - b[i]);
            has++;
        }
        else{
            //cout << i << " " << a[i] << " " << b[i] << " ready for two with " << b[i] << endl;
            v2.push_back(make_pair(b[i] , a[i]));
        }
    }
    if(cur > k) return ans;
    sort(v2.begin(),v2.end());
    for(int i = 0 ;i < (int)v2.size();i++){
        v3.push_back(make_pair(v2[i].second , make_pair(v2[i].first , i)));
    }
    sort(v3.begin(),v3.end());
    reverse(v3.begin(),v3.end());

    for(int i = 0 ;i < (int)v3.size();i++){
        update(0 , n - 1 , 1, v3[i].second.second , v3[i].second.first , 1);
    }

    ans = max(ans , has + get(0 , n - 1 , 1 ,k - cur) * 2);

    //cout << has << " " << get(0 , n - 1 , 1 ,k - cur) << " " << cur << endl;

    while((int)v3.size() > 0 || (int)q1.size() > 0){
        if(cur > k) break;
        if((int)v3.size() == 0 || (((int)q1.size() > 0) && (-q1.top() < v3.back().first))){
            cur -= q1.top();
            q1.pop();
            has++;
        }
        else{
            cur += v3.back().first;
            has++;
            q1.push(v3.back().first - v3.back().second.first);
            update(0 , n - 1 , 1 , v3.back().second.second , 0 , 0);
            v3.pop_back();
        }
        if(cur > k) break;
       // cout << has << " " << get(0 , n - 1 , 1 ,k - cur) << endl;
        ans = max(ans , has + get(0 , n - 1 , 1 ,k - cur) * 2);
    }
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4948 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 118 ms 42764 KB Output is correct
2 Correct 131 ms 46504 KB Output is correct
3 Correct 63 ms 7624 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4948 KB Output is correct
2 Correct 2 ms 4948 KB Output is correct
3 Correct 2 ms 4948 KB Output is correct
4 Correct 2 ms 4948 KB Output is correct
5 Correct 2 ms 4948 KB Output is correct
6 Correct 2 ms 4948 KB Output is correct
7 Correct 2 ms 4948 KB Output is correct
8 Correct 2 ms 4948 KB Output is correct
9 Correct 2 ms 4948 KB Output is correct
10 Correct 2 ms 4948 KB Output is correct
11 Correct 2 ms 4948 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4948 KB Output is correct
2 Correct 2 ms 4948 KB Output is correct
3 Correct 2 ms 4948 KB Output is correct
4 Correct 2 ms 4948 KB Output is correct
5 Correct 2 ms 4948 KB Output is correct
6 Correct 2 ms 4948 KB Output is correct
7 Correct 2 ms 4948 KB Output is correct
8 Correct 2 ms 4948 KB Output is correct
9 Correct 2 ms 4948 KB Output is correct
10 Correct 2 ms 4948 KB Output is correct
11 Correct 2 ms 4948 KB Output is correct
12 Correct 2 ms 4948 KB Output is correct
13 Correct 3 ms 4948 KB Output is correct
14 Correct 2 ms 4948 KB Output is correct
15 Correct 2 ms 4948 KB Output is correct
16 Correct 2 ms 4948 KB Output is correct
17 Correct 2 ms 4948 KB Output is correct
18 Correct 3 ms 4940 KB Output is correct
19 Correct 4 ms 5076 KB Output is correct
20 Correct 2 ms 5076 KB Output is correct
21 Correct 2 ms 5076 KB Output is correct
22 Correct 2 ms 5088 KB Output is correct
23 Correct 2 ms 5076 KB Output is correct
24 Correct 2 ms 5076 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4948 KB Output is correct
2 Correct 2 ms 4948 KB Output is correct
3 Correct 2 ms 4948 KB Output is correct
4 Correct 2 ms 4948 KB Output is correct
5 Correct 2 ms 4948 KB Output is correct
6 Correct 2 ms 4948 KB Output is correct
7 Correct 2 ms 4948 KB Output is correct
8 Correct 2 ms 4948 KB Output is correct
9 Correct 2 ms 4948 KB Output is correct
10 Correct 2 ms 4948 KB Output is correct
11 Correct 2 ms 4948 KB Output is correct
12 Correct 2 ms 4948 KB Output is correct
13 Correct 3 ms 4948 KB Output is correct
14 Correct 2 ms 4948 KB Output is correct
15 Correct 2 ms 4948 KB Output is correct
16 Correct 2 ms 4948 KB Output is correct
17 Correct 2 ms 4948 KB Output is correct
18 Correct 3 ms 4940 KB Output is correct
19 Correct 4 ms 5076 KB Output is correct
20 Correct 2 ms 5076 KB Output is correct
21 Correct 2 ms 5076 KB Output is correct
22 Correct 2 ms 5088 KB Output is correct
23 Correct 2 ms 5076 KB Output is correct
24 Correct 2 ms 5076 KB Output is correct
25 Correct 3 ms 5076 KB Output is correct
26 Correct 4 ms 5804 KB Output is correct
27 Correct 5 ms 5676 KB Output is correct
28 Correct 3 ms 5588 KB Output is correct
29 Correct 4 ms 5660 KB Output is correct
30 Correct 3 ms 5588 KB Output is correct
31 Correct 3 ms 5588 KB Output is correct
32 Correct 3 ms 5588 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4948 KB Output is correct
2 Correct 2 ms 4948 KB Output is correct
3 Correct 2 ms 4948 KB Output is correct
4 Correct 2 ms 4948 KB Output is correct
5 Correct 2 ms 4948 KB Output is correct
6 Correct 2 ms 4948 KB Output is correct
7 Correct 2 ms 4948 KB Output is correct
8 Correct 2 ms 4948 KB Output is correct
9 Correct 2 ms 4948 KB Output is correct
10 Correct 2 ms 4948 KB Output is correct
11 Correct 3 ms 4948 KB Output is correct
12 Correct 2 ms 5028 KB Output is correct
13 Correct 2 ms 4948 KB Output is correct
14 Correct 2 ms 4948 KB Output is correct
15 Correct 2 ms 4952 KB Output is correct
16 Correct 2 ms 4948 KB Output is correct
17 Correct 2 ms 4948 KB Output is correct
18 Correct 2 ms 4948 KB Output is correct
19 Correct 2 ms 4948 KB Output is correct
20 Correct 2 ms 4948 KB Output is correct
21 Correct 2 ms 4948 KB Output is correct
22 Correct 2 ms 4948 KB Output is correct
23 Correct 2 ms 4948 KB Output is correct
24 Correct 2 ms 4948 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4948 KB Output is correct
2 Correct 2 ms 4948 KB Output is correct
3 Correct 2 ms 4948 KB Output is correct
4 Correct 2 ms 4948 KB Output is correct
5 Correct 2 ms 4948 KB Output is correct
6 Correct 2 ms 4948 KB Output is correct
7 Correct 2 ms 4948 KB Output is correct
8 Correct 2 ms 4948 KB Output is correct
9 Correct 2 ms 4948 KB Output is correct
10 Correct 2 ms 4948 KB Output is correct
11 Correct 2 ms 4948 KB Output is correct
12 Correct 2 ms 4948 KB Output is correct
13 Correct 2 ms 4948 KB Output is correct
14 Correct 3 ms 4948 KB Output is correct
15 Correct 2 ms 4948 KB Output is correct
16 Correct 2 ms 4948 KB Output is correct
17 Correct 2 ms 4948 KB Output is correct
18 Correct 2 ms 4948 KB Output is correct
19 Correct 2 ms 4948 KB Output is correct
20 Correct 2 ms 4948 KB Output is correct
21 Correct 2 ms 4948 KB Output is correct
22 Correct 2 ms 4948 KB Output is correct
23 Correct 3 ms 4948 KB Output is correct
24 Correct 2 ms 5028 KB Output is correct
25 Correct 2 ms 4948 KB Output is correct
26 Correct 2 ms 4948 KB Output is correct
27 Correct 2 ms 4952 KB Output is correct
28 Correct 2 ms 4948 KB Output is correct
29 Correct 2 ms 4948 KB Output is correct
30 Correct 2 ms 4948 KB Output is correct
31 Correct 2 ms 4948 KB Output is correct
32 Correct 2 ms 4948 KB Output is correct
33 Correct 2 ms 4948 KB Output is correct
34 Correct 2 ms 4948 KB Output is correct
35 Correct 2 ms 4948 KB Output is correct
36 Correct 2 ms 4948 KB Output is correct
37 Correct 2 ms 4948 KB Output is correct
38 Correct 2 ms 4948 KB Output is correct
39 Correct 3 ms 4948 KB Output is correct
40 Correct 2 ms 4948 KB Output is correct
41 Correct 2 ms 4948 KB Output is correct
42 Correct 2 ms 4948 KB Output is correct
43 Correct 3 ms 4948 KB Output is correct
44 Correct 2 ms 4948 KB Output is correct
45 Correct 2 ms 4948 KB Output is correct
46 Correct 2 ms 4948 KB Output is correct
47 Correct 2 ms 4948 KB Output is correct
48 Correct 2 ms 5016 KB Output is correct
49 Correct 2 ms 4948 KB Output is correct
50 Correct 2 ms 4948 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4948 KB Output is correct
2 Correct 2 ms 4948 KB Output is correct
3 Correct 2 ms 4948 KB Output is correct
4 Correct 2 ms 4948 KB Output is correct
5 Correct 2 ms 4948 KB Output is correct
6 Correct 2 ms 4948 KB Output is correct
7 Correct 2 ms 4948 KB Output is correct
8 Correct 2 ms 4948 KB Output is correct
9 Correct 2 ms 4948 KB Output is correct
10 Correct 2 ms 4948 KB Output is correct
11 Correct 2 ms 4948 KB Output is correct
12 Correct 2 ms 4948 KB Output is correct
13 Correct 2 ms 4948 KB Output is correct
14 Correct 3 ms 4948 KB Output is correct
15 Correct 2 ms 4948 KB Output is correct
16 Correct 2 ms 4948 KB Output is correct
17 Correct 2 ms 4948 KB Output is correct
18 Correct 2 ms 4948 KB Output is correct
19 Correct 3 ms 4940 KB Output is correct
20 Correct 4 ms 5076 KB Output is correct
21 Correct 2 ms 5076 KB Output is correct
22 Correct 2 ms 5076 KB Output is correct
23 Correct 2 ms 5088 KB Output is correct
24 Correct 2 ms 5076 KB Output is correct
25 Correct 2 ms 5076 KB Output is correct
26 Correct 2 ms 4948 KB Output is correct
27 Correct 2 ms 4948 KB Output is correct
28 Correct 2 ms 4948 KB Output is correct
29 Correct 2 ms 4948 KB Output is correct
30 Correct 3 ms 4948 KB Output is correct
31 Correct 2 ms 5028 KB Output is correct
32 Correct 2 ms 4948 KB Output is correct
33 Correct 2 ms 4948 KB Output is correct
34 Correct 2 ms 4952 KB Output is correct
35 Correct 2 ms 4948 KB Output is correct
36 Correct 2 ms 4948 KB Output is correct
37 Correct 2 ms 4948 KB Output is correct
38 Correct 2 ms 4948 KB Output is correct
39 Correct 2 ms 4948 KB Output is correct
40 Correct 2 ms 4948 KB Output is correct
41 Correct 2 ms 4948 KB Output is correct
42 Correct 2 ms 4948 KB Output is correct
43 Correct 2 ms 4948 KB Output is correct
44 Correct 2 ms 4948 KB Output is correct
45 Correct 2 ms 4948 KB Output is correct
46 Correct 3 ms 4948 KB Output is correct
47 Correct 2 ms 4948 KB Output is correct
48 Correct 2 ms 4948 KB Output is correct
49 Correct 2 ms 4948 KB Output is correct
50 Correct 3 ms 4948 KB Output is correct
51 Correct 2 ms 4948 KB Output is correct
52 Correct 2 ms 4948 KB Output is correct
53 Correct 2 ms 4948 KB Output is correct
54 Correct 2 ms 4948 KB Output is correct
55 Correct 2 ms 5016 KB Output is correct
56 Correct 2 ms 4948 KB Output is correct
57 Correct 2 ms 4948 KB Output is correct
58 Correct 2 ms 4948 KB Output is correct
59 Correct 2 ms 4948 KB Output is correct
60 Correct 2 ms 4948 KB Output is correct
61 Correct 2 ms 4948 KB Output is correct
62 Correct 2 ms 4948 KB Output is correct
63 Correct 3 ms 5096 KB Output is correct
64 Correct 2 ms 5076 KB Output is correct
65 Correct 2 ms 5076 KB Output is correct
66 Correct 2 ms 5076 KB Output is correct
67 Correct 2 ms 5076 KB Output is correct
68 Correct 2 ms 5076 KB Output is correct
69 Correct 3 ms 5076 KB Output is correct
70 Correct 2 ms 5076 KB Output is correct
71 Correct 2 ms 5076 KB Output is correct
72 Correct 3 ms 5076 KB Output is correct
73 Correct 3 ms 5076 KB Output is correct
74 Correct 2 ms 5076 KB Output is correct
75 Correct 2 ms 4948 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4948 KB Output is correct
2 Correct 2 ms 4948 KB Output is correct
3 Correct 2 ms 4948 KB Output is correct
4 Correct 2 ms 4948 KB Output is correct
5 Correct 2 ms 4948 KB Output is correct
6 Correct 2 ms 4948 KB Output is correct
7 Correct 2 ms 4948 KB Output is correct
8 Correct 2 ms 4948 KB Output is correct
9 Correct 2 ms 4948 KB Output is correct
10 Correct 2 ms 4948 KB Output is correct
11 Correct 2 ms 4948 KB Output is correct
12 Correct 2 ms 4948 KB Output is correct
13 Correct 2 ms 4948 KB Output is correct
14 Correct 3 ms 4948 KB Output is correct
15 Correct 2 ms 4948 KB Output is correct
16 Correct 2 ms 4948 KB Output is correct
17 Correct 2 ms 4948 KB Output is correct
18 Correct 2 ms 4948 KB Output is correct
19 Correct 3 ms 4940 KB Output is correct
20 Correct 4 ms 5076 KB Output is correct
21 Correct 2 ms 5076 KB Output is correct
22 Correct 2 ms 5076 KB Output is correct
23 Correct 2 ms 5088 KB Output is correct
24 Correct 2 ms 5076 KB Output is correct
25 Correct 2 ms 5076 KB Output is correct
26 Correct 3 ms 5076 KB Output is correct
27 Correct 4 ms 5804 KB Output is correct
28 Correct 5 ms 5676 KB Output is correct
29 Correct 3 ms 5588 KB Output is correct
30 Correct 4 ms 5660 KB Output is correct
31 Correct 3 ms 5588 KB Output is correct
32 Correct 3 ms 5588 KB Output is correct
33 Correct 3 ms 5588 KB Output is correct
34 Correct 2 ms 4948 KB Output is correct
35 Correct 2 ms 4948 KB Output is correct
36 Correct 2 ms 4948 KB Output is correct
37 Correct 2 ms 4948 KB Output is correct
38 Correct 3 ms 4948 KB Output is correct
39 Correct 2 ms 5028 KB Output is correct
40 Correct 2 ms 4948 KB Output is correct
41 Correct 2 ms 4948 KB Output is correct
42 Correct 2 ms 4952 KB Output is correct
43 Correct 2 ms 4948 KB Output is correct
44 Correct 2 ms 4948 KB Output is correct
45 Correct 2 ms 4948 KB Output is correct
46 Correct 2 ms 4948 KB Output is correct
47 Correct 2 ms 4948 KB Output is correct
48 Correct 2 ms 4948 KB Output is correct
49 Correct 2 ms 4948 KB Output is correct
50 Correct 2 ms 4948 KB Output is correct
51 Correct 2 ms 4948 KB Output is correct
52 Correct 2 ms 4948 KB Output is correct
53 Correct 2 ms 4948 KB Output is correct
54 Correct 3 ms 4948 KB Output is correct
55 Correct 2 ms 4948 KB Output is correct
56 Correct 2 ms 4948 KB Output is correct
57 Correct 2 ms 4948 KB Output is correct
58 Correct 3 ms 4948 KB Output is correct
59 Correct 2 ms 4948 KB Output is correct
60 Correct 2 ms 4948 KB Output is correct
61 Correct 2 ms 4948 KB Output is correct
62 Correct 2 ms 4948 KB Output is correct
63 Correct 2 ms 5016 KB Output is correct
64 Correct 2 ms 4948 KB Output is correct
65 Correct 2 ms 4948 KB Output is correct
66 Correct 2 ms 4948 KB Output is correct
67 Correct 2 ms 4948 KB Output is correct
68 Correct 2 ms 4948 KB Output is correct
69 Correct 2 ms 4948 KB Output is correct
70 Correct 2 ms 4948 KB Output is correct
71 Correct 3 ms 5096 KB Output is correct
72 Correct 2 ms 5076 KB Output is correct
73 Correct 2 ms 5076 KB Output is correct
74 Correct 2 ms 5076 KB Output is correct
75 Correct 2 ms 5076 KB Output is correct
76 Correct 2 ms 5076 KB Output is correct
77 Correct 3 ms 5076 KB Output is correct
78 Correct 2 ms 5076 KB Output is correct
79 Correct 2 ms 5076 KB Output is correct
80 Correct 3 ms 5076 KB Output is correct
81 Correct 3 ms 5076 KB Output is correct
82 Correct 2 ms 5076 KB Output is correct
83 Correct 2 ms 4948 KB Output is correct
84 Correct 3 ms 5076 KB Output is correct
85 Correct 4 ms 5076 KB Output is correct
86 Correct 3 ms 5016 KB Output is correct
87 Correct 3 ms 5076 KB Output is correct
88 Correct 3 ms 5076 KB Output is correct
89 Correct 5 ms 5588 KB Output is correct
90 Correct 4 ms 5588 KB Output is correct
91 Correct 5 ms 5588 KB Output is correct
92 Correct 4 ms 5588 KB Output is correct
93 Correct 3 ms 5460 KB Output is correct
94 Correct 4 ms 5588 KB Output is correct
95 Correct 4 ms 5556 KB Output is correct
96 Correct 3 ms 5460 KB Output is correct
97 Correct 5 ms 5588 KB Output is correct
98 Correct 5 ms 5588 KB Output is correct
99 Correct 5 ms 5660 KB Output is correct
100 Correct 5 ms 5424 KB Output is correct
101 Correct 4 ms 5164 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 4948 KB Output is correct
2 Correct 2 ms 4948 KB Output is correct
3 Correct 2 ms 4948 KB Output is correct
4 Correct 2 ms 4948 KB Output is correct
5 Correct 2 ms 4948 KB Output is correct
6 Correct 2 ms 4948 KB Output is correct
7 Correct 2 ms 4948 KB Output is correct
8 Correct 2 ms 4948 KB Output is correct
9 Correct 2 ms 4948 KB Output is correct
10 Correct 2 ms 4948 KB Output is correct
11 Correct 2 ms 4948 KB Output is correct
12 Correct 2 ms 4948 KB Output is correct
13 Correct 2 ms 4948 KB Output is correct
14 Correct 3 ms 4948 KB Output is correct
15 Correct 2 ms 4948 KB Output is correct
16 Correct 2 ms 4948 KB Output is correct
17 Correct 2 ms 4948 KB Output is correct
18 Correct 2 ms 4948 KB Output is correct
19 Correct 3 ms 4940 KB Output is correct
20 Correct 4 ms 5076 KB Output is correct
21 Correct 2 ms 5076 KB Output is correct
22 Correct 2 ms 5076 KB Output is correct
23 Correct 2 ms 5088 KB Output is correct
24 Correct 2 ms 5076 KB Output is correct
25 Correct 2 ms 5076 KB Output is correct
26 Correct 3 ms 5076 KB Output is correct
27 Correct 4 ms 5804 KB Output is correct
28 Correct 5 ms 5676 KB Output is correct
29 Correct 3 ms 5588 KB Output is correct
30 Correct 4 ms 5660 KB Output is correct
31 Correct 3 ms 5588 KB Output is correct
32 Correct 3 ms 5588 KB Output is correct
33 Correct 3 ms 5588 KB Output is correct
34 Correct 2 ms 4948 KB Output is correct
35 Correct 2 ms 4948 KB Output is correct
36 Correct 2 ms 4948 KB Output is correct
37 Correct 2 ms 4948 KB Output is correct
38 Correct 3 ms 4948 KB Output is correct
39 Correct 2 ms 5028 KB Output is correct
40 Correct 2 ms 4948 KB Output is correct
41 Correct 2 ms 4948 KB Output is correct
42 Correct 2 ms 4952 KB Output is correct
43 Correct 2 ms 4948 KB Output is correct
44 Correct 2 ms 4948 KB Output is correct
45 Correct 2 ms 4948 KB Output is correct
46 Correct 2 ms 4948 KB Output is correct
47 Correct 2 ms 4948 KB Output is correct
48 Correct 2 ms 4948 KB Output is correct
49 Correct 2 ms 4948 KB Output is correct
50 Correct 2 ms 4948 KB Output is correct
51 Correct 2 ms 4948 KB Output is correct
52 Correct 2 ms 4948 KB Output is correct
53 Correct 2 ms 4948 KB Output is correct
54 Correct 3 ms 4948 KB Output is correct
55 Correct 2 ms 4948 KB Output is correct
56 Correct 2 ms 4948 KB Output is correct
57 Correct 2 ms 4948 KB Output is correct
58 Correct 3 ms 4948 KB Output is correct
59 Correct 2 ms 4948 KB Output is correct
60 Correct 2 ms 4948 KB Output is correct
61 Correct 2 ms 4948 KB Output is correct
62 Correct 2 ms 4948 KB Output is correct
63 Correct 2 ms 5016 KB Output is correct
64 Correct 2 ms 4948 KB Output is correct
65 Correct 2 ms 4948 KB Output is correct
66 Correct 2 ms 4948 KB Output is correct
67 Correct 2 ms 4948 KB Output is correct
68 Correct 2 ms 4948 KB Output is correct
69 Correct 2 ms 4948 KB Output is correct
70 Correct 2 ms 4948 KB Output is correct
71 Correct 3 ms 5096 KB Output is correct
72 Correct 2 ms 5076 KB Output is correct
73 Correct 2 ms 5076 KB Output is correct
74 Correct 2 ms 5076 KB Output is correct
75 Correct 2 ms 5076 KB Output is correct
76 Correct 2 ms 5076 KB Output is correct
77 Correct 3 ms 5076 KB Output is correct
78 Correct 2 ms 5076 KB Output is correct
79 Correct 2 ms 5076 KB Output is correct
80 Correct 3 ms 5076 KB Output is correct
81 Correct 3 ms 5076 KB Output is correct
82 Correct 2 ms 5076 KB Output is correct
83 Correct 2 ms 4948 KB Output is correct
84 Correct 3 ms 5076 KB Output is correct
85 Correct 4 ms 5076 KB Output is correct
86 Correct 3 ms 5016 KB Output is correct
87 Correct 3 ms 5076 KB Output is correct
88 Correct 3 ms 5076 KB Output is correct
89 Correct 5 ms 5588 KB Output is correct
90 Correct 4 ms 5588 KB Output is correct
91 Correct 5 ms 5588 KB Output is correct
92 Correct 4 ms 5588 KB Output is correct
93 Correct 3 ms 5460 KB Output is correct
94 Correct 4 ms 5588 KB Output is correct
95 Correct 4 ms 5556 KB Output is correct
96 Correct 3 ms 5460 KB Output is correct
97 Correct 5 ms 5588 KB Output is correct
98 Correct 5 ms 5588 KB Output is correct
99 Correct 5 ms 5660 KB Output is correct
100 Correct 5 ms 5424 KB Output is correct
101 Correct 4 ms 5164 KB Output is correct
102 Correct 103 ms 7676 KB Output is correct
103 Correct 115 ms 7488 KB Output is correct
104 Correct 193 ms 46980 KB Output is correct
105 Correct 141 ms 9908 KB Output is correct
106 Correct 115 ms 8568 KB Output is correct
107 Correct 145 ms 41448 KB Output is correct
108 Correct 132 ms 42016 KB Output is correct
109 Correct 82 ms 45672 KB Output is correct
110 Correct 221 ms 43572 KB Output is correct
111 Correct 169 ms 49376 KB Output is correct
112 Correct 189 ms 43100 KB Output is correct
113 Correct 156 ms 34144 KB Output is correct
114 Correct 168 ms 43252 KB Output is correct
115 Correct 104 ms 47564 KB Output is correct
116 Correct 203 ms 46756 KB Output is correct
117 Correct 187 ms 39368 KB Output is correct
118 Correct 215 ms 43588 KB Output is correct
119 Correct 139 ms 12968 KB Output is correct
120 Correct 95 ms 7716 KB Output is correct