답안 #986000

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
986000 2024-05-19T14:56:21 Z VinhLuu Maze (JOI23_ho_t3) C++17
8 / 100
414 ms 323608 KB
//#pragma GCC optimize("O3,unroll-loops")
//#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#include <bits/stdc++.h>
//#define int long long
//#define ll long long
#define fi first
#define se second
#define pb push_back
#define all(lmao) lmao.begin(), lmao.end()

using namespace std;

typedef pair<int,int> pii;
typedef tuple<int,int,int> tp;
const int N = 3e6 + 5;
const int oo = 1e9 + 1;
const int mod = 1e9 + 7;
int block = 316;
//const ll oo = 5e18;

const int ha[4] = {1, -1, 0, 0};
const int co[4] = {0, 0, 1, -1};
const int tx[4] = {1, 1, -1, -1};
const int ty[4] = {1, -1, -1, 1};

int m, n, k, xt, yt, xs, ys;

vector<int> f[N], a[N], ph[N], pc[N];

bool kt(int x,int y){
    return x >= 1 && x <= m && y >= 1 && y <= n;
}

int row(int u,int v){
//    cerr << u << " " << v << " t\n";
    return (ph[u][v] == v ? v : ph[u][v] = row(u, ph[u][v]));
}

int col(int u,int v){
//    cerr << u << " " << v << " " << pc[u][v] << " w\n";
//    if(pc[u][v] == u) return u;
    return (pc[u][v] == u ? u : pc[u][v] = col(pc[u][v], v));
}

