Submission #1075531

# Submission time Handle Problem Language Result Execution time Memory
1075531 2024-08-26T07:26:23 Z ProtonDecay314 Toy (CEOI24_toy) C++17
44 / 100
1500 ms 213072 KB
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pi;
typedef vector<pi> vpi;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
typedef vector<bool> vb;
typedef set<ll> sll;
#define IOS cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false)
#define INF(dtype) numeric_limits<dtype>::max()
#define NINF(dtype) numeric_limits<dtype>::min()
#define fi first
#define se second
#define pb push_back

typedef vector<vb> vvb;
typedef vector<vvb> v3b;
typedef vector<v3b> v4b;
typedef vector<string> vs;

struct bfs_state {
    int x, y, dx, dy;
};

bfs_state to_bfs_state(int xh, int yh, int xv, int yv, int k, int l) {
    int x = xv, y = yh;
    int dx = xh + k - 1 - x; // ! TODO recheck
    int dy = yv + l - 1 - y;

    return {x, y, dx, dy};
}

bool is_valid_state(bfs_state s, int k, int l, int w, int h) {
    int ex = s.x + s.dx;
    int sx = ex - k + 1;

    int ey = s.y + s.dy;
    int sy = ey - l + 1;

    return !(s.dx >= k || s.dx < 0 || s.dy >= l || s.dy < 0 || sx < 0 || ex >= w || sy < 0 || ey >= h);
}

int pos_type(bfs_state s, int k, int l, int w, int h, const vs& g) {
    int ex = s.x + s.dx;
    int sx = ex - k + 1;

    int ey = s.y + s.dy;
    int sy = ey - l + 1;

    if(!is_valid_state(s, k, l, w, h)) {
        // Invalid bfs states
        return 0;
    }

    for(int x = sx ; x <= ex; x++) {
        if(g[s.y][x] == 'X') {
            return 0;
        }
    }

    for(int y = sy ; y <= ey; y++) {
        if(g[y][s.x] == 'X') {
            return 0;
        }
    }

    return (g[s.y][s.x] == '*' ? 2 : 1);
}

bool solve(int w, int h, int k, int l, bfs_state s, const vs& g) {
    v4b vis;
    for(int i1 = 0; i1 < w; i1++) {
        v3b visr1;
        for(int i2 = 0; i2 < h; i2++) {
            vvb visr2;
            for(int i3 = 0; i3 < k; i3++) {
                vb visr3(l, false);
                visr2.pb(visr3);
            }
            visr1.pb(visr2);
        }
        vis.pb(visr1);
    }

    queue<bfs_state> q;

    q.push(s);

    while(!q.empty()) {
        // cout << "Anya likes peanuts" << endl;
        bfs_state cs = q.front();

        q.pop();

        if(!is_valid_state(cs, k, l, w, h)) continue;
        // cout << cs.x << " " << cs.y << " " << cs.dx << " " << cs.dy << endl;
        if(vis[cs.x][cs.y][cs.dx][cs.dy]) continue;
        vis[cs.x][cs.y][cs.dx][cs.dy] = true;

        int cptype = pos_type(cs, k, l, w, h, g);
        // cout << "Segfault lmao" << endl;
        if(cptype == 0) continue;
        if(cptype == 2) return true;

        // Enqueue through all possible next states
        // Move horiz left
        q.push({cs.x, cs.y, cs.dx - 1, cs.dy});

        // Move horiz right
        q.push({cs.x, cs.y, cs.dx + 1, cs.dy});

        // Move horiz up
        q.push({cs.x, cs.y + 1, cs.dx, cs.dy - 1});
        
        // Move horiz down
        q.push({cs.x, cs.y - 1, cs.dx, cs.dy + 1});

        // Move vert left
        q.push({cs.x - 1, cs.y, cs.dx + 1, cs.dy});

        // Move vert right
        q.push({cs.x + 1, cs.y, cs.dx - 1, cs.dy});

        // Move vert up
        q.push({cs.x, cs.y, cs.dx, cs.dy + 1});
        
        // Move vert down
        q.push({cs.x, cs.y, cs.dx, cs.dy - 1});
    }

    return false;
}

