// Hallelujah, praise the one who set me free
// Hallelujah, death has lost its grip on me
// You have broken every chain, There's salvation in your name
// Jesus Christ, my living hope
#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <numeric>
#include <bitset>
#include <map>
#include <queue>
#include <cassert>
using namespace std;
#define REP(i, s, e) for (int i = (s); i < (e); i++)
#define RREP(i, s, e) for (int i = (s); i >= (e); i--)
template <class T>
inline bool mnto(T& a, T b) {return a > b ? a = b, 1 : 0;}
template <class T>
inline bool mxto(T& a, T b) {return a < b ? a = b, 1: 0;}
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
#define FI first
#define SE second
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
typedef tuple<int, int, int> iii;
typedef tuple<ll, ll, ll> lll;
#define ALL(_a) _a.begin(), _a.end()
#define SZ(_a) (int) _a.size()
#define pb push_back
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ii> vii;
typedef vector<iii> viii;
#ifndef DEBUG
#define cerr if (0) cerr
#endif
const int INF = 1000000005;
const ll LINF = 1000000000000000005ll;
const int MAXN = 50005;
const int BLK = 300;
//const int MAXN = 50;
//const int BLK = 1;
int n, m, k;
vi adj[MAXN];
string s;
int x[MAXN];
namespace SmallKSolver {
ll base[MAXN], delta[MAXN];
int rawd[MAXN], goodd[MAXN];
ll d[2][MAXN];
queue<int> qu;
deque<int> dq;
priority_queue<lll, vector<lll>, greater<lll>> pq;
bool fix[MAXN];
ll ans[MAXN];
int main() {
// distance to closest stop
REP (i, 0, n) {
rawd[i] = INF;
}
REP (i, 0, n) {
if (s[i] == '1') {
qu.push(i);
rawd[i] = 0;
}
}
while (!qu.empty()) {
int u = qu.front(); qu.pop();
for (int v : adj[u]) {
if (mnto(rawd[v], rawd[u] + 1)) {
qu.push(v);
}
}
}
REP (i, 0, n) {
if (rawd[i] == 0) {
rawd[i] = 2;
}
}
REP (i, 1, k) {
base[0] += rawd[x[i]];
}
// "good" vertex is stop cell and has adjacent stop cell
// distance to closest "good" vertex
REP (i, 0, n) {
goodd[i] = INF;
}
REP (i, 0, n) {
if (s[i] == '0') {
continue;
}
bool gd = 0;
for (int v : adj[i]) {
if (s[v] == '1') {
gd = 1;
break;
}
}
if (gd) {
goodd[i] = 0;
dq.push_back(i);
}
}
while (!dq.empty()) {
int u = dq.front(); dq.pop_front();
for (int v : adj[u]) {
if (mnto(goodd[v], goodd[u] + (s[u] == '0'))) {
if (s[u] == '0') {
dq.push_back(v);
} else {
dq.push_front(v);
}
}
}
}
REP (i, 1, k) {
delta[i - 1] = goodd[x[i]] - rawd[x[i]];
}
sort(delta, delta + k - 1);
cerr << base[0] << '\n';
REP (i, 1, k) {
base[i] = base[i - 1] + delta[i - 1];
cerr << i << ": " << delta[i - 1] << ' ' << base[i] << '\n';
}
// get answer without stop cells
REP (i, 0, n) {
ans[i] = LINF;
}
ans[x[0]] = 0;
qu.push(x[0]);
while (!qu.empty()) {
int u = qu.front(); qu.pop();
for (int v : adj[u]) {
if (mnto(ans[v], ans[u] + 1) && s[v] == '0') {
qu.push(v);
}
}
}
REP (i, 0, n) {
fix[i] = ans[i] != LINF;
}
REP (g, 0, k) {
cerr << g << '\n';
REP (i, 0, n) {
d[0][i] = d[1][i] = LINF;
}
d[0][x[0]] = 0;
pq.push({0, x[0], 0});
while (!pq.empty()) {
auto [ud, u, t] = pq.top(); pq.pop();
if (d[t][u] != ud) {
continue;
}
for (int v : adj[u]) {
bool b = u != x[0] && s[u] == '1';
if (mnto(d[b | t][v], ud + (b ? 2 * k - 1 - g : 1))) {
pq.push({d[b | t][v], v, b | t});
}
}
}
REP (i, 0, n) {
mnto(ans[i], d[1][i] + base[g] - 2 * (k - 1 - g));
cerr << ' ' << i << ": " << d[i] << ' ' << ans[i] << '\n';
}
}
REP (i, 0, n) {
cout << ans[i] << '\n';
}
return 0;
}
}
namespace BigKSolver {
ll delta[MAXN], cost[MAXN];
int rawd[MAXN], goodd[MAXN];
queue<int> qu;
deque<int> dq;
priority_queue<lll, vector<lll>, greater<lll>> pq;
int mnl[MAXN];
ll d[MAXN][MAXN / BLK + 50];
ll ans[MAXN];
int main() {
int MAXL = n / (k - 1) + 10;
// distance to closest stop
REP (i, 0, n) {
rawd[i] = INF;
}
REP (i, 0, n) {
if (s[i] == '1') {
qu.push(i);
rawd[i] = 0;
}
}
while (!qu.empty()) {
int u = qu.front(); qu.pop();
for (int v : adj[u]) {
if (mnto(rawd[v], rawd[u] + 1)) {
qu.push(v);
}
}
}
// "good" vertex is stop cell and has adjacent stop cell
// distance to closest "good" vertex
REP (i, 0, n) {
goodd[i] = INF;
}
REP (i, 0, n) {
if (s[i] == '0') {
continue;
}
bool gd = 0;
for (int v : adj[i]) {
if (s[v] == '1') {
gd = 1;
break;
}
}
if (gd) {
goodd[i] = 0;
dq.push_back(i);
}
}
while (!dq.empty()) {
int u = dq.front(); dq.pop_front();
for (int v : adj[u]) {
if (mnto(goodd[v], goodd[u] + (s[v] == '0'))) {
if (s[v] == '0') {
dq.push_back(v);
} else {
dq.push_front(v);
}
}
}
}
REP (i, 0, n) {
goodd[i] += s[i] == '1';
}
REP (i, 0, n) {
if (rawd[i] == 0) {
rawd[i] = min(goodd[i], 2);
}
}
ll base = 0;
REP (i, 1, k) {
base += rawd[x[i]];
}
REP (i, 1, k) {
delta[i - 1] = goodd[x[i]] - rawd[x[i]];
cerr << delta[i - 1] << "\n";
}
sort(delta, delta + k - 1);
cost[1] = base;
int ptr = 0;
REP (i, 2, n + 1) {
while (ptr < k - 1 && delta[ptr] <= i - 2) {
ptr++;
}
cost[i] = cost[i - 1] + 2 * (k - 1) - ptr;
cerr << i << ": " << cost[i] << "\n";
}
REP (i, 0, n) {
mnl[i] = INF;
}
mnl[x[0]] = 0;
dq.pb(x[0]);
while (!dq.empty()) {
int u = dq.front(); dq.pop_front();
for (int v : adj[u]) {
bool b = u != x[0] && s[u] == '1';
if (mnto(mnl[v], mnl[u] + b)) {
if (b) {
dq.push_back(v);
} else {
dq.push_front(v);
}
}
}
}
REP (i, 0, n) {
ans[i] = LINF;
REP (j, 0, MAXL) {
d[i][j] = LINF;
}
}
d[x[0]][0] = 0;
pq.push({0, x[0], 0});
while (!pq.empty()) {
auto [ud, u, l] = pq.top(); pq.pop();
if (ud != d[u][l - mnl[u]]) {
continue;
}
for (int v : adj[u]) {
bool b = u != x[0] && s[u] == '1';
if (l + b - mnl[v] < MAXL && mnto(d[v][l + b - mnl[v]], ud + 1)) {
pq.push({d[v][l + b - mnl[v]], v, l + b});
}
}
}
REP (i, 0, n) {
REP (j, 0, min(MAXL, n - mnl[i] + 1)) {
mnto(ans[i], d[i][j] + cost[j + mnl[i]]);
}
}
REP (i, 0, n) {
cout << ans[i] << '\n';
}
return 0;
}
}
int main() {
#ifndef DEBUG
ios::sync_with_stdio(0), cin.tie(0);
#endif
cin >> n >> m >> k;
REP (i, 0, m) {
int u, v; cin >> u >> v;
u--; v--;
adj[u].pb(v);
adj[v].pb(u);
}
cin >> s;
REP (i, 0, k) {
cin >> x[i];
x[i]--;
}
if (k <= BLK) {
return SmallKSolver::main();
} else {
return BigKSolver::main();
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
11868 KB |
Output is correct |
2 |
Correct |
44 ms |
58820 KB |
Output is correct |
3 |
Correct |
71 ms |
93016 KB |
Output is correct |
4 |
Correct |
300 ms |
8172 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
12124 KB |
Output is correct |
2 |
Correct |
85 ms |
59100 KB |
Output is correct |
3 |
Correct |
721 ms |
8300 KB |
Output is correct |
4 |
Correct |
32 ms |
8220 KB |
Output is correct |
5 |
Correct |
154 ms |
93144 KB |
Output is correct |
6 |
Correct |
81 ms |
8100 KB |
Output is correct |
7 |
Correct |
127 ms |
7640 KB |
Output is correct |
8 |
Correct |
35 ms |
8020 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
11868 KB |
Output is correct |
2 |
Correct |
80 ms |
59136 KB |
Output is correct |
3 |
Correct |
1548 ms |
93052 KB |
Output is correct |
4 |
Correct |
249 ms |
92592 KB |
Output is correct |
5 |
Correct |
92 ms |
93008 KB |
Output is correct |
6 |
Correct |
82 ms |
8192 KB |
Output is correct |
7 |
Correct |
221 ms |
8016 KB |
Output is correct |
8 |
Correct |
97 ms |
92876 KB |
Output is correct |
9 |
Correct |
41 ms |
25984 KB |
Output is correct |
10 |
Correct |
17 ms |
7260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
5724 KB |
Output is correct |
2 |
Correct |
5 ms |
5724 KB |
Output is correct |
3 |
Correct |
9 ms |
12064 KB |
Output is correct |
4 |
Correct |
11 ms |
5900 KB |
Output is correct |
5 |
Correct |
4 ms |
5720 KB |
Output is correct |
6 |
Correct |
6 ms |
5720 KB |
Output is correct |
7 |
Correct |
6 ms |
10072 KB |
Output is correct |
8 |
Correct |
7 ms |
12376 KB |
Output is correct |
9 |
Correct |
3 ms |
5724 KB |
Output is correct |
10 |
Correct |
3 ms |
5724 KB |
Output is correct |
11 |
Correct |
3 ms |
5980 KB |
Output is correct |
12 |
Correct |
4 ms |
5724 KB |
Output is correct |
13 |
Correct |
4 ms |
5724 KB |
Output is correct |
14 |
Correct |
2 ms |
5720 KB |
Output is correct |
15 |
Correct |
16 ms |
5724 KB |
Output is correct |
16 |
Correct |
20 ms |
5976 KB |
Output is correct |
17 |
Correct |
38 ms |
5872 KB |
Output is correct |
18 |
Correct |
4 ms |
5720 KB |
Output is correct |
19 |
Correct |
3 ms |
5724 KB |
Output is correct |
20 |
Correct |
13 ms |
6100 KB |
Output is correct |
21 |
Correct |
5 ms |
11868 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
41 ms |
8272 KB |
Output is correct |
2 |
Correct |
28 ms |
8284 KB |
Output is correct |
3 |
Correct |
24 ms |
8544 KB |
Output is correct |
4 |
Correct |
38 ms |
8308 KB |
Output is correct |
5 |
Correct |
53 ms |
8116 KB |
Output is correct |
6 |
Correct |
22 ms |
7824 KB |
Output is correct |
7 |
Correct |
26 ms |
7524 KB |
Output is correct |
8 |
Correct |
14 ms |
7004 KB |
Output is correct |
9 |
Correct |
20 ms |
6992 KB |
Output is correct |
10 |
Correct |
23 ms |
7772 KB |
Output is correct |
11 |
Correct |
27 ms |
7772 KB |
Output is correct |
12 |
Correct |
33 ms |
8316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
41 ms |
8272 KB |
Output is correct |
2 |
Correct |
28 ms |
8284 KB |
Output is correct |
3 |
Correct |
24 ms |
8544 KB |
Output is correct |
4 |
Correct |
38 ms |
8308 KB |
Output is correct |
5 |
Correct |
53 ms |
8116 KB |
Output is correct |
6 |
Correct |
22 ms |
7824 KB |
Output is correct |
7 |
Correct |
26 ms |
7524 KB |
Output is correct |
8 |
Correct |
14 ms |
7004 KB |
Output is correct |
9 |
Correct |
20 ms |
6992 KB |
Output is correct |
10 |
Correct |
23 ms |
7772 KB |
Output is correct |
11 |
Correct |
27 ms |
7772 KB |
Output is correct |
12 |
Correct |
33 ms |
8316 KB |
Output is correct |
13 |
Correct |
134 ms |
8084 KB |
Output is correct |
14 |
Correct |
113 ms |
8276 KB |
Output is correct |
15 |
Correct |
500 ms |
8024 KB |
Output is correct |
16 |
Correct |
209 ms |
8284 KB |
Output is correct |
17 |
Correct |
223 ms |
8020 KB |
Output is correct |
18 |
Correct |
652 ms |
8276 KB |
Output is correct |
19 |
Correct |
858 ms |
7976 KB |
Output is correct |
20 |
Correct |
188 ms |
8528 KB |
Output is correct |
21 |
Correct |
16 ms |
6916 KB |
Output is correct |
22 |
Correct |
130 ms |
7060 KB |
Output is correct |
23 |
Correct |
216 ms |
7060 KB |
Output is correct |
24 |
Correct |
37 ms |
7748 KB |
Output is correct |
25 |
Correct |
186 ms |
8204 KB |
Output is correct |
26 |
Correct |
360 ms |
8228 KB |
Output is correct |
27 |
Correct |
24 ms |
7256 KB |
Output is correct |
28 |
Correct |
163 ms |
7172 KB |
Output is correct |
29 |
Correct |
286 ms |
7104 KB |
Output is correct |
30 |
Correct |
35 ms |
8324 KB |
Output is correct |
31 |
Correct |
281 ms |
8276 KB |
Output is correct |
32 |
Correct |
492 ms |
8296 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
5724 KB |
Output is correct |
2 |
Correct |
5 ms |
5724 KB |
Output is correct |
3 |
Correct |
9 ms |
12064 KB |
Output is correct |
4 |
Correct |
11 ms |
5900 KB |
Output is correct |
5 |
Correct |
4 ms |
5720 KB |
Output is correct |
6 |
Correct |
6 ms |
5720 KB |
Output is correct |
7 |
Correct |
6 ms |
10072 KB |
Output is correct |
8 |
Correct |
7 ms |
12376 KB |
Output is correct |
9 |
Correct |
3 ms |
5724 KB |
Output is correct |
10 |
Correct |
3 ms |
5724 KB |
Output is correct |
11 |
Correct |
3 ms |
5980 KB |
Output is correct |
12 |
Correct |
4 ms |
5724 KB |
Output is correct |
13 |
Correct |
4 ms |
5724 KB |
Output is correct |
14 |
Correct |
2 ms |
5720 KB |
Output is correct |
15 |
Correct |
16 ms |
5724 KB |
Output is correct |
16 |
Correct |
20 ms |
5976 KB |
Output is correct |
17 |
Correct |
38 ms |
5872 KB |
Output is correct |
18 |
Correct |
4 ms |
5720 KB |
Output is correct |
19 |
Correct |
3 ms |
5724 KB |
Output is correct |
20 |
Correct |
13 ms |
6100 KB |
Output is correct |
21 |
Correct |
5 ms |
11868 KB |
Output is correct |
22 |
Correct |
34 ms |
7252 KB |
Output is correct |
23 |
Correct |
558 ms |
59624 KB |
Output is correct |
24 |
Correct |
21 ms |
7144 KB |
Output is correct |
25 |
Correct |
420 ms |
7108 KB |
Output is correct |
26 |
Correct |
356 ms |
58588 KB |
Output is correct |
27 |
Correct |
92 ms |
59224 KB |
Output is correct |
28 |
Correct |
296 ms |
58616 KB |
Output is correct |
29 |
Correct |
73 ms |
58780 KB |
Output is correct |
30 |
Correct |
37 ms |
7252 KB |
Output is correct |
31 |
Correct |
93 ms |
59240 KB |
Output is correct |
32 |
Correct |
798 ms |
6784 KB |
Output is correct |
33 |
Correct |
96 ms |
42320 KB |
Output is correct |
34 |
Correct |
326 ms |
7068 KB |
Output is correct |
35 |
Correct |
478 ms |
7072 KB |
Output is correct |
36 |
Correct |
664 ms |
7072 KB |
Output is correct |
37 |
Correct |
358 ms |
58900 KB |
Output is correct |
38 |
Correct |
210 ms |
58704 KB |
Output is correct |
39 |
Correct |
457 ms |
7248 KB |
Output is correct |
40 |
Correct |
596 ms |
7072 KB |
Output is correct |
41 |
Correct |
878 ms |
7108 KB |
Output is correct |
42 |
Correct |
225 ms |
58708 KB |
Output is correct |
43 |
Correct |
173 ms |
58608 KB |
Output is correct |
44 |
Correct |
135 ms |
58712 KB |
Output is correct |
45 |
Correct |
134 ms |
58592 KB |
Output is correct |
46 |
Correct |
100 ms |
58584 KB |
Output is correct |
47 |
Correct |
103 ms |
58580 KB |
Output is correct |
48 |
Correct |
76 ms |
58596 KB |
Output is correct |
49 |
Correct |
68 ms |
58704 KB |
Output is correct |
50 |
Correct |
58 ms |
58864 KB |
Output is correct |
51 |
Correct |
18 ms |
7248 KB |
Output is correct |
52 |
Correct |
31 ms |
7120 KB |
Output is correct |
53 |
Correct |
233 ms |
7108 KB |
Output is correct |
54 |
Correct |
52 ms |
59220 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
11868 KB |
Output is correct |
2 |
Correct |
44 ms |
58820 KB |
Output is correct |
3 |
Correct |
71 ms |
93016 KB |
Output is correct |
4 |
Correct |
300 ms |
8172 KB |
Output is correct |
5 |
Correct |
7 ms |
12124 KB |
Output is correct |
6 |
Correct |
85 ms |
59100 KB |
Output is correct |
7 |
Correct |
721 ms |
8300 KB |
Output is correct |
8 |
Correct |
32 ms |
8220 KB |
Output is correct |
9 |
Correct |
154 ms |
93144 KB |
Output is correct |
10 |
Correct |
81 ms |
8100 KB |
Output is correct |
11 |
Correct |
127 ms |
7640 KB |
Output is correct |
12 |
Correct |
35 ms |
8020 KB |
Output is correct |
13 |
Correct |
8 ms |
11868 KB |
Output is correct |
14 |
Correct |
80 ms |
59136 KB |
Output is correct |
15 |
Correct |
1548 ms |
93052 KB |
Output is correct |
16 |
Correct |
249 ms |
92592 KB |
Output is correct |
17 |
Correct |
92 ms |
93008 KB |
Output is correct |
18 |
Correct |
82 ms |
8192 KB |
Output is correct |
19 |
Correct |
221 ms |
8016 KB |
Output is correct |
20 |
Correct |
97 ms |
92876 KB |
Output is correct |
21 |
Correct |
41 ms |
25984 KB |
Output is correct |
22 |
Correct |
17 ms |
7260 KB |
Output is correct |
23 |
Correct |
3 ms |
5724 KB |
Output is correct |
24 |
Correct |
5 ms |
5724 KB |
Output is correct |
25 |
Correct |
9 ms |
12064 KB |
Output is correct |
26 |
Correct |
11 ms |
5900 KB |
Output is correct |
27 |
Correct |
4 ms |
5720 KB |
Output is correct |
28 |
Correct |
6 ms |
5720 KB |
Output is correct |
29 |
Correct |
6 ms |
10072 KB |
Output is correct |
30 |
Correct |
7 ms |
12376 KB |
Output is correct |
31 |
Correct |
3 ms |
5724 KB |
Output is correct |
32 |
Correct |
3 ms |
5724 KB |
Output is correct |
33 |
Correct |
3 ms |
5980 KB |
Output is correct |
34 |
Correct |
4 ms |
5724 KB |
Output is correct |
35 |
Correct |
4 ms |
5724 KB |
Output is correct |
36 |
Correct |
2 ms |
5720 KB |
Output is correct |
37 |
Correct |
16 ms |
5724 KB |
Output is correct |
38 |
Correct |
20 ms |
5976 KB |
Output is correct |
39 |
Correct |
38 ms |
5872 KB |
Output is correct |
40 |
Correct |
4 ms |
5720 KB |
Output is correct |
41 |
Correct |
3 ms |
5724 KB |
Output is correct |
42 |
Correct |
13 ms |
6100 KB |
Output is correct |
43 |
Correct |
5 ms |
11868 KB |
Output is correct |
44 |
Correct |
41 ms |
8272 KB |
Output is correct |
45 |
Correct |
28 ms |
8284 KB |
Output is correct |
46 |
Correct |
24 ms |
8544 KB |
Output is correct |
47 |
Correct |
38 ms |
8308 KB |
Output is correct |
48 |
Correct |
53 ms |
8116 KB |
Output is correct |
49 |
Correct |
22 ms |
7824 KB |
Output is correct |
50 |
Correct |
26 ms |
7524 KB |
Output is correct |
51 |
Correct |
14 ms |
7004 KB |
Output is correct |
52 |
Correct |
20 ms |
6992 KB |
Output is correct |
53 |
Correct |
23 ms |
7772 KB |
Output is correct |
54 |
Correct |
27 ms |
7772 KB |
Output is correct |
55 |
Correct |
33 ms |
8316 KB |
Output is correct |
56 |
Correct |
134 ms |
8084 KB |
Output is correct |
57 |
Correct |
113 ms |
8276 KB |
Output is correct |
58 |
Correct |
500 ms |
8024 KB |
Output is correct |
59 |
Correct |
209 ms |
8284 KB |
Output is correct |
60 |
Correct |
223 ms |
8020 KB |
Output is correct |
61 |
Correct |
652 ms |
8276 KB |
Output is correct |
62 |
Correct |
858 ms |
7976 KB |
Output is correct |
63 |
Correct |
188 ms |
8528 KB |
Output is correct |
64 |
Correct |
16 ms |
6916 KB |
Output is correct |
65 |
Correct |
130 ms |
7060 KB |
Output is correct |
66 |
Correct |
216 ms |
7060 KB |
Output is correct |
67 |
Correct |
37 ms |
7748 KB |
Output is correct |
68 |
Correct |
186 ms |
8204 KB |
Output is correct |
69 |
Correct |
360 ms |
8228 KB |
Output is correct |
70 |
Correct |
24 ms |
7256 KB |
Output is correct |
71 |
Correct |
163 ms |
7172 KB |
Output is correct |
72 |
Correct |
286 ms |
7104 KB |
Output is correct |
73 |
Correct |
35 ms |
8324 KB |
Output is correct |
74 |
Correct |
281 ms |
8276 KB |
Output is correct |
75 |
Correct |
492 ms |
8296 KB |
Output is correct |
76 |
Correct |
34 ms |
7252 KB |
Output is correct |
77 |
Correct |
558 ms |
59624 KB |
Output is correct |
78 |
Correct |
21 ms |
7144 KB |
Output is correct |
79 |
Correct |
420 ms |
7108 KB |
Output is correct |
80 |
Correct |
356 ms |
58588 KB |
Output is correct |
81 |
Correct |
92 ms |
59224 KB |
Output is correct |
82 |
Correct |
296 ms |
58616 KB |
Output is correct |
83 |
Correct |
73 ms |
58780 KB |
Output is correct |
84 |
Correct |
37 ms |
7252 KB |
Output is correct |
85 |
Correct |
93 ms |
59240 KB |
Output is correct |
86 |
Correct |
798 ms |
6784 KB |
Output is correct |
87 |
Correct |
96 ms |
42320 KB |
Output is correct |
88 |
Correct |
326 ms |
7068 KB |
Output is correct |
89 |
Correct |
478 ms |
7072 KB |
Output is correct |
90 |
Correct |
664 ms |
7072 KB |
Output is correct |
91 |
Correct |
358 ms |
58900 KB |
Output is correct |
92 |
Correct |
210 ms |
58704 KB |
Output is correct |
93 |
Correct |
457 ms |
7248 KB |
Output is correct |
94 |
Correct |
596 ms |
7072 KB |
Output is correct |
95 |
Correct |
878 ms |
7108 KB |
Output is correct |
96 |
Correct |
225 ms |
58708 KB |
Output is correct |
97 |
Correct |
173 ms |
58608 KB |
Output is correct |
98 |
Correct |
135 ms |
58712 KB |
Output is correct |
99 |
Correct |
134 ms |
58592 KB |
Output is correct |
100 |
Correct |
100 ms |
58584 KB |
Output is correct |
101 |
Correct |
103 ms |
58580 KB |
Output is correct |
102 |
Correct |
76 ms |
58596 KB |
Output is correct |
103 |
Correct |
68 ms |
58704 KB |
Output is correct |
104 |
Correct |
58 ms |
58864 KB |
Output is correct |
105 |
Correct |
18 ms |
7248 KB |
Output is correct |
106 |
Correct |
31 ms |
7120 KB |
Output is correct |
107 |
Correct |
233 ms |
7108 KB |
Output is correct |
108 |
Correct |
52 ms |
59220 KB |
Output is correct |
109 |
Correct |
593 ms |
93100 KB |
Output is correct |
110 |
Correct |
2464 ms |
93900 KB |
Output is correct |
111 |
Correct |
1905 ms |
8068 KB |
Output is correct |
112 |
Correct |
475 ms |
8292 KB |
Output is correct |
113 |
Correct |
1103 ms |
92600 KB |
Output is correct |
114 |
Correct |
2361 ms |
8108 KB |
Output is correct |
115 |
Correct |
2487 ms |
8108 KB |
Output is correct |
116 |
Correct |
728 ms |
8320 KB |
Output is correct |
117 |
Correct |
1721 ms |
79340 KB |
Output is correct |
118 |
Correct |
98 ms |
26188 KB |
Output is correct |
119 |
Correct |
96 ms |
26468 KB |
Output is correct |
120 |
Correct |
408 ms |
75096 KB |
Output is correct |
121 |
Correct |
110 ms |
93212 KB |
Output is correct |
122 |
Correct |
703 ms |
8244 KB |
Output is correct |
123 |
Correct |
1176 ms |
93248 KB |
Output is correct |
124 |
Correct |
948 ms |
93192 KB |
Output is correct |
125 |
Correct |
625 ms |
92880 KB |
Output is correct |
126 |
Correct |
831 ms |
8304 KB |
Output is correct |
127 |
Correct |
1108 ms |
8304 KB |
Output is correct |
128 |
Correct |
1460 ms |
8300 KB |
Output is correct |
129 |
Correct |
643 ms |
92496 KB |
Output is correct |
130 |
Correct |
459 ms |
92600 KB |
Output is correct |
131 |
Correct |
367 ms |
92604 KB |
Output is correct |
132 |
Correct |
354 ms |
92616 KB |
Output is correct |
133 |
Correct |
323 ms |
92608 KB |
Output is correct |
134 |
Correct |
242 ms |
92596 KB |
Output is correct |
135 |
Correct |
250 ms |
92532 KB |
Output is correct |
136 |
Correct |
145 ms |
92628 KB |
Output is correct |
137 |
Correct |
149 ms |
92632 KB |
Output is correct |
138 |
Correct |
119 ms |
92672 KB |
Output is correct |
139 |
Correct |
105 ms |
92784 KB |
Output is correct |
140 |
Correct |
26 ms |
8280 KB |
Output is correct |
141 |
Correct |
58 ms |
8308 KB |
Output is correct |
142 |
Correct |
357 ms |
92500 KB |
Output is correct |
143 |
Correct |
105 ms |
93452 KB |
Output is correct |