signed main(){
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    #define task "v"
    if(fopen(task ".inp","r")){
        freopen(task ".inp","r",stdin);
        freopen(task ".out","w",stdout);
    }

    cin >> m >> n >> k;
    cin >> xs >> ys >> xt >> yt;
    for(int i = 1; i <= m; i ++){
        string s; cin >> s;
        f[i].pb(oo);
        a[i].pb(0);
        ph[i].pb(0);
        pc[i].pb(0);
        for(int j = 0; j < n; j ++){
            f[i].pb(oo);
            pc[i].pb(0);
            ph[i].pb(j + 1);
            if(s[j] == '.') a[i].pb(0);
            else a[i].pb(1);
        }
        f[i].pb(oo);
        a[i].pb(0);
        ph[i].pb(0);
        pc[i].pb(0);
    }
    for(int i = 1; i <= n + 1; i ++) pc[0].pb(0);
    for(int i = 1; i <= n; i ++){
        for(int j = 1; j <= m; j ++){
            pc[j][i] = j;
        }
    }
    priority_queue<tp, vector<tp>, greater<tp>> q;
    f[xs][ys] = 0;
    q.push({0, xs, ys});
    int ans = oo;
    while(!q.empty()){
        int val, x, y; tie(val, x, y)  = q.top();
//        int x = q.front().fi;
//        int y = q.front().se;
//        cerr << x << " " << y << " y\n";
        q.pop();
        if(val > f[x][y]) continue;
        if(x == xt && y == yt) ans = min(ans, f[x][y]);

        for(int d = 0; d < 4; d ++){
            int u = x + ha[d];
            int v = y + co[d];
//            cerr << u << " " << v << " t\n";
            if(!kt(u, v) || f[u][v] <= f[x][y] + a[u][v]) continue;
            f[u][v] = f[x][y] + a[u][v];

            q.push({f[u][v], u, v});
            if(ph[u][v]){
                ph[u][v]--;
                ph[u][v] = row(u, ph[u][v]);
            }
            if(pc[u][v]){
                pc[u][v]--;
                pc[u][v] = col(pc[u][v], v);
            }
        }
        int l = max(1, x - k + 1), r = min(m, x + k - 1), a = max(1, y - k + 1), b = min(n, y + k - 1);
        if(xt >= l && xt <= r && yt >= a && yt <= b) ans = min(ans, f[x][y] + 1);
//        for(int d = 0; d < 4; d ++){
//            int u = x + d * (k - 1); u = max(u, 1), u = min(u, m);
//            int v = y + d * (k - 1); v = max(v, 1), v = min(v, n);
//            if(f[u][v] > f[x][y] + 1){
//                q.push({u, v});
//                f[u][v] = f[x][y] + 1;
//                ph[u][v] = le[u][v];
//                ph[u][v] = row(u, ph[u][v]);
//                pc[u][v] = up[u][v];
//                pc[u][v] = col(pc[u][v], v);
//            }
//        }
//        cerr << " done\n";
        if(l - 1 >= 1){
            int lx = l - 1, pos = b;
            while(ph[lx][pos] >= a){
                int g = ph[lx][pos];
                if(f[lx][g] > f[x][y] + 1) f[lx][g] = f[x][y] + 1, q.push({f[lx][g], lx, g});
                if(!ph[lx][pos]) break;
                ph[lx][pos]--;
                ph[lx][pos] = row(lx, ph[lx][pos]);
            }
        }
        if(r + 1 <= m){
            int lx = r + 1, pos = b;
            while(ph[lx][pos] >= a){
                int g = ph[lx][pos];
                if(f[lx][g] > f[x][y] + 1) f[lx][g] = f[x][y] + 1, q.push({f[lx][g], lx, g});
                if(!ph[lx][pos]) break;
                ph[lx][pos]--;
                ph[lx][pos] = row(lx, ph[lx][pos]);
            }
        }
        if(a - 1 >= 1){
            int pos = r, ly = a - 1;
            while(pc[pos][ly] >= l){
                int g = pc[pos][ly];
                if(f[g][ly] > f[x][y] + 1) f[g][ly] = f[x][y] + 1, q.push({f[g][ly], g, ly});
                if(!pc[g][ly]) break;
                pc[g][ly]--;
                pc[g][ly] = col(pc[g][ly], ly);
            }
        }

        if(b + 1 <= n){
            int pos = r, ly = b + 1;
            while(pc[pos][ly] >= l){
                int g = pc[pos][ly];
                if(f[g][ly] > f[x][y] + 1) f[g][ly] = f[x][y] + 1, q.push({f[g][ly], g, ly});
                if(!pc[g][ly]) break;
                pc[g][ly]--;
                pc[g][ly] = col(pc[g][ly], ly);
            }
        }
    }
    cout << min(ans, f[xt][yt]);
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:50:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   50 |         freopen(task ".inp","r",stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:51:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   51 |         freopen(task ".out","w",stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 153 ms 282356 KB Output is correct
2 Correct 66 ms 282144 KB Output is correct
3 Correct 66 ms 282104 KB Output is correct
4 Correct 67 ms 282192 KB Output is correct
5 Correct 67 ms 282060 KB Output is correct
6 Correct 68 ms 282272 KB Output is correct
7 Correct 66 ms 282112 KB Output is correct
8 Correct 67 ms 282256 KB Output is correct
9 Correct 66 ms 282196 KB Output is correct
10 Correct 65 ms 282196 KB Output is correct
11 Correct 72 ms 282192 KB Output is correct
12 Correct 68 ms 282152 KB Output is correct
13 Correct 67 ms 282248 KB Output is correct
14 Correct 67 ms 282192 KB Output is correct
15 Correct 67 ms 282192 KB Output is correct
16 Correct 66 ms 282272 KB Output is correct
17 Correct 66 ms 282276 KB Output is correct
18 Correct 66 ms 282192 KB Output is correct
19 Correct 75 ms 283220 KB Output is correct
20 Correct 69 ms 283416 KB Output is correct
21 Correct 74 ms 283132 KB Output is correct
22 Correct 77 ms 283336 KB Output is correct
23 Correct 73 ms 283220 KB Output is correct
24 Correct 68 ms 283544 KB Output is correct
25 Correct 72 ms 283544 KB Output is correct
26 Correct 80 ms 283268 KB Output is correct
27 Correct 79 ms 283376 KB Output is correct
28 Correct 74 ms 283160 KB Output is correct
29 Correct 88 ms 285520 KB Output is correct
30 Correct 71 ms 283472 KB Output is correct
31 Correct 88 ms 285520 KB Output is correct
32 Correct 100 ms 285440 KB Output is correct
33 Correct 89 ms 285524 KB Output is correct
34 Correct 76 ms 286112 KB Output is correct
35 Correct 74 ms 286116 KB Output is correct
36 Correct 98 ms 285712 KB Output is correct
37 Correct 98 ms 285728 KB Output is correct
38 Correct 89 ms 285520 KB Output is correct
39 Correct 357 ms 322936 KB Output is correct
40 Correct 93 ms 285520 KB Output is correct
41 Correct 80 ms 286844 KB Output is correct
42 Correct 105 ms 288300 KB Output is correct
43 Correct 85 ms 287320 KB Output is correct
44 Correct 187 ms 296232 KB Output is correct
45 Correct 154 ms 299032 KB Output is correct
46 Correct 306 ms 323352 KB Output is correct
47 Correct 383 ms 323264 KB Output is correct
48 Correct 360 ms 322896 KB Output is correct
49 Correct 150 ms 319452 KB Output is correct
50 Correct 155 ms 319376 KB Output is correct
51 Correct 414 ms 323608 KB Output is correct
52 Correct 403 ms 323348 KB Output is correct
53 Correct 356 ms 323264 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 67 ms 282156 KB Output is correct
2 Correct 69 ms 282192 KB Output is correct
3 Correct 67 ms 282196 KB Output is correct
4 Correct 65 ms 282232 KB Output is correct
5 Correct 70 ms 282196 KB Output is correct
6 Correct 66 ms 282204 KB Output is correct
7 Correct 66 ms 282200 KB Output is correct
8 Correct 68 ms 282196 KB Output is correct
9 Correct 66 ms 282124 KB Output is correct
10 Correct 66 ms 282200 KB Output is correct
11 Correct 67 ms 282196 KB Output is correct
12 Correct 67 ms 282192 KB Output is correct
13 Correct 67 ms 282056 KB Output is correct
14 Correct 65 ms 282196 KB Output is correct
15 Correct 66 ms 282204 KB Output is correct
16 Correct 65 ms 282192 KB Output is correct
17 Correct 68 ms 282264 KB Output is correct
18 Correct 66 ms 282020 KB Output is correct
19 Correct 66 ms 282196 KB Output is correct
20 Incorrect 66 ms 282104 KB Output isn't correct
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 67 ms 282192 KB Output is correct
2 Correct 67 ms 282192 KB Output is correct
3 Correct 66 ms 282196 KB Output is correct
4 Correct 67 ms 282192 KB Output is correct
5 Correct 65 ms 282032 KB Output is correct
6 Correct 66 ms 282200 KB Output is correct
7 Correct 68 ms 282308 KB Output is correct
8 Correct 66 ms 282196 KB Output is correct
9 Correct 66 ms 282204 KB Output is correct
10 Correct 66 ms 282196 KB Output is correct
11 Correct 66 ms 282044 KB Output is correct
12 Correct 70 ms 282416 KB Output is correct
13 Correct 67 ms 282192 KB Output is correct
14 Correct 69 ms 282272 KB Output is correct
15 Correct 67 ms 282192 KB Output is correct
16 Correct 70 ms 282240 KB Output is correct
17 Correct 69 ms 282448 KB Output is correct
18 Correct 66 ms 282236 KB Output is correct
19 Correct 67 ms 282196 KB Output is correct
20 Correct 67 ms 282196 KB Output is correct
21 Correct 67 ms 282256 KB Output is correct
22 Correct 69 ms 282108 KB Output is correct
23 Correct 66 ms 282192 KB Output is correct
24 Correct 67 ms 282140 KB Output is correct
25 Incorrect 76 ms 283208 KB Output isn't correct
26 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 67 ms 282156 KB Output is correct
2 Correct 69 ms 282192 KB Output is correct
3 Correct 67 ms 282196 KB Output is correct
4 Correct 65 ms 282232 KB Output is correct
5 Correct 70 ms 282196 KB Output is correct
6 Correct 66 ms 282204 KB Output is correct
7 Correct 66 ms 282200 KB Output is correct
8 Correct 68 ms 282196 KB Output is correct
9 Correct 66 ms 282124 KB Output is correct
10 Correct 66 ms 282200 KB Output is correct
11 Correct 67 ms 282196 KB Output is correct
12 Correct 67 ms 282192 KB Output is correct
13 Correct 67 ms 282056 KB Output is correct
14 Correct 65 ms 282196 KB Output is correct
15 Correct 66 ms 282204 KB Output is correct
16 Correct 65 ms 282192 KB Output is correct
17 Correct 68 ms 282264 KB Output is correct
18 Correct 66 ms 282020 KB Output is correct
19 Correct 66 ms 282196 KB Output is correct
20 Incorrect 66 ms 282104 KB Output isn't correct
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 67 ms 282156 KB Output is correct
2 Correct 69 ms 282192 KB Output is correct
3 Correct 67 ms 282196 KB Output is correct
4 Correct 65 ms 282232 KB Output is correct
5 Correct 70 ms 282196 KB Output is correct
6 Correct 66 ms 282204 KB Output is correct
7 Correct 66 ms 282200 KB Output is correct
8 Correct 68 ms 282196 KB Output is correct
9 Correct 66 ms 282124 KB Output is correct
10 Correct 66 ms 282200 KB Output is correct
11 Correct 67 ms 282196 KB Output is correct
12 Correct 67 ms 282192 KB Output is correct
13 Correct 67 ms 282056 KB Output is correct
14 Correct 65 ms 282196 KB Output is correct
15 Correct 66 ms 282204 KB Output is correct
16 Correct 65 ms 282192 KB Output is correct
17 Correct 68 ms 282264 KB Output is correct
18 Correct 66 ms 282020 KB Output is correct
19 Correct 66 ms 282196 KB Output is correct
20 Incorrect 66 ms 282104 KB Output isn't correct
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 153 ms 282356 KB Output is correct
2 Correct 66 ms 282144 KB Output is correct
3 Correct 66 ms 282104 KB Output is correct
4 Correct 67 ms 282192 KB Output is correct
5 Correct 67 ms 282060 KB Output is correct
6 Correct 68 ms 282272 KB Output is correct
7 Correct 66 ms 282112 KB Output is correct
8 Correct 67 ms 282256 KB Output is correct
9 Correct 66 ms 282196 KB Output is correct
10 Correct 65 ms 282196 KB Output is correct
11 Correct 72 ms 282192 KB Output is correct
12 Correct 68 ms 282152 KB Output is correct
13 Correct 67 ms 282248 KB Output is correct
14 Correct 67 ms 282192 KB Output is correct
15 Correct 67 ms 282192 KB Output is correct
16 Correct 66 ms 282272 KB Output is correct
17 Correct 66 ms 282276 KB Output is correct
18 Correct 66 ms 282192 KB Output is correct
19 Correct 75 ms 283220 KB Output is correct
20 Correct 69 ms 283416 KB Output is correct
21 Correct 74 ms 283132 KB Output is correct
22 Correct 77 ms 283336 KB Output is correct
23 Correct 73 ms 283220 KB Output is correct
24 Correct 68 ms 283544 KB Output is correct
25 Correct 72 ms 283544 KB Output is correct
26 Correct 80 ms 283268 KB Output is correct
27 Correct 79 ms 283376 KB Output is correct
28 Correct 74 ms 283160 KB Output is correct
29 Correct 88 ms 285520 KB Output is correct
30 Correct 71 ms 283472 KB Output is correct
31 Correct 88 ms 285520 KB Output is correct
32 Correct 100 ms 285440 KB Output is correct
33 Correct 89 ms 285524 KB Output is correct
34 Correct 76 ms 286112 KB Output is correct
35 Correct 74 ms 286116 KB Output is correct
36 Correct 98 ms 285712 KB Output is correct
37 Correct 98 ms 285728 KB Output is correct
38 Correct 89 ms 285520 KB Output is correct
39 Correct 357 ms 322936 KB Output is correct
40 Correct 93 ms 285520 KB Output is correct
41 Correct 80 ms 286844 KB Output is correct
42 Correct 105 ms 288300 KB Output is correct
43 Correct 85 ms 287320 KB Output is correct
44 Correct 187 ms 296232 KB Output is correct
45 Correct 154 ms 299032 KB Output is correct
46 Correct 306 ms 323352 KB Output is correct
47 Correct 383 ms 323264 KB Output is correct
48 Correct 360 ms 322896 KB Output is correct
49 Correct 150 ms 319452 KB Output is correct
50 Correct 155 ms 319376 KB Output is correct
51 Correct 414 ms 323608 KB Output is correct
52 Correct 403 ms 323348 KB Output is correct
53 Correct 356 ms 323264 KB Output is correct
54 Correct 67 ms 282156 KB Output is correct
55 Correct 69 ms 282192 KB Output is correct
56 Correct 67 ms 282196 KB Output is correct
57 Correct 65 ms 282232 KB Output is correct
58 Correct 70 ms 282196 KB Output is correct
59 Correct 66 ms 282204 KB Output is correct
60 Correct 66 ms 282200 KB Output is correct
61 Correct 68 ms 282196 KB Output is correct
62 Correct 66 ms 282124 KB Output is correct
63 Correct 66 ms 282200 KB Output is correct
64 Correct 67 ms 282196 KB Output is correct
65 Correct 67 ms 282192 KB Output is correct
66 Correct 67 ms 282056 KB Output is correct
67 Correct 65 ms 282196 KB Output is correct
68 Correct 66 ms 282204 KB Output is correct
69 Correct 65 ms 282192 KB Output is correct
70 Correct 68 ms 282264 KB Output is correct
71 Correct 66 ms 282020 KB Output is correct
72 Correct 66 ms 282196 KB Output is correct
73 Incorrect 66 ms 282104 KB Output isn't correct
74 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 153 ms 282356 KB Output is correct
2 Correct 66 ms 282144 KB Output is correct
3 Correct 66 ms 282104 KB Output is correct
4 Correct 67 ms 282192 KB Output is correct
5 Correct 67 ms 282060 KB Output is correct
6 Correct 68 ms 282272 KB Output is correct
7 Correct 66 ms 282112 KB Output is correct
8 Correct 67 ms 282256 KB Output is correct
9 Correct 66 ms 282196 KB Output is correct
10 Correct 65 ms 282196 KB Output is correct
11 Correct 72 ms 282192 KB Output is correct
12 Correct 68 ms 282152 KB Output is correct
13 Correct 67 ms 282248 KB Output is correct
14 Correct 67 ms 282192 KB Output is correct
15 Correct 67 ms 282192 KB Output is correct
16 Correct 66 ms 282272 KB Output is correct
17 Correct 66 ms 282276 KB Output is correct
18 Correct 66 ms 282192 KB Output is correct
19 Correct 75 ms 283220 KB Output is correct
20 Correct 69 ms 283416 KB Output is correct
21 Correct 74 ms 283132 KB Output is correct
22 Correct 77 ms 283336 KB Output is correct
23 Correct 73 ms 283220 KB Output is correct
24 Correct 68 ms 283544 KB Output is correct
25 Correct 72 ms 283544 KB Output is correct
26 Correct 80 ms 283268 KB Output is correct
27 Correct 79 ms 283376 KB Output is correct
28 Correct 74 ms 283160 KB Output is correct
29 Correct 88 ms 285520 KB Output is correct
30 Correct 71 ms 283472 KB Output is correct
31 Correct 88 ms 285520 KB Output is correct
32 Correct 100 ms 285440 KB Output is correct
33 Correct 89 ms 285524 KB Output is correct
34 Correct 76 ms 286112 KB Output is correct
35 Correct 74 ms 286116 KB Output is correct
36 Correct 98 ms 285712 KB Output is correct
37 Correct 98 ms 285728 KB Output is correct
38 Correct 89 ms 285520 KB Output is correct
39 Correct 357 ms 322936 KB Output is correct
40 Correct 93 ms 285520 KB Output is correct
41 Correct 80 ms 286844 KB Output is correct
42 Correct 105 ms 288300 KB Output is correct
43 Correct 85 ms 287320 KB Output is correct
44 Correct 187 ms 296232 KB Output is correct
45 Correct 154 ms 299032 KB Output is correct
46 Correct 306 ms 323352 KB Output is correct
47 Correct 383 ms 323264 KB Output is correct
48 Correct 360 ms 322896 KB Output is correct
49 Correct 150 ms 319452 KB Output is correct
50 Correct 155 ms 319376 KB Output is correct
51 Correct 414 ms 323608 KB Output is correct
52 Correct 403 ms 323348 KB Output is correct
53 Correct 356 ms 323264 KB Output is correct
54 Correct 67 ms 282156 KB Output is correct
55 Correct 69 ms 282192 KB Output is correct
56 Correct 67 ms 282196 KB Output is correct
57 Correct 65 ms 282232 KB Output is correct
58 Correct 70 ms 282196 KB Output is correct
59 Correct 66 ms 282204 KB Output is correct
60 Correct 66 ms 282200 KB Output is correct
61 Correct 68 ms 282196 KB Output is correct
62 Correct 66 ms 282124 KB Output is correct
63 Correct 66 ms 282200 KB Output is correct
64 Correct 67 ms 282196 KB Output is correct
65 Correct 67 ms 282192 KB Output is correct
66 Correct 67 ms 282056 KB Output is correct
67 Correct 65 ms 282196 KB Output is correct
68 Correct 66 ms 282204 KB Output is correct
69 Correct 65 ms 282192 KB Output is correct
70 Correct 68 ms 282264 KB Output is correct
71 Correct 66 ms 282020 KB Output is correct
72 Correct 66 ms 282196 KB Output is correct
73 Incorrect 66 ms 282104 KB Output isn't correct
74 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 153 ms 282356 KB Output is correct
2 Correct 66 ms 282144 KB Output is correct
3 Correct 66 ms 282104 KB Output is correct
4 Correct 67 ms 282192 KB Output is correct
5 Correct 67 ms 282060 KB Output is correct
6 Correct 68 ms 282272 KB Output is correct
7 Correct 66 ms 282112 KB Output is correct
8 Correct 67 ms 282256 KB Output is correct
9 Correct 66 ms 282196 KB Output is correct
10 Correct 65 ms 282196 KB Output is correct
11 Correct 72 ms 282192 KB Output is correct
12 Correct 68 ms 282152 KB Output is correct
13 Correct 67 ms 282248 KB Output is correct
14 Correct 67 ms 282192 KB Output is correct
15 Correct 67 ms 282192 KB Output is correct
16 Correct 66 ms 282272 KB Output is correct
17 Correct 66 ms 282276 KB Output is correct
18 Correct 66 ms 282192 KB Output is correct
19 Correct 75 ms 283220 KB Output is correct
20 Correct 69 ms 283416 KB Output is correct
21 Correct 74 ms 283132 KB Output is correct
22 Correct 77 ms 283336 KB Output is correct
23 Correct 73 ms 283220 KB Output is correct
24 Correct 68 ms 283544 KB Output is correct
25 Correct 72 ms 283544 KB Output is correct
26 Correct 80 ms 283268 KB Output is correct
27 Correct 79 ms 283376 KB Output is correct
28 Correct 74 ms 283160 KB Output is correct
29 Correct 88 ms 285520 KB Output is correct
30 Correct 71 ms 283472 KB Output is correct
31 Correct 88 ms 285520 KB Output is correct
32 Correct 100 ms 285440 KB Output is correct
33 Correct 89 ms 285524 KB Output is correct
34 Correct 76 ms 286112 KB Output is correct
35 Correct 74 ms 286116 KB Output is correct
36 Correct 98 ms 285712 KB Output is correct
37 Correct 98 ms 285728 KB Output is correct
38 Correct 89 ms 285520 KB Output is correct
39 Correct 357 ms 322936 KB Output is correct
40 Correct 93 ms 285520 KB Output is correct
41 Correct 80 ms 286844 KB Output is correct
42 Correct 105 ms 288300 KB Output is correct
43 Correct 85 ms 287320 KB Output is correct
44 Correct 187 ms 296232 KB Output is correct
45 Correct 154 ms 299032 KB Output is correct
46 Correct 306 ms 323352 KB Output is correct
47 Correct 383 ms 323264 KB Output is correct
48 Correct 360 ms 322896 KB Output is correct
49 Correct 150 ms 319452 KB Output is correct
50 Correct 155 ms 319376 KB Output is correct
51 Correct 414 ms 323608 KB Output is correct
52 Correct 403 ms 323348 KB Output is correct
53 Correct 356 ms 323264 KB Output is correct
54 Correct 67 ms 282156 KB Output is correct
55 Correct 69 ms 282192 KB Output is correct
56 Correct 67 ms 282196 KB Output is correct
57 Correct 65 ms 282232 KB Output is correct
58 Correct 70 ms 282196 KB Output is correct
59 Correct 66 ms 282204 KB Output is correct
60 Correct 66 ms 282200 KB Output is correct
61 Correct 68 ms 282196 KB Output is correct
62 Correct 66 ms 282124 KB Output is correct
63 Correct 66 ms 282200 KB Output is correct
64 Correct 67 ms 282196 KB Output is correct
65 Correct 67 ms 282192 KB Output is correct
66 Correct 67 ms 282056 KB Output is correct
67 Correct 65 ms 282196 KB Output is correct
68 Correct 66 ms 282204 KB Output is correct
69 Correct 65 ms 282192 KB Output is correct
70 Correct 68 ms 282264 KB Output is correct
71 Correct 66 ms 282020 KB Output is correct
72 Correct 66 ms 282196 KB Output is correct
73 Incorrect 66 ms 282104 KB Output isn't correct
74 Halted 0 ms 0 KB -