int main() {
    int w, h, k, l;
    cin >> w >> h >> k >> l;

    int xh, yh, xv, yv;
    cin >> xh >> yh >> xv >> yv;

    vs g(h);

    for(string& gv : g) cin >> gv;

    cout << (solve(w, h, k, l, to_bfs_state(xh, yh, xv, yv, k, l), g) ? "YES" : "NO") << endl;

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 3 ms 1112 KB Output is correct
4 Correct 15 ms 4784 KB Output is correct
5 Correct 71 ms 9428 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 42 ms 5712 KB Output is correct
8 Correct 72 ms 9488 KB Output is correct
9 Correct 5 ms 1628 KB Output is correct
10 Correct 10 ms 3376 KB Output is correct
11 Correct 71 ms 9508 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 7 ms 2856 KB Output is correct
14 Correct 71 ms 9264 KB Output is correct
15 Correct 75 ms 5460 KB Output is correct
16 Correct 68 ms 5124 KB Output is correct
17 Correct 71 ms 5456 KB Output is correct
18 Correct 86 ms 5856 KB Output is correct
19 Correct 82 ms 5592 KB Output is correct
20 Correct 105 ms 5296 KB Output is correct
21 Correct 87 ms 5720 KB Output is correct
22 Correct 84 ms 5608 KB Output is correct
23 Correct 81 ms 5456 KB Output is correct
24 Correct 30 ms 2904 KB Output is correct
25 Correct 27 ms 2628 KB Output is correct
26 Correct 32 ms 2764 KB Output is correct
27 Correct 23 ms 2392 KB Output is correct
28 Correct 25 ms 2396 KB Output is correct
29 Correct 17 ms 2140 KB Output is correct
30 Correct 8 ms 1956 KB Output is correct
31 Correct 22 ms 2140 KB Output is correct
32 Correct 6 ms 1372 KB Output is correct
33 Correct 11 ms 1628 KB Output is correct
34 Correct 11 ms 2176 KB Output is correct
35 Correct 11 ms 1780 KB Output is correct
36 Correct 7 ms 1880 KB Output is correct
37 Correct 9 ms 2124 KB Output is correct
38 Correct 10 ms 2140 KB Output is correct
39 Correct 9 ms 2176 KB Output is correct
40 Correct 10 ms 1884 KB Output is correct
41 Correct 10 ms 2396 KB Output is correct
42 Correct 74 ms 9260 KB Output is correct
43 Correct 73 ms 9296 KB Output is correct
44 Correct 74 ms 9296 KB Output is correct
45 Correct 70 ms 9400 KB Output is correct
46 Correct 5 ms 2140 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 3 ms 1112 KB Output is correct
4 Correct 15 ms 4784 KB Output is correct
5 Correct 71 ms 9428 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 42 ms 5712 KB Output is correct
8 Correct 72 ms 9488 KB Output is correct
9 Correct 5 ms 1628 KB Output is correct
10 Correct 10 ms 3376 KB Output is correct
11 Correct 71 ms 9508 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 7 ms 2856 KB Output is correct
14 Correct 71 ms 9264 KB Output is correct
15 Correct 75 ms 5460 KB Output is correct
16 Correct 68 ms 5124 KB Output is correct
17 Correct 71 ms 5456 KB Output is correct
18 Correct 86 ms 5856 KB Output is correct
19 Correct 82 ms 5592 KB Output is correct
20 Correct 105 ms 5296 KB Output is correct
21 Correct 87 ms 5720 KB Output is correct
22 Correct 84 ms 5608 KB Output is correct
23 Correct 81 ms 5456 KB Output is correct
24 Correct 30 ms 2904 KB Output is correct
25 Correct 27 ms 2628 KB Output is correct
26 Correct 32 ms 2764 KB Output is correct
27 Correct 23 ms 2392 KB Output is correct
28 Correct 25 ms 2396 KB Output is correct
29 Correct 17 ms 2140 KB Output is correct
30 Correct 8 ms 1956 KB Output is correct
31 Correct 22 ms 2140 KB Output is correct
32 Correct 6 ms 1372 KB Output is correct
33 Correct 11 ms 1628 KB Output is correct
34 Correct 11 ms 2176 KB Output is correct
35 Correct 11 ms 1780 KB Output is correct
36 Correct 7 ms 1880 KB Output is correct
37 Correct 9 ms 2124 KB Output is correct
38 Correct 10 ms 2140 KB Output is correct
39 Correct 9 ms 2176 KB Output is correct
40 Correct 10 ms 1884 KB Output is correct
41 Correct 10 ms 2396 KB Output is correct
42 Correct 74 ms 9260 KB Output is correct
43 Correct 73 ms 9296 KB Output is correct
44 Correct 74 ms 9296 KB Output is correct
45 Correct 70 ms 9400 KB Output is correct
46 Correct 5 ms 2140 KB Output is correct
47 Correct 17 ms 2396 KB Output is correct
48 Correct 346 ms 44508 KB Output is correct
49 Correct 281 ms 52472 KB Output is correct
50 Correct 79 ms 28844 KB Output is correct
51 Correct 144 ms 20820 KB Output is correct
52 Correct 271 ms 52564 KB Output is correct
53 Correct 33 ms 5068 KB Output is correct
54 Correct 235 ms 34644 KB Output is correct
55 Correct 275 ms 52564 KB Output is correct
56 Correct 7 ms 2648 KB Output is correct
57 Correct 150 ms 38600 KB Output is correct
58 Correct 266 ms 52560 KB Output is correct
59 Correct 754 ms 26072 KB Output is correct
60 Correct 674 ms 24924 KB Output is correct
61 Correct 737 ms 29912 KB Output is correct
62 Correct 972 ms 31568 KB Output is correct
63 Correct 915 ms 31056 KB Output is correct
64 Correct 918 ms 30292 KB Output is correct
65 Correct 932 ms 31516 KB Output is correct
66 Correct 925 ms 30972 KB Output is correct
67 Correct 894 ms 30328 KB Output is correct
68 Correct 350 ms 14932 KB Output is correct
69 Correct 316 ms 14292 KB Output is correct
70 Correct 269 ms 14160 KB Output is correct
71 Correct 256 ms 13400 KB Output is correct
72 Correct 240 ms 12880 KB Output is correct
73 Correct 224 ms 12256 KB Output is correct
74 Correct 54 ms 5716 KB Output is correct
75 Correct 73 ms 5576 KB Output is correct
76 Correct 50 ms 6140 KB Output is correct
77 Correct 37 ms 4432 KB Output is correct
78 Correct 35 ms 5456 KB Output is correct
79 Correct 31 ms 3932 KB Output is correct
80 Correct 46 ms 10288 KB Output is correct
81 Correct 79 ms 10452 KB Output is correct
82 Correct 94 ms 11092 KB Output is correct
83 Correct 90 ms 10484 KB Output is correct
84 Correct 100 ms 11472 KB Output is correct
85 Correct 89 ms 10836 KB Output is correct
86 Correct 267 ms 52564 KB Output is correct
87 Correct 272 ms 52664 KB Output is correct
88 Correct 270 ms 52464 KB Output is correct
89 Correct 279 ms 52444 KB Output is correct
90 Correct 51 ms 12480 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 10 ms 2392 KB Output is correct
4 Correct 262 ms 30232 KB Output is correct
5 Correct 240 ms 68760 KB Output is correct
6 Correct 20 ms 5464 KB Output is correct
7 Correct 837 ms 69576 KB Output is correct
8 Correct 463 ms 68816 KB Output is correct
9 Correct 39 ms 14564 KB Output is correct
10 Correct 101 ms 42320 KB Output is correct
11 Correct 192 ms 67760 KB Output is correct
12 Correct 46 ms 18772 KB Output is correct
13 Correct 143 ms 60756 KB Output is correct
14 Correct 195 ms 67668 KB Output is correct
15 Correct 1010 ms 58708 KB Output is correct
16 Correct 958 ms 56144 KB Output is correct
17 Correct 1124 ms 62544 KB Output is correct
18 Correct 1407 ms 69528 KB Output is correct
19 Correct 1117 ms 62356 KB Output is correct
20 Correct 933 ms 56148 KB Output is correct
21 Correct 1359 ms 69716 KB Output is correct
22 Correct 1083 ms 62292 KB Output is correct
23 Correct 870 ms 56104 KB Output is correct
24 Correct 1339 ms 69552 KB Output is correct
25 Correct 1097 ms 62288 KB Output is correct
26 Correct 1167 ms 68688 KB Output is correct
27 Correct 964 ms 61488 KB Output is correct
28 Correct 761 ms 55432 KB Output is correct
29 Correct 584 ms 48352 KB Output is correct
30 Correct 153 ms 53184 KB Output is correct
31 Correct 339 ms 33368 KB Output is correct
32 Correct 487 ms 60756 KB Output is correct
33 Correct 1008 ms 56720 KB Output is correct
34 Correct 163 ms 32084 KB Output is correct
35 Correct 378 ms 56372 KB Output is correct
36 Correct 184 ms 61412 KB Output is correct
37 Correct 457 ms 59456 KB Output is correct
38 Correct 410 ms 55128 KB Output is correct
39 Correct 534 ms 63248 KB Output is correct
40 Correct 554 ms 65860 KB Output is correct
41 Correct 479 ms 55376 KB Output is correct
42 Correct 1337 ms 70228 KB Output is correct
43 Correct 918 ms 70348 KB Output is correct
44 Correct 391 ms 70112 KB Output is correct
45 Correct 1014 ms 70028 KB Output is correct
46 Correct 173 ms 55996 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 3 ms 1112 KB Output is correct
4 Correct 15 ms 4784 KB Output is correct
5 Correct 71 ms 9428 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 42 ms 5712 KB Output is correct
8 Correct 72 ms 9488 KB Output is correct
9 Correct 5 ms 1628 KB Output is correct
10 Correct 10 ms 3376 KB Output is correct
11 Correct 71 ms 9508 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 7 ms 2856 KB Output is correct
14 Correct 71 ms 9264 KB Output is correct
15 Correct 75 ms 5460 KB Output is correct
16 Correct 68 ms 5124 KB Output is correct
17 Correct 71 ms 5456 KB Output is correct
18 Correct 86 ms 5856 KB Output is correct
19 Correct 82 ms 5592 KB Output is correct
20 Correct 105 ms 5296 KB Output is correct
21 Correct 87 ms 5720 KB Output is correct
22 Correct 84 ms 5608 KB Output is correct
23 Correct 81 ms 5456 KB Output is correct
24 Correct 30 ms 2904 KB Output is correct
25 Correct 27 ms 2628 KB Output is correct
26 Correct 32 ms 2764 KB Output is correct
27 Correct 23 ms 2392 KB Output is correct
28 Correct 25 ms 2396 KB Output is correct
29 Correct 17 ms 2140 KB Output is correct
30 Correct 8 ms 1956 KB Output is correct
31 Correct 22 ms 2140 KB Output is correct
32 Correct 6 ms 1372 KB Output is correct
33 Correct 11 ms 1628 KB Output is correct
34 Correct 11 ms 2176 KB Output is correct
35 Correct 11 ms 1780 KB Output is correct
36 Correct 7 ms 1880 KB Output is correct
37 Correct 9 ms 2124 KB Output is correct
38 Correct 10 ms 2140 KB Output is correct
39 Correct 9 ms 2176 KB Output is correct
40 Correct 10 ms 1884 KB Output is correct
41 Correct 10 ms 2396 KB Output is correct
42 Correct 74 ms 9260 KB Output is correct
43 Correct 73 ms 9296 KB Output is correct
44 Correct 74 ms 9296 KB Output is correct
45 Correct 70 ms 9400 KB Output is correct
46 Correct 5 ms 2140 KB Output is correct
47 Correct 17 ms 2396 KB Output is correct
48 Correct 346 ms 44508 KB Output is correct
49 Correct 281 ms 52472 KB Output is correct
50 Correct 79 ms 28844 KB Output is correct
51 Correct 144 ms 20820 KB Output is correct
52 Correct 271 ms 52564 KB Output is correct
53 Correct 33 ms 5068 KB Output is correct
54 Correct 235 ms 34644 KB Output is correct
55 Correct 275 ms 52564 KB Output is correct
56 Correct 7 ms 2648 KB Output is correct
57 Correct 150 ms 38600 KB Output is correct
58 Correct 266 ms 52560 KB Output is correct
59 Correct 754 ms 26072 KB Output is correct
60 Correct 674 ms 24924 KB Output is correct
61 Correct 737 ms 29912 KB Output is correct
62 Correct 972 ms 31568 KB Output is correct
63 Correct 915 ms 31056 KB Output is correct
64 Correct 918 ms 30292 KB Output is correct
65 Correct 932 ms 31516 KB Output is correct
66 Correct 925 ms 30972 KB Output is correct
67 Correct 894 ms 30328 KB Output is correct
68 Correct 350 ms 14932 KB Output is correct
69 Correct 316 ms 14292 KB Output is correct
70 Correct 269 ms 14160 KB Output is correct
71 Correct 256 ms 13400 KB Output is correct
72 Correct 240 ms 12880 KB Output is correct
73 Correct 224 ms 12256 KB Output is correct
74 Correct 54 ms 5716 KB Output is correct
75 Correct 73 ms 5576 KB Output is correct
76 Correct 50 ms 6140 KB Output is correct
77 Correct 37 ms 4432 KB Output is correct
78 Correct 35 ms 5456 KB Output is correct
79 Correct 31 ms 3932 KB Output is correct
80 Correct 46 ms 10288 KB Output is correct
81 Correct 79 ms 10452 KB Output is correct
82 Correct 94 ms 11092 KB Output is correct
83 Correct 90 ms 10484 KB Output is correct
84 Correct 100 ms 11472 KB Output is correct
85 Correct 89 ms 10836 KB Output is correct
86 Correct 267 ms 52564 KB Output is correct
87 Correct 272 ms 52664 KB Output is correct
88 Correct 270 ms 52464 KB Output is correct
89 Correct 279 ms 52444 KB Output is correct
90 Correct 51 ms 12480 KB Output is correct
91 Correct 10 ms 2392 KB Output is correct
92 Correct 262 ms 30232 KB Output is correct
93 Correct 240 ms 68760 KB Output is correct
94 Correct 20 ms 5464 KB Output is correct
95 Correct 837 ms 69576 KB Output is correct
96 Correct 463 ms 68816 KB Output is correct
97 Correct 39 ms 14564 KB Output is correct
98 Correct 101 ms 42320 KB Output is correct
99 Correct 192 ms 67760 KB Output is correct
100 Correct 46 ms 18772 KB Output is correct
101 Correct 143 ms 60756 KB Output is correct
102 Correct 195 ms 67668 KB Output is correct
103 Correct 1010 ms 58708 KB Output is correct
104 Correct 958 ms 56144 KB Output is correct
105 Correct 1124 ms 62544 KB Output is correct
106 Correct 1407 ms 69528 KB Output is correct
107 Correct 1117 ms 62356 KB Output is correct
108 Correct 933 ms 56148 KB Output is correct
109 Correct 1359 ms 69716 KB Output is correct
110 Correct 1083 ms 62292 KB Output is correct
111 Correct 870 ms 56104 KB Output is correct
112 Correct 1339 ms 69552 KB Output is correct
113 Correct 1097 ms 62288 KB Output is correct
114 Correct 1167 ms 68688 KB Output is correct
115 Correct 964 ms 61488 KB Output is correct
116 Correct 761 ms 55432 KB Output is correct
117 Correct 584 ms 48352 KB Output is correct
118 Correct 153 ms 53184 KB Output is correct
119 Correct 339 ms 33368 KB Output is correct
120 Correct 487 ms 60756 KB Output is correct
121 Correct 1008 ms 56720 KB Output is correct
122 Correct 163 ms 32084 KB Output is correct
123 Correct 378 ms 56372 KB Output is correct
124 Correct 184 ms 61412 KB Output is correct
125 Correct 457 ms 59456 KB Output is correct
126 Correct 410 ms 55128 KB Output is correct
127 Correct 534 ms 63248 KB Output is correct
128 Correct 554 ms 65860 KB Output is correct
129 Correct 479 ms 55376 KB Output is correct
130 Correct 1337 ms 70228 KB Output is correct
131 Correct 918 ms 70348 KB Output is correct
132 Correct 391 ms 70112 KB Output is correct
133 Correct 1014 ms 70028 KB Output is correct
134 Correct 173 ms 55996 KB Output is correct
135 Execution timed out 1565 ms 213072 KB Time limit exceeded
136 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 3 ms 1112 KB Output is correct
4 Correct 15 ms 4784 KB Output is correct
5 Correct 71 ms 9428 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 42 ms 5712 KB Output is correct
8 Correct 72 ms 9488 KB Output is correct
9 Correct 5 ms 1628 KB Output is correct
10 Correct 10 ms 3376 KB Output is correct
11 Correct 71 ms 9508 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 7 ms 2856 KB Output is correct
14 Correct 71 ms 9264 KB Output is correct
15 Correct 75 ms 5460 KB Output is correct
16 Correct 68 ms 5124 KB Output is correct
17 Correct 71 ms 5456 KB Output is correct
18 Correct 86 ms 5856 KB Output is correct
19 Correct 82 ms 5592 KB Output is correct
20 Correct 105 ms 5296 KB Output is correct
21 Correct 87 ms 5720 KB Output is correct
22 Correct 84 ms 5608 KB Output is correct
23 Correct 81 ms 5456 KB Output is correct
24 Correct 30 ms 2904 KB Output is correct
25 Correct 27 ms 2628 KB Output is correct
26 Correct 32 ms 2764 KB Output is correct
27 Correct 23 ms 2392 KB Output is correct
28 Correct 25 ms 2396 KB Output is correct
29 Correct 17 ms 2140 KB Output is correct
30 Correct 8 ms 1956 KB Output is correct
31 Correct 22 ms 2140 KB Output is correct
32 Correct 6 ms 1372 KB Output is correct
33 Correct 11 ms 1628 KB Output is correct
34 Correct 11 ms 2176 KB Output is correct
35 Correct 11 ms 1780 KB Output is correct
36 Correct 7 ms 1880 KB Output is correct
37 Correct 9 ms 2124 KB Output is correct
38 Correct 10 ms 2140 KB Output is correct
39 Correct 9 ms 2176 KB Output is correct
40 Correct 10 ms 1884 KB Output is correct
41 Correct 10 ms 2396 KB Output is correct
42 Correct 74 ms 9260 KB Output is correct
43 Correct 73 ms 9296 KB Output is correct
44 Correct 74 ms 9296 KB Output is correct
45 Correct 70 ms 9400 KB Output is correct
46 Correct 5 ms 2140 KB Output is correct
47 Correct 17 ms 2396 KB Output is correct
48 Correct 346 ms 44508 KB Output is correct
49 Correct 281 ms 52472 KB Output is correct
50 Correct 79 ms 28844 KB Output is correct
51 Correct 144 ms 20820 KB Output is correct
52 Correct 271 ms 52564 KB Output is correct
53 Correct 33 ms 5068 KB Output is correct
54 Correct 235 ms 34644 KB Output is correct
55 Correct 275 ms 52564 KB Output is correct
56 Correct 7 ms 2648 KB Output is correct
57 Correct 150 ms 38600 KB Output is correct
58 Correct 266 ms 52560 KB Output is correct
59 Correct 754 ms 26072 KB Output is correct
60 Correct 674 ms 24924 KB Output is correct
61 Correct 737 ms 29912 KB Output is correct
62 Correct 972 ms 31568 KB Output is correct
63 Correct 915 ms 31056 KB Output is correct
64 Correct 918 ms 30292 KB Output is correct
65 Correct 932 ms 31516 KB Output is correct
66 Correct 925 ms 30972 KB Output is correct
67 Correct 894 ms 30328 KB Output is correct
68 Correct 350 ms 14932 KB Output is correct
69 Correct 316 ms 14292 KB Output is correct
70 Correct 269 ms 14160 KB Output is correct
71 Correct 256 ms 13400 KB Output is correct
72 Correct 240 ms 12880 KB Output is correct
73 Correct 224 ms 12256 KB Output is correct
74 Correct 54 ms 5716 KB Output is correct
75 Correct 73 ms 5576 KB Output is correct
76 Correct 50 ms 6140 KB Output is correct
77 Correct 37 ms 4432 KB Output is correct
78 Correct 35 ms 5456 KB Output is correct
79 Correct 31 ms 3932 KB Output is correct
80 Correct 46 ms 10288 KB Output is correct
81 Correct 79 ms 10452 KB Output is correct
82 Correct 94 ms 11092 KB Output is correct
83 Correct 90 ms 10484 KB Output is correct
84 Correct 100 ms 11472 KB Output is correct
85 Correct 89 ms 10836 KB Output is correct
86 Correct 267 ms 52564 KB Output is correct
87 Correct 272 ms 52664 KB Output is correct
88 Correct 270 ms 52464 KB Output is correct
89 Correct 279 ms 52444 KB Output is correct
90 Correct 51 ms 12480 KB Output is correct
91 Correct 10 ms 2392 KB Output is correct
92 Correct 262 ms 30232 KB Output is correct
93 Correct 240 ms 68760 KB Output is correct
94 Correct 20 ms 5464 KB Output is correct
95 Correct 837 ms 69576 KB Output is correct
96 Correct 463 ms 68816 KB Output is correct
97 Correct 39 ms 14564 KB Output is correct
98 Correct 101 ms 42320 KB Output is correct
99 Correct 192 ms 67760 KB Output is correct
100 Correct 46 ms 18772 KB Output is correct
101 Correct 143 ms 60756 KB Output is correct
102 Correct 195 ms 67668 KB Output is correct
103 Correct 1010 ms 58708 KB Output is correct
104 Correct 958 ms 56144 KB Output is correct
105 Correct 1124 ms 62544 KB Output is correct
106 Correct 1407 ms 69528 KB Output is correct
107 Correct 1117 ms 62356 KB Output is correct
108 Correct 933 ms 56148 KB Output is correct
109 Correct 1359 ms 69716 KB Output is correct
110 Correct 1083 ms 62292 KB Output is correct
111 Correct 870 ms 56104 KB Output is correct
112 Correct 1339 ms 69552 KB Output is correct
113 Correct 1097 ms 62288 KB Output is correct
114 Correct 1167 ms 68688 KB Output is correct
115 Correct 964 ms 61488 KB Output is correct
116 Correct 761 ms 55432 KB Output is correct
117 Correct 584 ms 48352 KB Output is correct
118 Correct 153 ms 53184 KB Output is correct
119 Correct 339 ms 33368 KB Output is correct
120 Correct 487 ms 60756 KB Output is correct
121 Correct 1008 ms 56720 KB Output is correct
122 Correct 163 ms 32084 KB Output is correct
123 Correct 378 ms 56372 KB Output is correct
124 Correct 184 ms 61412 KB Output is correct
125 Correct 457 ms 59456 KB Output is correct
126 Correct 410 ms 55128 KB Output is correct
127 Correct 534 ms 63248 KB Output is correct
128 Correct 554 ms 65860 KB Output is correct
129 Correct 479 ms 55376 KB Output is correct
130 Correct 1337 ms 70228 KB Output is correct
131 Correct 918 ms 70348 KB Output is correct
132 Correct 391 ms 70112 KB Output is correct
133 Correct 1014 ms 70028 KB Output is correct
134 Correct 173 ms 55996 KB Output is correct
135 Execution timed out 1565 ms 213072 KB Time limit exceeded
136 Halted 0 ms 0 KB -