답안 #1073920

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1073920 2024-08-25T03:26:11 Z DucNguyen2007 Phone Plans (CCO22_day2problem2) C++14
25 / 25
1277 ms 146296 KB
#include<bits/stdc++.h>
#include<fstream>
using namespace std;
#define sz(a) (int)a.size()
#define ALL(v) v.begin(), v.end()
#define ALLR(v) v.rbegin(), v.rend()
#define ll long long
#define pb push_back
#define forr(i, a, b) for(int i = a; i < b; i++)
#define dorr(i, a, b) for(int i = a; i >= b; i--)
#define ld long double
#define vt vector
#include<fstream>
#define fi first
#define se second
#define pll pair<ll, ll>
#define pii pair<int, int>
#define mpp make_pair
const ld PI = 3.14159265359, prec = 1e-9;;
//using u128 = __uint128_t;
//const int x[4] = {1, 0, -1, 0};
//const int y[4] = {0, -1, 0, 1};
const ll mod =1e9 + 7, pr = 31;
const int mxn = 5e5 + 5, mxq = 1e5 + 5, sq = 500, mxv = 5e4 + 1;
//const int base = (1 <<18);
const ll inf = 1e13 + 5, neg = -69420, inf2 = 1e14;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
// have fun!
struct E{
    ll u, v, w;
    bool operator <(const E &other){
        return(w < other.w);
    }
};
struct EV{
    int node, pre, curr;
};
ll n, a, b, k;
ll c2(ll n){
    return(n * (n - 1) / 2);
}
struct DSU{
    ll tot = 0;
    ll pa[mxn + 1], siz[mxn + 1];
    vt<int>node[mxn + 1];
    int fp(int u){
        if(pa[u] == u)return(u);
        return(pa[u] = fp(pa[u]));
    }
    void init(){
        for(int i = 1; i <= n; i++){
            pa[i] = i; siz[i] = 1; node[i].clear(); node[i].pb(i);
        }
        tot = 0;
    }
    vt<EV>unon(int u, int v){
        u = fp(u); v = fp(v);
        vt<EV>events;
        if(u == v)return(events);
        tot += siz[u] * siz[v]; 
        if(siz[u] < siz[v])swap(u, v);
        siz[u] += siz[v]; pa[v] = u;
        for(auto i: node[v]){
            node[u].pb(i); events.pb({i, v, u});
        }
        return(events);
    }
    
};
DSU dsu;
vt<E>edgea, edgeb;
vt<EV>eva[mxn + 1], evb[mxn + 1];
ll canda[mxn + 1], candb[mxn + 1];
int paa[mxn + 1], pab[mxn + 1];
map<pair<int, int>, ll>mp;
void solve(){
    cin >> n >> a >> b >> k;
    if(k == 0){
        cout << 0; return;
    }
    for(int i = 0; i < a; i++){
        int u, v, w; cin >> u >> v >> w;
        edgea.pb({u, v, w});
    }
    for(int i = 0; i < b; i++){
        int u, v, w; cin >> u >> v >> w;
        edgeb.pb({u, v, w});
    }
    sort(ALL(edgea)); sort(ALL(edgeb));
 
    dsu.init();
    ll ans = inf;
    for(int i = 0; i < sz(edgea); i++){
        eva[i + 1] = dsu.unon(edgea[i].u, edgea[i].v); 
        canda[i + 1] = dsu.tot;
        if(dsu.tot >= k)ans = min(ans, edgea[i].w);
    }
    dsu.init();
    
    for(int i = 0; i < sz(edgeb); i++){
        evb[i + 1] = dsu.unon(edgeb[i].u, edgeb[i].v);
        candb[i + 1] = dsu.tot;
        if(dsu.tot >= k)ans = min(ans, edgeb[i].w);
    }
    for(int i = 1; i <= n; i++){
        paa[i] = i; pab[i] = dsu.fp(i);
        mp[mpp(paa[i], pab[i])]++;
    }
    int rp = b;
    ll sme = 0; // belonging to both sets 
    for(int i = 1; i <= a; i++){
        for(auto [node, pre, curr]: eva[i]){
            //cout << node << " " << pre << " " << curr << "\n";
            mp[mpp(paa[node], pab[node])]--;
            sme -= mp[mpp(paa[node], pab[node])];
            //assert(paa[node] == pre);
            paa[node] = curr;
            sme += mp[mpp(paa[node], pab[node])]; 
            mp[mpp(paa[node], pab[node])]++;
        }
        while(canda[i] + candb[rp] - sme >= k && rp >= 1){
            for(auto [node, pre, curr]: evb[rp]){
                mp[mpp(paa[node], pab[node])]--;
                sme -= mp[mpp(paa[node], pab[node])];
                //assert(pab[node] == curr);
                pab[node] = pre;
                sme += mp[mpp(paa[node], pab[node])]; 
                mp[mpp(paa[node], pab[node])]++;
            }
            rp--;
        }
        
        if(rp != b){
            ans = min(ans, edgea[i - 1].w + edgeb[rp].w);
        }
    }
    cout << ((ans == inf) ? -1 : ans);
}
 
 
 
