#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 |
21 ms |
48732 KB |
Output is correct |
2 |
Correct |
9 ms |
40536 KB |
Output is correct |
3 |
Correct |
10 ms |
44636 KB |
Output is correct |
4 |
Correct |
12 ms |
48932 KB |
Output is correct |
5 |
Correct |
12 ms |
48732 KB |
Output is correct |
6 |
Correct |
71 ms |
59572 KB |
Output is correct |
7 |
Correct |
68 ms |
59752 KB |
Output is correct |
8 |
Correct |
127 ms |
73344 KB |
Output is correct |
9 |
Correct |
124 ms |
73744 KB |
Output is correct |
10 |
Correct |
123 ms |
73516 KB |
Output is correct |
11 |
Correct |
122 ms |
72176 KB |
Output is correct |
12 |
Correct |
10 ms |
40536 KB |
Output is correct |
13 |
Correct |
11 ms |
46940 KB |
Output is correct |
14 |
Correct |
10 ms |
47084 KB |
Output is correct |
15 |
Correct |
9 ms |
40988 KB |
Output is correct |
16 |
Correct |
129 ms |
72500 KB |
Output is correct |
17 |
Correct |
127 ms |
72568 KB |
Output is correct |
18 |
Correct |
138 ms |
75048 KB |
Output is correct |
19 |
Correct |
126 ms |
73472 KB |
Output is correct |
20 |
Correct |
128 ms |
73008 KB |
Output is correct |
21 |
Correct |
126 ms |
72580 KB |
Output is correct |
22 |
Correct |
125 ms |
72644 KB |
Output is correct |
23 |
Correct |
140 ms |
73004 KB |
Output is correct |
24 |
Correct |
11 ms |
40540 KB |
Output is correct |
25 |
Correct |
144 ms |
72708 KB |
Output is correct |
26 |
Correct |
130 ms |
72740 KB |
Output is correct |
27 |
Correct |
129 ms |
72948 KB |
Output is correct |
28 |
Correct |
125 ms |
72508 KB |
Output is correct |
29 |
Correct |
125 ms |
72496 KB |
Output is correct |
30 |
Correct |
126 ms |
74280 KB |
Output is correct |
31 |
Correct |
130 ms |
72516 KB |
Output is correct |
32 |
Correct |
130 ms |
74832 KB |
Output is correct |
33 |
Correct |
104 ms |
70116 KB |
Output is correct |
34 |
Correct |
104 ms |
69556 KB |
Output is correct |
35 |
Correct |
109 ms |
68720 KB |
Output is correct |
36 |
Correct |
122 ms |
70764 KB |
Output is correct |
37 |
Correct |
12 ms |
49244 KB |
Output is correct |
38 |
Correct |
15 ms |
49448 KB |
Output is correct |
39 |
Correct |
12 ms |
49240 KB |
Output is correct |
40 |
Correct |
12 ms |
49244 KB |
Output is correct |
41 |
Correct |
113 ms |
69312 KB |
Output is correct |
42 |
Correct |
114 ms |
70208 KB |
Output is correct |
43 |
Correct |
116 ms |
69508 KB |
Output is correct |
44 |
Correct |
116 ms |
69680 KB |
Output is correct |
45 |
Correct |
128 ms |
75560 KB |
Output is correct |
46 |
Correct |
125 ms |
72748 KB |
Output is correct |
47 |
Correct |
125 ms |
73004 KB |
Output is correct |
48 |
Correct |
101 ms |
71720 KB |
Output is correct |
49 |
Correct |
109 ms |
72380 KB |
Output is correct |
50 |
Correct |
13 ms |
51548 KB |
Output is correct |
51 |
Correct |
69 ms |
62900 KB |
Output is correct |
52 |
Correct |
68 ms |
61768 KB |
Output is correct |
53 |
Correct |
10 ms |
48732 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
673 ms |
115664 KB |
Output is correct |
2 |
Correct |
408 ms |
99256 KB |
Output is correct |
3 |
Correct |
384 ms |
99700 KB |
Output is correct |
4 |
Correct |
18 ms |
40536 KB |
Output is correct |
5 |
Correct |
10 ms |
40540 KB |
Output is correct |
6 |
Correct |
10 ms |
44636 KB |
Output is correct |
7 |
Correct |
112 ms |
67932 KB |
Output is correct |
8 |
Correct |
87 ms |
69104 KB |
Output is correct |
9 |
Correct |
147 ms |
84444 KB |
Output is correct |
10 |
Correct |
395 ms |
99000 KB |
Output is correct |
11 |
Correct |
338 ms |
104744 KB |
Output is correct |
12 |
Correct |
338 ms |
104884 KB |
Output is correct |
13 |
Correct |
346 ms |
105516 KB |
Output is correct |
14 |
Correct |
362 ms |
105636 KB |
Output is correct |
15 |
Correct |
10 ms |
40536 KB |
Output is correct |
16 |
Correct |
51 ms |
67668 KB |
Output is correct |
17 |
Correct |
51 ms |
67724 KB |
Output is correct |
18 |
Correct |
9 ms |
40540 KB |
Output is correct |
19 |
Correct |
834 ms |
130240 KB |
Output is correct |
20 |
Correct |
786 ms |
129596 KB |
Output is correct |
21 |
Correct |
806 ms |
128088 KB |
Output is correct |
22 |
Correct |
815 ms |
129644 KB |
Output is correct |
23 |
Correct |
832 ms |
129680 KB |
Output is correct |
24 |
Correct |
805 ms |
128808 KB |
Output is correct |
25 |
Correct |
872 ms |
130900 KB |
Output is correct |
26 |
Correct |
842 ms |
131400 KB |
Output is correct |
27 |
Correct |
512 ms |
116400 KB |
Output is correct |
28 |
Correct |
9 ms |
40536 KB |
Output is correct |
29 |
Correct |
837 ms |
131204 KB |
Output is correct |
30 |
Correct |
795 ms |
130892 KB |
Output is correct |
31 |
Correct |
804 ms |
128076 KB |
Output is correct |
32 |
Correct |
836 ms |
128292 KB |
Output is correct |
33 |
Correct |
804 ms |
130728 KB |
Output is correct |
34 |
Correct |
813 ms |
128296 KB |
Output is correct |
35 |
Correct |
797 ms |
129816 KB |
Output is correct |
36 |
Correct |
813 ms |
127020 KB |
Output is correct |
37 |
Correct |
479 ms |
114968 KB |
Output is correct |
38 |
Correct |
259 ms |
92200 KB |
Output is correct |
39 |
Correct |
255 ms |
93964 KB |
Output is correct |
40 |
Correct |
289 ms |
93036 KB |
Output is correct |
41 |
Correct |
252 ms |
92592 KB |
Output is correct |
42 |
Correct |
109 ms |
67884 KB |
Output is correct |
43 |
Correct |
109 ms |
68936 KB |
Output is correct |
44 |
Correct |
118 ms |
69408 KB |
Output is correct |
45 |
Correct |
117 ms |
69672 KB |
Output is correct |
46 |
Correct |
784 ms |
129032 KB |
Output is correct |
47 |
Correct |
795 ms |
128320 KB |
Output is correct |
48 |
Correct |
516 ms |
116816 KB |
Output is correct |
49 |
Correct |
828 ms |
127516 KB |
Output is correct |
50 |
Correct |
607 ms |
117556 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
40796 KB |
Output is correct |
2 |
Correct |
10 ms |
44832 KB |
Output is correct |
3 |
Correct |
60 ms |
58560 KB |
Output is correct |
4 |
Correct |
51 ms |
58556 KB |
Output is correct |
5 |
Correct |
714 ms |
113408 KB |
Output is correct |
6 |
Correct |
181 ms |
91560 KB |
Output is correct |
7 |
Correct |
175 ms |
89448 KB |
Output is correct |
8 |
Correct |
52 ms |
69716 KB |
Output is correct |
9 |
Correct |
147 ms |
87476 KB |
Output is correct |
10 |
Correct |
150 ms |
87620 KB |
Output is correct |
11 |
Correct |
146 ms |
88344 KB |
Output is correct |
12 |
Correct |
153 ms |
88632 KB |
Output is correct |
13 |
Correct |
9 ms |
40540 KB |
Output is correct |
14 |
Correct |
51 ms |
67668 KB |
Output is correct |
15 |
Correct |
51 ms |
67756 KB |
Output is correct |
16 |
Correct |
9 ms |
40540 KB |
Output is correct |
17 |
Correct |
688 ms |
115492 KB |
Output is correct |
18 |
Correct |
727 ms |
114144 KB |
Output is correct |
19 |
Correct |
675 ms |
115380 KB |
Output is correct |
20 |
Correct |
700 ms |
114048 KB |
Output is correct |
21 |
Correct |
657 ms |
115384 KB |
Output is correct |
22 |
Correct |
542 ms |
107936 KB |
Output is correct |
23 |
Correct |
457 ms |
103648 KB |
Output is correct |
24 |
Correct |
263 ms |
96264 KB |
Output is correct |
25 |
Correct |
177 ms |
90564 KB |
Output is correct |
26 |
Correct |
10 ms |
40540 KB |
Output is correct |
27 |
Correct |
674 ms |
114620 KB |
Output is correct |
28 |
Correct |
684 ms |
113496 KB |
Output is correct |
29 |
Correct |
694 ms |
113488 KB |
Output is correct |
30 |
Correct |
720 ms |
113592 KB |
Output is correct |
31 |
Correct |
669 ms |
114484 KB |
Output is correct |
32 |
Correct |
530 ms |
107280 KB |
Output is correct |
33 |
Correct |
415 ms |
102844 KB |
Output is correct |
34 |
Correct |
197 ms |
93116 KB |
Output is correct |
35 |
Correct |
182 ms |
91692 KB |
Output is correct |
36 |
Correct |
106 ms |
75448 KB |
Output is correct |
37 |
Correct |
104 ms |
75512 KB |
Output is correct |
38 |
Correct |
103 ms |
76212 KB |
Output is correct |
39 |
Correct |
110 ms |
76476 KB |
Output is correct |
40 |
Correct |
101 ms |
75708 KB |
Output is correct |
41 |
Correct |
107 ms |
76108 KB |
Output is correct |
42 |
Correct |
107 ms |
75956 KB |
Output is correct |
43 |
Correct |
104 ms |
74944 KB |
Output is correct |
44 |
Correct |
102 ms |
75700 KB |
Output is correct |
45 |
Correct |
102 ms |
75608 KB |
Output is correct |
46 |
Correct |
59 ms |
59336 KB |
Output is correct |
47 |
Correct |
58 ms |
58556 KB |
Output is correct |
48 |
Correct |
65 ms |
60232 KB |
Output is correct |
49 |
Correct |
68 ms |
58952 KB |
Output is correct |
50 |
Correct |
552 ms |
109264 KB |
Output is correct |
51 |
Correct |
234 ms |
94632 KB |
Output is correct |
52 |
Correct |
170 ms |
90468 KB |
Output is correct |
53 |
Correct |
721 ms |
112088 KB |
Output is correct |
54 |
Correct |
263 ms |
95164 KB |
Output is correct |
55 |
Correct |
129 ms |
81608 KB |
Output is correct |
56 |
Correct |
50 ms |
69768 KB |
Output is correct |
57 |
Correct |
54 ms |
69716 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
21 ms |
48732 KB |
Output is correct |
2 |
Correct |
9 ms |
40536 KB |
Output is correct |
3 |
Correct |
10 ms |
44636 KB |
Output is correct |
4 |
Correct |
12 ms |
48932 KB |
Output is correct |
5 |
Correct |
12 ms |
48732 KB |
Output is correct |
6 |
Correct |
71 ms |
59572 KB |
Output is correct |
7 |
Correct |
68 ms |
59752 KB |
Output is correct |
8 |
Correct |
127 ms |
73344 KB |
Output is correct |
9 |
Correct |
124 ms |
73744 KB |
Output is correct |
10 |
Correct |
123 ms |
73516 KB |
Output is correct |
11 |
Correct |
122 ms |
72176 KB |
Output is correct |
12 |
Correct |
10 ms |
40536 KB |
Output is correct |
13 |
Correct |
11 ms |
46940 KB |
Output is correct |
14 |
Correct |
10 ms |
47084 KB |
Output is correct |
15 |
Correct |
9 ms |
40988 KB |
Output is correct |
16 |
Correct |
129 ms |
72500 KB |
Output is correct |
17 |
Correct |
127 ms |
72568 KB |
Output is correct |
18 |
Correct |
138 ms |
75048 KB |
Output is correct |
19 |
Correct |
126 ms |
73472 KB |
Output is correct |
20 |
Correct |
128 ms |
73008 KB |
Output is correct |
21 |
Correct |
126 ms |
72580 KB |
Output is correct |
22 |
Correct |
125 ms |
72644 KB |
Output is correct |
23 |
Correct |
140 ms |
73004 KB |
Output is correct |
24 |
Correct |
11 ms |
40540 KB |
Output is correct |
25 |
Correct |
144 ms |
72708 KB |
Output is correct |
26 |
Correct |
130 ms |
72740 KB |
Output is correct |
27 |
Correct |
129 ms |
72948 KB |
Output is correct |
28 |
Correct |
125 ms |
72508 KB |
Output is correct |
29 |
Correct |
125 ms |
72496 KB |
Output is correct |
30 |
Correct |
126 ms |
74280 KB |
Output is correct |
31 |
Correct |
130 ms |
72516 KB |
Output is correct |
32 |
Correct |
130 ms |
74832 KB |
Output is correct |
33 |
Correct |
104 ms |
70116 KB |
Output is correct |
34 |
Correct |
104 ms |
69556 KB |
Output is correct |
35 |
Correct |
109 ms |
68720 KB |
Output is correct |
36 |
Correct |
122 ms |
70764 KB |
Output is correct |
37 |
Correct |
12 ms |
49244 KB |
Output is correct |
38 |
Correct |
15 ms |
49448 KB |
Output is correct |
39 |
Correct |
12 ms |
49240 KB |
Output is correct |
40 |
Correct |
12 ms |
49244 KB |
Output is correct |
41 |
Correct |
113 ms |
69312 KB |
Output is correct |
42 |
Correct |
114 ms |
70208 KB |
Output is correct |
43 |
Correct |
116 ms |
69508 KB |
Output is correct |
44 |
Correct |
116 ms |
69680 KB |
Output is correct |
45 |
Correct |
128 ms |
75560 KB |
Output is correct |
46 |
Correct |
125 ms |
72748 KB |
Output is correct |
47 |
Correct |
125 ms |
73004 KB |
Output is correct |
48 |
Correct |
101 ms |
71720 KB |
Output is correct |
49 |
Correct |
109 ms |
72380 KB |
Output is correct |
50 |
Correct |
13 ms |
51548 KB |
Output is correct |
51 |
Correct |
69 ms |
62900 KB |
Output is correct |
52 |
Correct |
68 ms |
61768 KB |
Output is correct |
53 |
Correct |
10 ms |
48732 KB |
Output is correct |
54 |
Correct |
673 ms |
115664 KB |
Output is correct |
55 |
Correct |
408 ms |
99256 KB |
Output is correct |
56 |
Correct |
384 ms |
99700 KB |
Output is correct |
57 |
Correct |
18 ms |
40536 KB |
Output is correct |
58 |
Correct |
10 ms |
40540 KB |
Output is correct |
59 |
Correct |
10 ms |
44636 KB |
Output is correct |
60 |
Correct |
112 ms |
67932 KB |
Output is correct |
61 |
Correct |
87 ms |
69104 KB |
Output is correct |
62 |
Correct |
147 ms |
84444 KB |
Output is correct |
63 |
Correct |
395 ms |
99000 KB |
Output is correct |
64 |
Correct |
338 ms |
104744 KB |
Output is correct |
65 |
Correct |
338 ms |
104884 KB |
Output is correct |
66 |
Correct |
346 ms |
105516 KB |
Output is correct |
67 |
Correct |
362 ms |
105636 KB |
Output is correct |
68 |
Correct |
10 ms |
40536 KB |
Output is correct |
69 |
Correct |
51 ms |
67668 KB |
Output is correct |
70 |
Correct |
51 ms |
67724 KB |
Output is correct |
71 |
Correct |
9 ms |
40540 KB |
Output is correct |
72 |
Correct |
834 ms |
130240 KB |
Output is correct |
73 |
Correct |
786 ms |
129596 KB |
Output is correct |
74 |
Correct |
806 ms |
128088 KB |
Output is correct |
75 |
Correct |
815 ms |
129644 KB |
Output is correct |
76 |
Correct |
832 ms |
129680 KB |
Output is correct |
77 |
Correct |
805 ms |
128808 KB |
Output is correct |
78 |
Correct |
872 ms |
130900 KB |
Output is correct |
79 |
Correct |
842 ms |
131400 KB |
Output is correct |
80 |
Correct |
512 ms |
116400 KB |
Output is correct |
81 |
Correct |
9 ms |
40536 KB |
Output is correct |
82 |
Correct |
837 ms |
131204 KB |
Output is correct |
83 |
Correct |
795 ms |
130892 KB |
Output is correct |
84 |
Correct |
804 ms |
128076 KB |
Output is correct |
85 |
Correct |
836 ms |
128292 KB |
Output is correct |
86 |
Correct |
804 ms |
130728 KB |
Output is correct |
87 |
Correct |
813 ms |
128296 KB |
Output is correct |
88 |
Correct |
797 ms |
129816 KB |
Output is correct |
89 |
Correct |
813 ms |
127020 KB |
Output is correct |
90 |
Correct |
479 ms |
114968 KB |
Output is correct |
91 |
Correct |
259 ms |
92200 KB |
Output is correct |
92 |
Correct |
255 ms |
93964 KB |
Output is correct |
93 |
Correct |
289 ms |
93036 KB |
Output is correct |
94 |
Correct |
252 ms |
92592 KB |
Output is correct |
95 |
Correct |
109 ms |
67884 KB |
Output is correct |
96 |
Correct |
109 ms |
68936 KB |
Output is correct |
97 |
Correct |
118 ms |
69408 KB |
Output is correct |
98 |
Correct |
117 ms |
69672 KB |
Output is correct |
99 |
Correct |
784 ms |
129032 KB |
Output is correct |
100 |
Correct |
795 ms |
128320 KB |
Output is correct |
101 |
Correct |
516 ms |
116816 KB |
Output is correct |
102 |
Correct |
828 ms |
127516 KB |
Output is correct |
103 |
Correct |
607 ms |
117556 KB |
Output is correct |
104 |
Correct |
9 ms |
40796 KB |
Output is correct |
105 |
Correct |
10 ms |
44832 KB |
Output is correct |
106 |
Correct |
60 ms |
58560 KB |
Output is correct |
107 |
Correct |
51 ms |
58556 KB |
Output is correct |
108 |
Correct |
714 ms |
113408 KB |
Output is correct |
109 |
Correct |
181 ms |
91560 KB |
Output is correct |
110 |
Correct |
175 ms |
89448 KB |
Output is correct |
111 |
Correct |
52 ms |
69716 KB |
Output is correct |
112 |
Correct |
147 ms |
87476 KB |
Output is correct |
113 |
Correct |
150 ms |
87620 KB |
Output is correct |
114 |
Correct |
146 ms |
88344 KB |
Output is correct |
115 |
Correct |
153 ms |
88632 KB |
Output is correct |
116 |
Correct |
9 ms |
40540 KB |
Output is correct |
117 |
Correct |
51 ms |
67668 KB |
Output is correct |
118 |
Correct |
51 ms |
67756 KB |
Output is correct |
119 |
Correct |
9 ms |
40540 KB |
Output is correct |
120 |
Correct |
688 ms |
115492 KB |
Output is correct |
121 |
Correct |
727 ms |
114144 KB |
Output is correct |
122 |
Correct |
675 ms |
115380 KB |
Output is correct |
123 |
Correct |
700 ms |
114048 KB |
Output is correct |
124 |
Correct |
657 ms |
115384 KB |
Output is correct |
125 |
Correct |
542 ms |
107936 KB |
Output is correct |
126 |
Correct |
457 ms |
103648 KB |
Output is correct |
127 |
Correct |
263 ms |
96264 KB |
Output is correct |
128 |
Correct |
177 ms |
90564 KB |
Output is correct |
129 |
Correct |
10 ms |
40540 KB |
Output is correct |
130 |
Correct |
674 ms |
114620 KB |
Output is correct |
131 |
Correct |
684 ms |
113496 KB |
Output is correct |
132 |
Correct |
694 ms |
113488 KB |
Output is correct |
133 |
Correct |
720 ms |
113592 KB |
Output is correct |
134 |
Correct |
669 ms |
114484 KB |
Output is correct |
135 |
Correct |
530 ms |
107280 KB |
Output is correct |
136 |
Correct |
415 ms |
102844 KB |
Output is correct |
137 |
Correct |
197 ms |
93116 KB |
Output is correct |
138 |
Correct |
182 ms |
91692 KB |
Output is correct |
139 |
Correct |
106 ms |
75448 KB |
Output is correct |
140 |
Correct |
104 ms |
75512 KB |
Output is correct |
141 |
Correct |
103 ms |
76212 KB |
Output is correct |
142 |
Correct |
110 ms |
76476 KB |
Output is correct |
143 |
Correct |
101 ms |
75708 KB |
Output is correct |
144 |
Correct |
107 ms |
76108 KB |
Output is correct |
145 |
Correct |
107 ms |
75956 KB |
Output is correct |
146 |
Correct |
104 ms |
74944 KB |
Output is correct |
147 |
Correct |
102 ms |
75700 KB |
Output is correct |
148 |
Correct |
102 ms |
75608 KB |
Output is correct |
149 |
Correct |
59 ms |
59336 KB |
Output is correct |
150 |
Correct |
58 ms |
58556 KB |
Output is correct |
151 |
Correct |
65 ms |
60232 KB |
Output is correct |
152 |
Correct |
68 ms |
58952 KB |
Output is correct |
153 |
Correct |
552 ms |
109264 KB |
Output is correct |
154 |
Correct |
234 ms |
94632 KB |
Output is correct |
155 |
Correct |
170 ms |
90468 KB |
Output is correct |
156 |
Correct |
721 ms |
112088 KB |
Output is correct |
157 |
Correct |
263 ms |
95164 KB |
Output is correct |
158 |
Correct |
129 ms |
81608 KB |
Output is correct |
159 |
Correct |
50 ms |
69768 KB |
Output is correct |
160 |
Correct |
54 ms |
69716 KB |
Output is correct |
161 |
Correct |
9 ms |
40540 KB |
Output is correct |
162 |
Correct |
10 ms |
44736 KB |
Output is correct |
163 |
Correct |
111 ms |
67772 KB |
Output is correct |
164 |
Correct |
91 ms |
70620 KB |
Output is correct |
165 |
Correct |
172 ms |
88408 KB |
Output is correct |
166 |
Correct |
689 ms |
113844 KB |
Output is correct |
167 |
Correct |
516 ms |
116780 KB |
Output is correct |
168 |
Correct |
495 ms |
117468 KB |
Output is correct |
169 |
Correct |
543 ms |
120164 KB |
Output is correct |
170 |
Correct |
464 ms |
116780 KB |
Output is correct |
171 |
Correct |
9 ms |
40540 KB |
Output is correct |
172 |
Correct |
51 ms |
67824 KB |
Output is correct |
173 |
Correct |
56 ms |
67952 KB |
Output is correct |
174 |
Correct |
9 ms |
40540 KB |
Output is correct |
175 |
Correct |
1393 ms |
157712 KB |
Output is correct |
176 |
Correct |
1364 ms |
158000 KB |
Output is correct |
177 |
Correct |
1469 ms |
159664 KB |
Output is correct |
178 |
Correct |
1521 ms |
159008 KB |
Output is correct |
179 |
Correct |
1474 ms |
159200 KB |
Output is correct |
180 |
Correct |
1513 ms |
157496 KB |
Output is correct |
181 |
Correct |
1625 ms |
157020 KB |
Output is correct |
182 |
Correct |
1597 ms |
151428 KB |
Output is correct |
183 |
Correct |
617 ms |
116048 KB |
Output is correct |
184 |
Correct |
9 ms |
40540 KB |
Output is correct |
185 |
Correct |
1457 ms |
158728 KB |
Output is correct |
186 |
Correct |
1442 ms |
157172 KB |
Output is correct |
187 |
Correct |
1464 ms |
157868 KB |
Output is correct |
188 |
Correct |
1446 ms |
157392 KB |
Output is correct |
189 |
Correct |
1496 ms |
157228 KB |
Output is correct |
190 |
Correct |
1454 ms |
157916 KB |
Output is correct |
191 |
Correct |
1507 ms |
158296 KB |
Output is correct |
192 |
Correct |
1103 ms |
137544 KB |
Output is correct |
193 |
Correct |
582 ms |
114988 KB |
Output is correct |
194 |
Correct |
327 ms |
96760 KB |
Output is correct |
195 |
Correct |
333 ms |
96864 KB |
Output is correct |
196 |
Correct |
351 ms |
98648 KB |
Output is correct |
197 |
Correct |
325 ms |
97444 KB |
Output is correct |
198 |
Correct |
333 ms |
97068 KB |
Output is correct |
199 |
Correct |
320 ms |
96812 KB |
Output is correct |
200 |
Correct |
316 ms |
95668 KB |
Output is correct |
201 |
Correct |
312 ms |
95788 KB |
Output is correct |
202 |
Correct |
320 ms |
95836 KB |
Output is correct |
203 |
Correct |
109 ms |
69408 KB |
Output is correct |
204 |
Correct |
112 ms |
69160 KB |
Output is correct |
205 |
Correct |
115 ms |
69548 KB |
Output is correct |
206 |
Correct |
121 ms |
71508 KB |
Output is correct |
207 |
Correct |
1504 ms |
157996 KB |
Output is correct |
208 |
Correct |
1294 ms |
145744 KB |
Output is correct |
209 |
Correct |
576 ms |
116108 KB |
Output is correct |
210 |
Correct |
1401 ms |
156152 KB |
Output is correct |
211 |
Correct |
608 ms |
114092 KB |
Output is correct |
212 |
Correct |
358 ms |
101072 KB |
Output is correct |
213 |
Correct |
711 ms |
114208 KB |
Output is correct |
214 |
Correct |
686 ms |
114264 KB |
Output is correct |