#include<bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(false); cin.tie(0);
#define fi first
#define se second
#define em emplace
#define eb emplace_back
#define mp make_pair
#define all(v) (v).begin(), (v).end()
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int inf = 1e9;
const ll INF = 1e18;
int n, m, q, p;
vector<pll> g[500010];
vector<pll> ans[500010];
void solve() {
cin >> n >> m >> q >> p;
for(int i=1; i<=n; i++) g[i].clear(), ans[i].clear();
for(int i=1; i<=m; i++) {
int u, v;
ll d;
cin >> u >> v >> d;
g[u].eb(v, d);
}
ans[1].eb(0, 0);
for(int i=1; i<=n; i++) {
vector<pll> v;
sort(all(ans[i]));
for(auto j : ans[i]) {
if(v.size() && j.fi <= v.back().se + 1) v.back().se = max(v.back().se, j.se);
else v.eb(j);
}
ans[i] = v;
for(auto j : ans[i]) {
for(auto k : g[i]) {
ans[k.fi].eb(j.fi + k.se * (p-1), j.se + k.se * p);
}
}
}
while(q--) {
int f;
ll r;
cin >> f >> r;
auto it = upper_bound(all(ans[f]), mp(r * p, INF));
if(it != ans[f].begin() && prev(it)->se >= r * p) cout << "1";
else cout << "0";
}
cout << "\n";
}
int main() {
fast;
int t;
cin >> t;
while(t--) {
solve();
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
23808 KB |
Output is correct |
2 |
Correct |
17 ms |
23808 KB |
Output is correct |
3 |
Correct |
18 ms |
23808 KB |
Output is correct |
4 |
Correct |
17 ms |
23808 KB |
Output is correct |
5 |
Correct |
23 ms |
23808 KB |
Output is correct |
6 |
Correct |
17 ms |
23808 KB |
Output is correct |
7 |
Correct |
17 ms |
23808 KB |
Output is correct |
8 |
Correct |
16 ms |
23808 KB |
Output is correct |
9 |
Correct |
16 ms |
23808 KB |
Output is correct |
10 |
Correct |
16 ms |
23808 KB |
Output is correct |
11 |
Correct |
16 ms |
23808 KB |
Output is correct |
12 |
Correct |
23 ms |
23808 KB |
Output is correct |
13 |
Correct |
23 ms |
23936 KB |
Output is correct |
14 |
Correct |
24 ms |
23936 KB |
Output is correct |
15 |
Correct |
22 ms |
23808 KB |
Output is correct |
16 |
Correct |
22 ms |
23808 KB |
Output is correct |
17 |
Correct |
22 ms |
23808 KB |
Output is correct |
18 |
Correct |
23 ms |
23808 KB |
Output is correct |
19 |
Correct |
23 ms |
23808 KB |
Output is correct |
20 |
Correct |
22 ms |
23808 KB |
Output is correct |
21 |
Correct |
22 ms |
23808 KB |
Output is correct |
22 |
Correct |
22 ms |
23808 KB |
Output is correct |
23 |
Correct |
22 ms |
23808 KB |
Output is correct |
24 |
Correct |
21 ms |
23808 KB |
Output is correct |
25 |
Correct |
21 ms |
23808 KB |
Output is correct |
26 |
Correct |
21 ms |
23848 KB |
Output is correct |
27 |
Correct |
21 ms |
23808 KB |
Output is correct |
28 |
Correct |
20 ms |
23808 KB |
Output is correct |
29 |
Correct |
21 ms |
23936 KB |
Output is correct |
30 |
Correct |
20 ms |
23808 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
18 ms |
23808 KB |
Output is correct |
2 |
Correct |
16 ms |
23808 KB |
Output is correct |
3 |
Correct |
18 ms |
23812 KB |
Output is correct |
4 |
Correct |
16 ms |
23808 KB |
Output is correct |
5 |
Correct |
17 ms |
23808 KB |
Output is correct |
6 |
Correct |
16 ms |
23808 KB |
Output is correct |
7 |
Correct |
16 ms |
23808 KB |
Output is correct |
8 |
Correct |
16 ms |
23808 KB |
Output is correct |
9 |
Correct |
16 ms |
23808 KB |
Output is correct |
10 |
Correct |
20 ms |
23936 KB |
Output is correct |
11 |
Correct |
22 ms |
25088 KB |
Output is correct |
12 |
Correct |
21 ms |
24168 KB |
Output is correct |
13 |
Correct |
20 ms |
24320 KB |
Output is correct |
14 |
Correct |
20 ms |
23808 KB |
Output is correct |
15 |
Correct |
18 ms |
23808 KB |
Output is correct |
16 |
Correct |
19 ms |
23808 KB |
Output is correct |
17 |
Correct |
20 ms |
23956 KB |
Output is correct |
18 |
Correct |
19 ms |
23808 KB |
Output is correct |
19 |
Correct |
19 ms |
23808 KB |
Output is correct |
20 |
Correct |
19 ms |
23808 KB |
Output is correct |
21 |
Correct |
19 ms |
23808 KB |
Output is correct |
22 |
Correct |
20 ms |
24192 KB |
Output is correct |
23 |
Correct |
21 ms |
24320 KB |
Output is correct |
24 |
Correct |
19 ms |
23936 KB |
Output is correct |
25 |
Correct |
19 ms |
23936 KB |
Output is correct |
26 |
Correct |
19 ms |
23936 KB |
Output is correct |
27 |
Correct |
19 ms |
23936 KB |
Output is correct |
28 |
Correct |
18 ms |
23808 KB |
Output is correct |
29 |
Correct |
20 ms |
23808 KB |
Output is correct |
30 |
Correct |
19 ms |
23808 KB |
Output is correct |
31 |
Correct |
18 ms |
23936 KB |
Output is correct |
32 |
Correct |
20 ms |
24576 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
23808 KB |
Output is correct |
2 |
Correct |
401 ms |
48760 KB |
Output is correct |
3 |
Correct |
257 ms |
28792 KB |
Output is correct |
4 |
Correct |
242 ms |
26360 KB |
Output is correct |
5 |
Correct |
198 ms |
24440 KB |
Output is correct |
6 |
Correct |
299 ms |
31992 KB |
Output is correct |
7 |
Correct |
243 ms |
27896 KB |
Output is correct |
8 |
Correct |
281 ms |
31864 KB |
Output is correct |
9 |
Correct |
249 ms |
27912 KB |
Output is correct |
10 |
Correct |
270 ms |
31864 KB |
Output is correct |
11 |
Correct |
209 ms |
27896 KB |
Output is correct |
12 |
Correct |
72 ms |
23936 KB |
Output is correct |
13 |
Correct |
20 ms |
23808 KB |
Output is correct |
14 |
Correct |
20 ms |
23808 KB |
Output is correct |
15 |
Correct |
21 ms |
23808 KB |
Output is correct |
16 |
Correct |
22 ms |
23808 KB |
Output is correct |
17 |
Correct |
35 ms |
23808 KB |
Output is correct |
18 |
Correct |
89 ms |
24448 KB |
Output is correct |
19 |
Correct |
28 ms |
23808 KB |
Output is correct |
20 |
Correct |
38 ms |
23808 KB |
Output is correct |
21 |
Correct |
38 ms |
23808 KB |
Output is correct |
22 |
Correct |
38 ms |
23808 KB |
Output is correct |
23 |
Correct |
116 ms |
36472 KB |
Output is correct |
24 |
Correct |
266 ms |
55432 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
23808 KB |
Output is correct |
2 |
Correct |
401 ms |
48760 KB |
Output is correct |
3 |
Correct |
257 ms |
28792 KB |
Output is correct |
4 |
Correct |
242 ms |
26360 KB |
Output is correct |
5 |
Correct |
198 ms |
24440 KB |
Output is correct |
6 |
Correct |
299 ms |
31992 KB |
Output is correct |
7 |
Correct |
243 ms |
27896 KB |
Output is correct |
8 |
Correct |
281 ms |
31864 KB |
Output is correct |
9 |
Correct |
249 ms |
27912 KB |
Output is correct |
10 |
Correct |
270 ms |
31864 KB |
Output is correct |
11 |
Correct |
209 ms |
27896 KB |
Output is correct |
12 |
Correct |
72 ms |
23936 KB |
Output is correct |
13 |
Correct |
20 ms |
23808 KB |
Output is correct |
14 |
Correct |
20 ms |
23808 KB |
Output is correct |
15 |
Correct |
21 ms |
23808 KB |
Output is correct |
16 |
Correct |
22 ms |
23808 KB |
Output is correct |
17 |
Correct |
35 ms |
23808 KB |
Output is correct |
18 |
Correct |
89 ms |
24448 KB |
Output is correct |
19 |
Correct |
28 ms |
23808 KB |
Output is correct |
20 |
Correct |
38 ms |
23808 KB |
Output is correct |
21 |
Correct |
38 ms |
23808 KB |
Output is correct |
22 |
Correct |
38 ms |
23808 KB |
Output is correct |
23 |
Correct |
116 ms |
36472 KB |
Output is correct |
24 |
Correct |
266 ms |
55432 KB |
Output is correct |
25 |
Correct |
545 ms |
49084 KB |
Output is correct |
26 |
Correct |
414 ms |
29432 KB |
Output is correct |
27 |
Correct |
381 ms |
26744 KB |
Output is correct |
28 |
Correct |
338 ms |
24824 KB |
Output is correct |
29 |
Correct |
313 ms |
24312 KB |
Output is correct |
30 |
Correct |
358 ms |
24568 KB |
Output is correct |
31 |
Correct |
285 ms |
32120 KB |
Output is correct |
32 |
Correct |
254 ms |
27896 KB |
Output is correct |
33 |
Correct |
285 ms |
31888 KB |
Output is correct |
34 |
Correct |
248 ms |
28024 KB |
Output is correct |
35 |
Correct |
252 ms |
31976 KB |
Output is correct |
36 |
Correct |
211 ms |
28024 KB |
Output is correct |
37 |
Correct |
72 ms |
24056 KB |
Output is correct |
38 |
Correct |
20 ms |
23808 KB |
Output is correct |
39 |
Correct |
20 ms |
24064 KB |
Output is correct |
40 |
Correct |
468 ms |
122360 KB |
Output is correct |
41 |
Correct |
503 ms |
140152 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
23808 KB |
Output is correct |
2 |
Correct |
17 ms |
23848 KB |
Output is correct |
3 |
Correct |
17 ms |
23808 KB |
Output is correct |
4 |
Correct |
20 ms |
23936 KB |
Output is correct |
5 |
Correct |
18 ms |
23936 KB |
Output is correct |
6 |
Correct |
17 ms |
23808 KB |
Output is correct |
7 |
Correct |
17 ms |
23808 KB |
Output is correct |
8 |
Correct |
19 ms |
24320 KB |
Output is correct |
9 |
Correct |
18 ms |
23936 KB |
Output is correct |
10 |
Correct |
17 ms |
23808 KB |
Output is correct |
11 |
Correct |
18 ms |
23936 KB |
Output is correct |
12 |
Correct |
18 ms |
23808 KB |
Output is correct |
13 |
Correct |
18 ms |
23936 KB |
Output is correct |
14 |
Correct |
18 ms |
23936 KB |
Output is correct |
15 |
Correct |
18 ms |
23936 KB |
Output is correct |
16 |
Correct |
18 ms |
23936 KB |
Output is correct |
17 |
Correct |
18 ms |
24064 KB |
Output is correct |
18 |
Correct |
18 ms |
24064 KB |
Output is correct |
19 |
Correct |
18 ms |
23936 KB |
Output is correct |
20 |
Correct |
17 ms |
23936 KB |
Output is correct |
21 |
Correct |
19 ms |
24064 KB |
Output is correct |
22 |
Correct |
18 ms |
24192 KB |
Output is correct |
23 |
Correct |
18 ms |
23936 KB |
Output is correct |
24 |
Correct |
22 ms |
24064 KB |
Output is correct |
25 |
Correct |
18 ms |
24064 KB |
Output is correct |
26 |
Correct |
19 ms |
23808 KB |
Output is correct |
27 |
Correct |
16 ms |
23808 KB |
Output is correct |
28 |
Correct |
19 ms |
23808 KB |
Output is correct |
29 |
Correct |
19 ms |
23808 KB |
Output is correct |
30 |
Correct |
20 ms |
23808 KB |
Output is correct |
31 |
Correct |
16 ms |
23808 KB |
Output is correct |
32 |
Correct |
15 ms |
23884 KB |
Output is correct |
33 |
Correct |
20 ms |
23808 KB |
Output is correct |
34 |
Correct |
20 ms |
23808 KB |
Output is correct |
35 |
Correct |
17 ms |
23808 KB |
Output is correct |
36 |
Correct |
20 ms |
23808 KB |
Output is correct |
37 |
Correct |
16 ms |
23808 KB |
Output is correct |
38 |
Correct |
16 ms |
23808 KB |
Output is correct |
39 |
Correct |
16 ms |
23808 KB |
Output is correct |
40 |
Correct |
18 ms |
23936 KB |
Output is correct |
41 |
Correct |
17 ms |
23808 KB |
Output is correct |
42 |
Correct |
30 ms |
23808 KB |
Output is correct |
43 |
Correct |
18 ms |
24320 KB |
Output is correct |
44 |
Correct |
22 ms |
24320 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
23808 KB |
Output is correct |
2 |
Correct |
17 ms |
23848 KB |
Output is correct |
3 |
Correct |
17 ms |
23808 KB |
Output is correct |
4 |
Correct |
20 ms |
23936 KB |
Output is correct |
5 |
Correct |
18 ms |
23936 KB |
Output is correct |
6 |
Correct |
17 ms |
23808 KB |
Output is correct |
7 |
Correct |
17 ms |
23808 KB |
Output is correct |
8 |
Correct |
19 ms |
24320 KB |
Output is correct |
9 |
Correct |
18 ms |
23936 KB |
Output is correct |
10 |
Correct |
17 ms |
23808 KB |
Output is correct |
11 |
Correct |
18 ms |
23936 KB |
Output is correct |
12 |
Correct |
18 ms |
23808 KB |
Output is correct |
13 |
Correct |
18 ms |
23936 KB |
Output is correct |
14 |
Correct |
18 ms |
23936 KB |
Output is correct |
15 |
Correct |
18 ms |
23936 KB |
Output is correct |
16 |
Correct |
18 ms |
23936 KB |
Output is correct |
17 |
Correct |
18 ms |
24064 KB |
Output is correct |
18 |
Correct |
18 ms |
24064 KB |
Output is correct |
19 |
Correct |
18 ms |
23936 KB |
Output is correct |
20 |
Correct |
17 ms |
23936 KB |
Output is correct |
21 |
Correct |
19 ms |
24064 KB |
Output is correct |
22 |
Correct |
18 ms |
24192 KB |
Output is correct |
23 |
Correct |
18 ms |
23936 KB |
Output is correct |
24 |
Correct |
22 ms |
24064 KB |
Output is correct |
25 |
Correct |
18 ms |
24064 KB |
Output is correct |
26 |
Correct |
19 ms |
23808 KB |
Output is correct |
27 |
Correct |
16 ms |
23808 KB |
Output is correct |
28 |
Correct |
19 ms |
23808 KB |
Output is correct |
29 |
Correct |
19 ms |
23808 KB |
Output is correct |
30 |
Correct |
20 ms |
23808 KB |
Output is correct |
31 |
Correct |
16 ms |
23808 KB |
Output is correct |
32 |
Correct |
15 ms |
23884 KB |
Output is correct |
33 |
Correct |
20 ms |
23808 KB |
Output is correct |
34 |
Correct |
20 ms |
23808 KB |
Output is correct |
35 |
Correct |
17 ms |
23808 KB |
Output is correct |
36 |
Correct |
20 ms |
23808 KB |
Output is correct |
37 |
Correct |
16 ms |
23808 KB |
Output is correct |
38 |
Correct |
16 ms |
23808 KB |
Output is correct |
39 |
Correct |
16 ms |
23808 KB |
Output is correct |
40 |
Correct |
18 ms |
23936 KB |
Output is correct |
41 |
Correct |
17 ms |
23808 KB |
Output is correct |
42 |
Correct |
30 ms |
23808 KB |
Output is correct |
43 |
Correct |
18 ms |
24320 KB |
Output is correct |
44 |
Correct |
22 ms |
24320 KB |
Output is correct |
45 |
Correct |
686 ms |
40384 KB |
Output is correct |
46 |
Correct |
790 ms |
96248 KB |
Output is correct |
47 |
Correct |
832 ms |
54336 KB |
Output is correct |
48 |
Correct |
441 ms |
25920 KB |
Output is correct |
49 |
Correct |
313 ms |
27384 KB |
Output is correct |
50 |
Correct |
290 ms |
24952 KB |
Output is correct |
51 |
Correct |
17 ms |
23808 KB |
Output is correct |
52 |
Correct |
18 ms |
23808 KB |
Output is correct |
53 |
Correct |
37 ms |
23808 KB |
Output is correct |
54 |
Correct |
29 ms |
23808 KB |
Output is correct |
55 |
Correct |
288 ms |
26892 KB |
Output is correct |
56 |
Correct |
329 ms |
24640 KB |
Output is correct |
57 |
Correct |
438 ms |
24960 KB |
Output is correct |
58 |
Correct |
332 ms |
29432 KB |
Output is correct |
59 |
Correct |
356 ms |
24952 KB |
Output is correct |
60 |
Correct |
480 ms |
26360 KB |
Output is correct |
61 |
Correct |
585 ms |
36732 KB |
Output is correct |
62 |
Correct |
411 ms |
94328 KB |
Output is correct |
63 |
Correct |
238 ms |
60336 KB |
Output is correct |
64 |
Correct |
204 ms |
24960 KB |
Output is correct |
65 |
Correct |
570 ms |
55556 KB |
Output is correct |
66 |
Correct |
653 ms |
50760 KB |
Output is correct |
67 |
Correct |
716 ms |
57496 KB |
Output is correct |
68 |
Correct |
613 ms |
56016 KB |
Output is correct |
69 |
Correct |
586 ms |
53752 KB |
Output is correct |
70 |
Correct |
755 ms |
77320 KB |
Output is correct |
71 |
Correct |
584 ms |
164988 KB |
Output is correct |
72 |
Correct |
159 ms |
23928 KB |
Output is correct |
73 |
Correct |
621 ms |
55672 KB |
Output is correct |
74 |
Correct |
465 ms |
48220 KB |
Output is correct |
75 |
Correct |
48 ms |
24064 KB |
Output is correct |
76 |
Correct |
47 ms |
24128 KB |
Output is correct |
77 |
Correct |
49 ms |
24056 KB |
Output is correct |
78 |
Correct |
58 ms |
24184 KB |
Output is correct |
79 |
Correct |
186 ms |
30456 KB |
Output is correct |
80 |
Correct |
186 ms |
30456 KB |
Output is correct |
81 |
Correct |
183 ms |
30456 KB |
Output is correct |
82 |
Correct |
185 ms |
30456 KB |
Output is correct |
83 |
Correct |
512 ms |
147196 KB |
Output is correct |
84 |
Correct |
478 ms |
123000 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
23808 KB |
Output is correct |
2 |
Correct |
17 ms |
23808 KB |
Output is correct |
3 |
Correct |
18 ms |
23808 KB |
Output is correct |
4 |
Correct |
17 ms |
23808 KB |
Output is correct |
5 |
Correct |
23 ms |
23808 KB |
Output is correct |
6 |
Correct |
17 ms |
23808 KB |
Output is correct |
7 |
Correct |
17 ms |
23808 KB |
Output is correct |
8 |
Correct |
16 ms |
23808 KB |
Output is correct |
9 |
Correct |
16 ms |
23808 KB |
Output is correct |
10 |
Correct |
16 ms |
23808 KB |
Output is correct |
11 |
Correct |
16 ms |
23808 KB |
Output is correct |
12 |
Correct |
23 ms |
23808 KB |
Output is correct |
13 |
Correct |
23 ms |
23936 KB |
Output is correct |
14 |
Correct |
24 ms |
23936 KB |
Output is correct |
15 |
Correct |
22 ms |
23808 KB |
Output is correct |
16 |
Correct |
22 ms |
23808 KB |
Output is correct |
17 |
Correct |
22 ms |
23808 KB |
Output is correct |
18 |
Correct |
23 ms |
23808 KB |
Output is correct |
19 |
Correct |
23 ms |
23808 KB |
Output is correct |
20 |
Correct |
22 ms |
23808 KB |
Output is correct |
21 |
Correct |
22 ms |
23808 KB |
Output is correct |
22 |
Correct |
22 ms |
23808 KB |
Output is correct |
23 |
Correct |
22 ms |
23808 KB |
Output is correct |
24 |
Correct |
21 ms |
23808 KB |
Output is correct |
25 |
Correct |
21 ms |
23808 KB |
Output is correct |
26 |
Correct |
21 ms |
23848 KB |
Output is correct |
27 |
Correct |
21 ms |
23808 KB |
Output is correct |
28 |
Correct |
20 ms |
23808 KB |
Output is correct |
29 |
Correct |
21 ms |
23936 KB |
Output is correct |
30 |
Correct |
20 ms |
23808 KB |
Output is correct |
31 |
Correct |
18 ms |
23808 KB |
Output is correct |
32 |
Correct |
16 ms |
23808 KB |
Output is correct |
33 |
Correct |
18 ms |
23812 KB |
Output is correct |
34 |
Correct |
16 ms |
23808 KB |
Output is correct |
35 |
Correct |
17 ms |
23808 KB |
Output is correct |
36 |
Correct |
16 ms |
23808 KB |
Output is correct |
37 |
Correct |
16 ms |
23808 KB |
Output is correct |
38 |
Correct |
16 ms |
23808 KB |
Output is correct |
39 |
Correct |
16 ms |
23808 KB |
Output is correct |
40 |
Correct |
20 ms |
23936 KB |
Output is correct |
41 |
Correct |
22 ms |
25088 KB |
Output is correct |
42 |
Correct |
21 ms |
24168 KB |
Output is correct |
43 |
Correct |
20 ms |
24320 KB |
Output is correct |
44 |
Correct |
20 ms |
23808 KB |
Output is correct |
45 |
Correct |
18 ms |
23808 KB |
Output is correct |
46 |
Correct |
19 ms |
23808 KB |
Output is correct |
47 |
Correct |
20 ms |
23956 KB |
Output is correct |
48 |
Correct |
19 ms |
23808 KB |
Output is correct |
49 |
Correct |
19 ms |
23808 KB |
Output is correct |
50 |
Correct |
19 ms |
23808 KB |
Output is correct |
51 |
Correct |
19 ms |
23808 KB |
Output is correct |
52 |
Correct |
20 ms |
24192 KB |
Output is correct |
53 |
Correct |
21 ms |
24320 KB |
Output is correct |
54 |
Correct |
19 ms |
23936 KB |
Output is correct |
55 |
Correct |
19 ms |
23936 KB |
Output is correct |
56 |
Correct |
19 ms |
23936 KB |
Output is correct |
57 |
Correct |
19 ms |
23936 KB |
Output is correct |
58 |
Correct |
18 ms |
23808 KB |
Output is correct |
59 |
Correct |
20 ms |
23808 KB |
Output is correct |
60 |
Correct |
19 ms |
23808 KB |
Output is correct |
61 |
Correct |
18 ms |
23936 KB |
Output is correct |
62 |
Correct |
20 ms |
24576 KB |
Output is correct |
63 |
Correct |
17 ms |
23808 KB |
Output is correct |
64 |
Correct |
401 ms |
48760 KB |
Output is correct |
65 |
Correct |
257 ms |
28792 KB |
Output is correct |
66 |
Correct |
242 ms |
26360 KB |
Output is correct |
67 |
Correct |
198 ms |
24440 KB |
Output is correct |
68 |
Correct |
299 ms |
31992 KB |
Output is correct |
69 |
Correct |
243 ms |
27896 KB |
Output is correct |
70 |
Correct |
281 ms |
31864 KB |
Output is correct |
71 |
Correct |
249 ms |
27912 KB |
Output is correct |
72 |
Correct |
270 ms |
31864 KB |
Output is correct |
73 |
Correct |
209 ms |
27896 KB |
Output is correct |
74 |
Correct |
72 ms |
23936 KB |
Output is correct |
75 |
Correct |
20 ms |
23808 KB |
Output is correct |
76 |
Correct |
20 ms |
23808 KB |
Output is correct |
77 |
Correct |
21 ms |
23808 KB |
Output is correct |
78 |
Correct |
22 ms |
23808 KB |
Output is correct |
79 |
Correct |
35 ms |
23808 KB |
Output is correct |
80 |
Correct |
89 ms |
24448 KB |
Output is correct |
81 |
Correct |
28 ms |
23808 KB |
Output is correct |
82 |
Correct |
38 ms |
23808 KB |
Output is correct |
83 |
Correct |
38 ms |
23808 KB |
Output is correct |
84 |
Correct |
38 ms |
23808 KB |
Output is correct |
85 |
Correct |
116 ms |
36472 KB |
Output is correct |
86 |
Correct |
266 ms |
55432 KB |
Output is correct |
87 |
Correct |
545 ms |
49084 KB |
Output is correct |
88 |
Correct |
414 ms |
29432 KB |
Output is correct |
89 |
Correct |
381 ms |
26744 KB |
Output is correct |
90 |
Correct |
338 ms |
24824 KB |
Output is correct |
91 |
Correct |
313 ms |
24312 KB |
Output is correct |
92 |
Correct |
358 ms |
24568 KB |
Output is correct |
93 |
Correct |
285 ms |
32120 KB |
Output is correct |
94 |
Correct |
254 ms |
27896 KB |
Output is correct |
95 |
Correct |
285 ms |
31888 KB |
Output is correct |
96 |
Correct |
248 ms |
28024 KB |
Output is correct |
97 |
Correct |
252 ms |
31976 KB |
Output is correct |
98 |
Correct |
211 ms |
28024 KB |
Output is correct |
99 |
Correct |
72 ms |
24056 KB |
Output is correct |
100 |
Correct |
20 ms |
23808 KB |
Output is correct |
101 |
Correct |
20 ms |
24064 KB |
Output is correct |
102 |
Correct |
468 ms |
122360 KB |
Output is correct |
103 |
Correct |
503 ms |
140152 KB |
Output is correct |
104 |
Correct |
16 ms |
23808 KB |
Output is correct |
105 |
Correct |
17 ms |
23848 KB |
Output is correct |
106 |
Correct |
17 ms |
23808 KB |
Output is correct |
107 |
Correct |
20 ms |
23936 KB |
Output is correct |
108 |
Correct |
18 ms |
23936 KB |
Output is correct |
109 |
Correct |
17 ms |
23808 KB |
Output is correct |
110 |
Correct |
17 ms |
23808 KB |
Output is correct |
111 |
Correct |
19 ms |
24320 KB |
Output is correct |
112 |
Correct |
18 ms |
23936 KB |
Output is correct |
113 |
Correct |
17 ms |
23808 KB |
Output is correct |
114 |
Correct |
18 ms |
23936 KB |
Output is correct |
115 |
Correct |
18 ms |
23808 KB |
Output is correct |
116 |
Correct |
18 ms |
23936 KB |
Output is correct |
117 |
Correct |
18 ms |
23936 KB |
Output is correct |
118 |
Correct |
18 ms |
23936 KB |
Output is correct |
119 |
Correct |
18 ms |
23936 KB |
Output is correct |
120 |
Correct |
18 ms |
24064 KB |
Output is correct |
121 |
Correct |
18 ms |
24064 KB |
Output is correct |
122 |
Correct |
18 ms |
23936 KB |
Output is correct |
123 |
Correct |
17 ms |
23936 KB |
Output is correct |
124 |
Correct |
19 ms |
24064 KB |
Output is correct |
125 |
Correct |
18 ms |
24192 KB |
Output is correct |
126 |
Correct |
18 ms |
23936 KB |
Output is correct |
127 |
Correct |
22 ms |
24064 KB |
Output is correct |
128 |
Correct |
18 ms |
24064 KB |
Output is correct |
129 |
Correct |
19 ms |
23808 KB |
Output is correct |
130 |
Correct |
16 ms |
23808 KB |
Output is correct |
131 |
Correct |
19 ms |
23808 KB |
Output is correct |
132 |
Correct |
19 ms |
23808 KB |
Output is correct |
133 |
Correct |
20 ms |
23808 KB |
Output is correct |
134 |
Correct |
16 ms |
23808 KB |
Output is correct |
135 |
Correct |
15 ms |
23884 KB |
Output is correct |
136 |
Correct |
20 ms |
23808 KB |
Output is correct |
137 |
Correct |
20 ms |
23808 KB |
Output is correct |
138 |
Correct |
17 ms |
23808 KB |
Output is correct |
139 |
Correct |
20 ms |
23808 KB |
Output is correct |
140 |
Correct |
16 ms |
23808 KB |
Output is correct |
141 |
Correct |
16 ms |
23808 KB |
Output is correct |
142 |
Correct |
16 ms |
23808 KB |
Output is correct |
143 |
Correct |
18 ms |
23936 KB |
Output is correct |
144 |
Correct |
17 ms |
23808 KB |
Output is correct |
145 |
Correct |
30 ms |
23808 KB |
Output is correct |
146 |
Correct |
18 ms |
24320 KB |
Output is correct |
147 |
Correct |
22 ms |
24320 KB |
Output is correct |
148 |
Correct |
686 ms |
40384 KB |
Output is correct |
149 |
Correct |
790 ms |
96248 KB |
Output is correct |
150 |
Correct |
832 ms |
54336 KB |
Output is correct |
151 |
Correct |
441 ms |
25920 KB |
Output is correct |
152 |
Correct |
313 ms |
27384 KB |
Output is correct |
153 |
Correct |
290 ms |
24952 KB |
Output is correct |
154 |
Correct |
17 ms |
23808 KB |
Output is correct |
155 |
Correct |
18 ms |
23808 KB |
Output is correct |
156 |
Correct |
37 ms |
23808 KB |
Output is correct |
157 |
Correct |
29 ms |
23808 KB |
Output is correct |
158 |
Correct |
288 ms |
26892 KB |
Output is correct |
159 |
Correct |
329 ms |
24640 KB |
Output is correct |
160 |
Correct |
438 ms |
24960 KB |
Output is correct |
161 |
Correct |
332 ms |
29432 KB |
Output is correct |
162 |
Correct |
356 ms |
24952 KB |
Output is correct |
163 |
Correct |
480 ms |
26360 KB |
Output is correct |
164 |
Correct |
585 ms |
36732 KB |
Output is correct |
165 |
Correct |
411 ms |
94328 KB |
Output is correct |
166 |
Correct |
238 ms |
60336 KB |
Output is correct |
167 |
Correct |
204 ms |
24960 KB |
Output is correct |
168 |
Correct |
570 ms |
55556 KB |
Output is correct |
169 |
Correct |
653 ms |
50760 KB |
Output is correct |
170 |
Correct |
716 ms |
57496 KB |
Output is correct |
171 |
Correct |
613 ms |
56016 KB |
Output is correct |
172 |
Correct |
586 ms |
53752 KB |
Output is correct |
173 |
Correct |
755 ms |
77320 KB |
Output is correct |
174 |
Correct |
584 ms |
164988 KB |
Output is correct |
175 |
Correct |
159 ms |
23928 KB |
Output is correct |
176 |
Correct |
621 ms |
55672 KB |
Output is correct |
177 |
Correct |
465 ms |
48220 KB |
Output is correct |
178 |
Correct |
48 ms |
24064 KB |
Output is correct |
179 |
Correct |
47 ms |
24128 KB |
Output is correct |
180 |
Correct |
49 ms |
24056 KB |
Output is correct |
181 |
Correct |
58 ms |
24184 KB |
Output is correct |
182 |
Correct |
186 ms |
30456 KB |
Output is correct |
183 |
Correct |
186 ms |
30456 KB |
Output is correct |
184 |
Correct |
183 ms |
30456 KB |
Output is correct |
185 |
Correct |
185 ms |
30456 KB |
Output is correct |
186 |
Correct |
512 ms |
147196 KB |
Output is correct |
187 |
Correct |
478 ms |
123000 KB |
Output is correct |
188 |
Correct |
624 ms |
40440 KB |
Output is correct |
189 |
Correct |
749 ms |
96380 KB |
Output is correct |
190 |
Correct |
813 ms |
54312 KB |
Output is correct |
191 |
Correct |
441 ms |
26872 KB |
Output is correct |
192 |
Correct |
386 ms |
24696 KB |
Output is correct |
193 |
Correct |
377 ms |
24656 KB |
Output is correct |
194 |
Correct |
328 ms |
27128 KB |
Output is correct |
195 |
Correct |
298 ms |
25084 KB |
Output is correct |
196 |
Correct |
595 ms |
32760 KB |
Output is correct |
197 |
Correct |
620 ms |
37752 KB |
Output is correct |
198 |
Correct |
564 ms |
32780 KB |
Output is correct |
199 |
Correct |
573 ms |
35320 KB |
Output is correct |
200 |
Correct |
534 ms |
32632 KB |
Output is correct |
201 |
Correct |
556 ms |
37880 KB |
Output is correct |
202 |
Correct |
171 ms |
25724 KB |
Output is correct |
203 |
Correct |
161 ms |
24696 KB |
Output is correct |
204 |
Correct |
147 ms |
24184 KB |
Output is correct |
205 |
Correct |
67 ms |
23936 KB |
Output is correct |
206 |
Correct |
293 ms |
28280 KB |
Output is correct |
207 |
Correct |
347 ms |
26084 KB |
Output is correct |
208 |
Correct |
316 ms |
24824 KB |
Output is correct |
209 |
Correct |
885 ms |
266104 KB |
Output is correct |
210 |
Correct |
905 ms |
265848 KB |
Output is correct |
211 |
Correct |
403 ms |
33400 KB |
Output is correct |
212 |
Correct |
536 ms |
151032 KB |
Output is correct |
213 |
Correct |
570 ms |
162524 KB |
Output is correct |
214 |
Correct |
30 ms |
26240 KB |
Output is correct |
215 |
Correct |
63 ms |
32976 KB |
Output is correct |
216 |
Correct |
127 ms |
46460 KB |
Output is correct |
217 |
Correct |
208 ms |
59000 KB |
Output is correct |
218 |
Correct |
326 ms |
73976 KB |
Output is correct |
219 |
Correct |
474 ms |
101532 KB |
Output is correct |
220 |
Correct |
641 ms |
125772 KB |
Output is correct |
221 |
Correct |
45 ms |
30712 KB |
Output is correct |
222 |
Correct |
125 ms |
46632 KB |
Output is correct |
223 |
Correct |
263 ms |
72316 KB |
Output is correct |
224 |
Correct |
444 ms |
105484 KB |
Output is correct |
225 |
Correct |
699 ms |
146632 KB |
Output is correct |
226 |
Correct |
996 ms |
196436 KB |
Output is correct |
227 |
Correct |
1336 ms |
255720 KB |
Output is correct |
228 |
Correct |
1438 ms |
267744 KB |
Output is correct |