signed main(){
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    //freopen("THREE.inp", "r", stdin);
    //freopen("THREE.out", "w", stdout);
    int tt; tt = 1;
    while(tt--){
        solve();
 
    }
    return(0);
}

Compilation message

Main.cpp: In function 'void solve()':
Main.cpp:112:18: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  112 |         for(auto [node, pre, curr]: eva[i]){
      |                  ^
Main.cpp:122:22: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  122 |             for(auto [node, pre, curr]: evb[rp]){
      |                      ^
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 35676 KB Output is correct
2 Correct 19 ms 35676 KB Output is correct
3 Correct 16 ms 35668 KB Output is correct
4 Correct 16 ms 35676 KB Output is correct
5 Correct 16 ms 35732 KB Output is correct
6 Correct 69 ms 46004 KB Output is correct
7 Correct 70 ms 46004 KB Output is correct
8 Correct 126 ms 55848 KB Output is correct
9 Correct 132 ms 55848 KB Output is correct
10 Correct 128 ms 56064 KB Output is correct
11 Correct 119 ms 55852 KB Output is correct
12 Correct 16 ms 35460 KB Output is correct
13 Correct 17 ms 35932 KB Output is correct
14 Correct 15 ms 35932 KB Output is correct
15 Correct 16 ms 35480 KB Output is correct
16 Correct 124 ms 56364 KB Output is correct
17 Correct 128 ms 56360 KB Output is correct
18 Correct 128 ms 56432 KB Output is correct
19 Correct 129 ms 56360 KB Output is correct
20 Correct 129 ms 56316 KB Output is correct
21 Correct 133 ms 56492 KB Output is correct
22 Correct 136 ms 56360 KB Output is correct
23 Correct 123 ms 56104 KB Output is correct
24 Correct 17 ms 35672 KB Output is correct
25 Correct 135 ms 56360 KB Output is correct
26 Correct 127 ms 56520 KB Output is correct
27 Correct 127 ms 56412 KB Output is correct
28 Correct 123 ms 56360 KB Output is correct
29 Correct 125 ms 56420 KB Output is correct
30 Correct 126 ms 56360 KB Output is correct
31 Correct 123 ms 56360 KB Output is correct
32 Correct 123 ms 56104 KB Output is correct
33 Correct 105 ms 54196 KB Output is correct
34 Correct 101 ms 54196 KB Output is correct
35 Correct 102 ms 54208 KB Output is correct
36 Correct 103 ms 54028 KB Output is correct
37 Correct 17 ms 36072 KB Output is correct
38 Correct 18 ms 35932 KB Output is correct
39 Correct 17 ms 35932 KB Output is correct
40 Correct 17 ms 35932 KB Output is correct
41 Correct 121 ms 54336 KB Output is correct
42 Correct 115 ms 54132 KB Output is correct
43 Correct 117 ms 55288 KB Output is correct
44 Correct 122 ms 55224 KB Output is correct
45 Correct 123 ms 56384 KB Output is correct
46 Correct 128 ms 56104 KB Output is correct
47 Correct 117 ms 56100 KB Output is correct
48 Correct 106 ms 53764 KB Output is correct
49 Correct 104 ms 53732 KB Output is correct
50 Correct 18 ms 36188 KB Output is correct
51 Correct 73 ms 46148 KB Output is correct
52 Correct 66 ms 46012 KB Output is correct
53 Correct 17 ms 35672 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 601 ms 97600 KB Output is correct
2 Correct 351 ms 83380 KB Output is correct
3 Correct 352 ms 83308 KB Output is correct
4 Correct 14 ms 35676 KB Output is correct
5 Correct 16 ms 35676 KB Output is correct
6 Correct 13 ms 35676 KB Output is correct
7 Correct 113 ms 54204 KB Output is correct
8 Correct 89 ms 54716 KB Output is correct
9 Correct 147 ms 75188 KB Output is correct
10 Correct 362 ms 87768 KB Output is correct
11 Correct 302 ms 93224 KB Output is correct
12 Correct 299 ms 93068 KB Output is correct
13 Correct 311 ms 92968 KB Output is correct
14 Correct 302 ms 92968 KB Output is correct
15 Correct 16 ms 35676 KB Output is correct
16 Correct 63 ms 58964 KB Output is correct
17 Correct 63 ms 58968 KB Output is correct
18 Correct 15 ms 35676 KB Output is correct
19 Correct 696 ms 116520 KB Output is correct
20 Correct 673 ms 116200 KB Output is correct
21 Correct 667 ms 116264 KB Output is correct
22 Correct 688 ms 116776 KB Output is correct
23 Correct 679 ms 116360 KB Output is correct
24 Correct 692 ms 116772 KB Output is correct
25 Correct 681 ms 116308 KB Output is correct
26 Correct 702 ms 116280 KB Output is correct
27 Correct 444 ms 103720 KB Output is correct
28 Correct 14 ms 35584 KB Output is correct
29 Correct 715 ms 116776 KB Output is correct
30 Correct 711 ms 116816 KB Output is correct
31 Correct 656 ms 116264 KB Output is correct
32 Correct 689 ms 116564 KB Output is correct
33 Correct 674 ms 116224 KB Output is correct
34 Correct 705 ms 115240 KB Output is correct
35 Correct 694 ms 115496 KB Output is correct
36 Correct 672 ms 115008 KB Output is correct
37 Correct 413 ms 102184 KB Output is correct
38 Correct 252 ms 77864 KB Output is correct
39 Correct 248 ms 78120 KB Output is correct
40 Correct 252 ms 77868 KB Output is correct
41 Correct 259 ms 78048 KB Output is correct
42 Correct 109 ms 54136 KB Output is correct
43 Correct 108 ms 54200 KB Output is correct
44 Correct 118 ms 55276 KB Output is correct
45 Correct 114 ms 55224 KB Output is correct
46 Correct 716 ms 116520 KB Output is correct
47 Correct 698 ms 116520 KB Output is correct
48 Correct 500 ms 103796 KB Output is correct
49 Correct 662 ms 113800 KB Output is correct
50 Correct 536 ms 105952 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 35672 KB Output is correct
2 Correct 16 ms 35664 KB Output is correct
3 Correct 61 ms 41932 KB Output is correct
4 Correct 54 ms 45012 KB Output is correct
5 Correct 563 ms 101368 KB Output is correct
6 Correct 164 ms 79800 KB Output is correct
7 Correct 170 ms 79284 KB Output is correct
8 Correct 62 ms 58960 KB Output is correct
9 Correct 133 ms 76212 KB Output is correct
10 Correct 137 ms 76212 KB Output is correct
11 Correct 143 ms 76216 KB Output is correct
12 Correct 139 ms 76180 KB Output is correct
13 Correct 14 ms 35676 KB Output is correct
14 Correct 59 ms 59160 KB Output is correct
15 Correct 57 ms 59000 KB Output is correct
16 Correct 17 ms 35676 KB Output is correct
17 Correct 590 ms 102644 KB Output is correct
18 Correct 601 ms 102588 KB Output is correct
19 Correct 601 ms 102544 KB Output is correct
20 Correct 568 ms 102236 KB Output is correct
21 Correct 607 ms 102584 KB Output is correct
22 Correct 443 ms 95992 KB Output is correct
23 Correct 375 ms 92088 KB Output is correct
24 Correct 252 ms 84604 KB Output is correct
25 Correct 169 ms 79288 KB Output is correct
26 Correct 15 ms 35676 KB Output is correct
27 Correct 588 ms 102556 KB Output is correct
28 Correct 582 ms 102228 KB Output is correct
29 Correct 600 ms 102328 KB Output is correct
30 Correct 594 ms 102068 KB Output is correct
31 Correct 561 ms 102076 KB Output is correct
32 Correct 434 ms 95860 KB Output is correct
33 Correct 351 ms 91336 KB Output is correct
34 Correct 176 ms 80656 KB Output is correct
35 Correct 158 ms 79292 KB Output is correct
36 Correct 105 ms 61288 KB Output is correct
37 Correct 105 ms 61456 KB Output is correct
38 Correct 106 ms 61368 KB Output is correct
39 Correct 116 ms 61540 KB Output is correct
40 Correct 108 ms 61368 KB Output is correct
41 Correct 99 ms 61344 KB Output is correct
42 Correct 100 ms 61620 KB Output is correct
43 Correct 112 ms 61368 KB Output is correct
44 Correct 102 ms 61368 KB Output is correct
45 Correct 100 ms 61364 KB Output is correct
46 Correct 64 ms 44816 KB Output is correct
47 Correct 62 ms 44732 KB Output is correct
48 Correct 65 ms 45480 KB Output is correct
49 Correct 68 ms 45240 KB Output is correct
50 Correct 529 ms 97968 KB Output is correct
51 Correct 222 ms 82100 KB Output is correct
52 Correct 161 ms 79284 KB Output is correct
53 Correct 582 ms 100792 KB Output is correct
54 Correct 238 ms 84064 KB Output is correct
55 Correct 115 ms 68796 KB Output is correct
56 Correct 53 ms 58968 KB Output is correct
57 Correct 56 ms 58964 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 35676 KB Output is correct
2 Correct 19 ms 35676 KB Output is correct
3 Correct 16 ms 35668 KB Output is correct
4 Correct 16 ms 35676 KB Output is correct
5 Correct 16 ms 35732 KB Output is correct
6 Correct 69 ms 46004 KB Output is correct
7 Correct 70 ms 46004 KB Output is correct
8 Correct 126 ms 55848 KB Output is correct
9 Correct 132 ms 55848 KB Output is correct
10 Correct 128 ms 56064 KB Output is correct
11 Correct 119 ms 55852 KB Output is correct
12 Correct 16 ms 35460 KB Output is correct
13 Correct 17 ms 35932 KB Output is correct
14 Correct 15 ms 35932 KB Output is correct
15 Correct 16 ms 35480 KB Output is correct
16 Correct 124 ms 56364 KB Output is correct
17 Correct 128 ms 56360 KB Output is correct
18 Correct 128 ms 56432 KB Output is correct
19 Correct 129 ms 56360 KB Output is correct
20 Correct 129 ms 56316 KB Output is correct
21 Correct 133 ms 56492 KB Output is correct
22 Correct 136 ms 56360 KB Output is correct
23 Correct 123 ms 56104 KB Output is correct
24 Correct 17 ms 35672 KB Output is correct
25 Correct 135 ms 56360 KB Output is correct
26 Correct 127 ms 56520 KB Output is correct
27 Correct 127 ms 56412 KB Output is correct
28 Correct 123 ms 56360 KB Output is correct
29 Correct 125 ms 56420 KB Output is correct
30 Correct 126 ms 56360 KB Output is correct
31 Correct 123 ms 56360 KB Output is correct
32 Correct 123 ms 56104 KB Output is correct
33 Correct 105 ms 54196 KB Output is correct
34 Correct 101 ms 54196 KB Output is correct
35 Correct 102 ms 54208 KB Output is correct
36 Correct 103 ms 54028 KB Output is correct
37 Correct 17 ms 36072 KB Output is correct
38 Correct 18 ms 35932 KB Output is correct
39 Correct 17 ms 35932 KB Output is correct
40 Correct 17 ms 35932 KB Output is correct
41 Correct 121 ms 54336 KB Output is correct
42 Correct 115 ms 54132 KB Output is correct
43 Correct 117 ms 55288 KB Output is correct
44 Correct 122 ms 55224 KB Output is correct
45 Correct 123 ms 56384 KB Output is correct
46 Correct 128 ms 56104 KB Output is correct
47 Correct 117 ms 56100 KB Output is correct
48 Correct 106 ms 53764 KB Output is correct
49 Correct 104 ms 53732 KB Output is correct
50 Correct 18 ms 36188 KB Output is correct
51 Correct 73 ms 46148 KB Output is correct
52 Correct 66 ms 46012 KB Output is correct
53 Correct 17 ms 35672 KB Output is correct
54 Correct 601 ms 97600 KB Output is correct
55 Correct 351 ms 83380 KB Output is correct
56 Correct 352 ms 83308 KB Output is correct
57 Correct 14 ms 35676 KB Output is correct
58 Correct 16 ms 35676 KB Output is correct
59 Correct 13 ms 35676 KB Output is correct
60 Correct 113 ms 54204 KB Output is correct
61 Correct 89 ms 54716 KB Output is correct
62 Correct 147 ms 75188 KB Output is correct
63 Correct 362 ms 87768 KB Output is correct
64 Correct 302 ms 93224 KB Output is correct
65 Correct 299 ms 93068 KB Output is correct
66 Correct 311 ms 92968 KB Output is correct
67 Correct 302 ms 92968 KB Output is correct
68 Correct 16 ms 35676 KB Output is correct
69 Correct 63 ms 58964 KB Output is correct
70 Correct 63 ms 58968 KB Output is correct
71 Correct 15 ms 35676 KB Output is correct
72 Correct 696 ms 116520 KB Output is correct
73 Correct 673 ms 116200 KB Output is correct
74 Correct 667 ms 116264 KB Output is correct
75 Correct 688 ms 116776 KB Output is correct
76 Correct 679 ms 116360 KB Output is correct
77 Correct 692 ms 116772 KB Output is correct
78 Correct 681 ms 116308 KB Output is correct
79 Correct 702 ms 116280 KB Output is correct
80 Correct 444 ms 103720 KB Output is correct
81 Correct 14 ms 35584 KB Output is correct
82 Correct 715 ms 116776 KB Output is correct
83 Correct 711 ms 116816 KB Output is correct
84 Correct 656 ms 116264 KB Output is correct
85 Correct 689 ms 116564 KB Output is correct
86 Correct 674 ms 116224 KB Output is correct
87 Correct 705 ms 115240 KB Output is correct
88 Correct 694 ms 115496 KB Output is correct
89 Correct 672 ms 115008 KB Output is correct
90 Correct 413 ms 102184 KB Output is correct
91 Correct 252 ms 77864 KB Output is correct
92 Correct 248 ms 78120 KB Output is correct
93 Correct 252 ms 77868 KB Output is correct
94 Correct 259 ms 78048 KB Output is correct
95 Correct 109 ms 54136 KB Output is correct
96 Correct 108 ms 54200 KB Output is correct
97 Correct 118 ms 55276 KB Output is correct
98 Correct 114 ms 55224 KB Output is correct
99 Correct 716 ms 116520 KB Output is correct
100 Correct 698 ms 116520 KB Output is correct
101 Correct 500 ms 103796 KB Output is correct
102 Correct 662 ms 113800 KB Output is correct
103 Correct 536 ms 105952 KB Output is correct
104 Correct 16 ms 35672 KB Output is correct
105 Correct 16 ms 35664 KB Output is correct
106 Correct 61 ms 41932 KB Output is correct
107 Correct 54 ms 45012 KB Output is correct
108 Correct 563 ms 101368 KB Output is correct
109 Correct 164 ms 79800 KB Output is correct
110 Correct 170 ms 79284 KB Output is correct
111 Correct 62 ms 58960 KB Output is correct
112 Correct 133 ms 76212 KB Output is correct
113 Correct 137 ms 76212 KB Output is correct
114 Correct 143 ms 76216 KB Output is correct
115 Correct 139 ms 76180 KB Output is correct
116 Correct 14 ms 35676 KB Output is correct
117 Correct 59 ms 59160 KB Output is correct
118 Correct 57 ms 59000 KB Output is correct
119 Correct 17 ms 35676 KB Output is correct
120 Correct 590 ms 102644 KB Output is correct
121 Correct 601 ms 102588 KB Output is correct
122 Correct 601 ms 102544 KB Output is correct
123 Correct 568 ms 102236 KB Output is correct
124 Correct 607 ms 102584 KB Output is correct
125 Correct 443 ms 95992 KB Output is correct
126 Correct 375 ms 92088 KB Output is correct
127 Correct 252 ms 84604 KB Output is correct
128 Correct 169 ms 79288 KB Output is correct
129 Correct 15 ms 35676 KB Output is correct
130 Correct 588 ms 102556 KB Output is correct
131 Correct 582 ms 102228 KB Output is correct
132 Correct 600 ms 102328 KB Output is correct
133 Correct 594 ms 102068 KB Output is correct
134 Correct 561 ms 102076 KB Output is correct
135 Correct 434 ms 95860 KB Output is correct
136 Correct 351 ms 91336 KB Output is correct
137 Correct 176 ms 80656 KB Output is correct
138 Correct 158 ms 79292 KB Output is correct
139 Correct 105 ms 61288 KB Output is correct
140 Correct 105 ms 61456 KB Output is correct
141 Correct 106 ms 61368 KB Output is correct
142 Correct 116 ms 61540 KB Output is correct
143 Correct 108 ms 61368 KB Output is correct
144 Correct 99 ms 61344 KB Output is correct
145 Correct 100 ms 61620 KB Output is correct
146 Correct 112 ms 61368 KB Output is correct
147 Correct 102 ms 61368 KB Output is correct
148 Correct 100 ms 61364 KB Output is correct
149 Correct 64 ms 44816 KB Output is correct
150 Correct 62 ms 44732 KB Output is correct
151 Correct 65 ms 45480 KB Output is correct
152 Correct 68 ms 45240 KB Output is correct
153 Correct 529 ms 97968 KB Output is correct
154 Correct 222 ms 82100 KB Output is correct
155 Correct 161 ms 79284 KB Output is correct
156 Correct 582 ms 100792 KB Output is correct
157 Correct 238 ms 84064 KB Output is correct
158 Correct 115 ms 68796 KB Output is correct
159 Correct 53 ms 58968 KB Output is correct
160 Correct 56 ms 58964 KB Output is correct
161 Correct 16 ms 35676 KB Output is correct
162 Correct 16 ms 35676 KB Output is correct
163 Correct 114 ms 54196 KB Output is correct
164 Correct 93 ms 54708 KB Output is correct
165 Correct 166 ms 79364 KB Output is correct
166 Correct 611 ms 102488 KB Output is correct
167 Correct 471 ms 105000 KB Output is correct
168 Correct 496 ms 105772 KB Output is correct
169 Correct 465 ms 105768 KB Output is correct
170 Correct 463 ms 105016 KB Output is correct
171 Correct 15 ms 35676 KB Output is correct
172 Correct 62 ms 58964 KB Output is correct
173 Correct 62 ms 58964 KB Output is correct
174 Correct 18 ms 35676 KB Output is correct
175 Correct 1232 ms 145192 KB Output is correct
176 Correct 1259 ms 145956 KB Output is correct
177 Correct 1254 ms 145048 KB Output is correct
178 Correct 1270 ms 146296 KB Output is correct
179 Correct 1207 ms 145448 KB Output is correct
180 Correct 1252 ms 145488 KB Output is correct
181 Correct 1245 ms 144940 KB Output is correct
182 Correct 1251 ms 139532 KB Output is correct
183 Correct 533 ms 104236 KB Output is correct
184 Correct 16 ms 35676 KB Output is correct
185 Correct 1229 ms 145448 KB Output is correct
186 Correct 1163 ms 145196 KB Output is correct
187 Correct 1206 ms 145704 KB Output is correct
188 Correct 1252 ms 145464 KB Output is correct
189 Correct 1182 ms 144872 KB Output is correct
190 Correct 1225 ms 144568 KB Output is correct
191 Correct 1277 ms 143720 KB Output is correct
192 Correct 1033 ms 124712 KB Output is correct
193 Correct 540 ms 103212 KB Output is correct
194 Correct 329 ms 80936 KB Output is correct
195 Correct 345 ms 81960 KB Output is correct
196 Correct 329 ms 82252 KB Output is correct
197 Correct 328 ms 81964 KB Output is correct
198 Correct 336 ms 81700 KB Output is correct
199 Correct 333 ms 81448 KB Output is correct
200 Correct 351 ms 81708 KB Output is correct
201 Correct 349 ms 81516 KB Output is correct
202 Correct 338 ms 81664 KB Output is correct
203 Correct 116 ms 54204 KB Output is correct
204 Correct 117 ms 54196 KB Output is correct
205 Correct 129 ms 55220 KB Output is correct
206 Correct 139 ms 55308 KB Output is correct
207 Correct 1220 ms 145704 KB Output is correct
208 Correct 1064 ms 131116 KB Output is correct
209 Correct 539 ms 104416 KB Output is correct
210 Correct 1199 ms 143144 KB Output is correct
211 Correct 533 ms 102184 KB Output is correct
212 Correct 331 ms 87860 KB Output is correct
213 Correct 586 ms 102832 KB Output is correct
214 Correct 608 ms 101816 KB Output is correct