답안 #1094331

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1094331 2024-09-29T10:42:49 Z stefanopulos Maze (JOI23_ho_t3) C++17
27 / 100
2000 ms 249880 KB
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>
 
using namespace std;
using namespace __gnu_pbds;
 
typedef long long ll;
typedef long double ldb;
 
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ldb,ldb> pdd;

#define ff(i,a,b) for(int i = a; i <= b; i++)
#define fb(i,b,a) for(int i = b; i >= a; i--)
#define trav(a,x) for(auto& a : x)
 
#define sz(a) (int)(a).size()
#define fi first
#define se second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
 
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

// os.order_of_key(k) the number of elements in the os less than k
// *os.find_by_order(k)  print the k-th smallest number in os(0-based)

const int mod = 1000000007;
const int inf = 1e9 + 5;
const int mxN = 200005; 

const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};

int n, m, k;
int Sx, Sy;
int Gx, Gy;

int main(){
    cin.tie(0)->sync_with_stdio(0);

    cin >> n >> m >> k >> Sx >> Sy >> Gx >> Gy;
    vector<string> s(n + 1);
    ff(i,1,n)cin >> s[i], s[i] = ' ' + s[i];

    vector<vector<vector<int>>> d(n + 1, vector<vector<int>>(m + 1, vector<int>(2)));
    ff(i,1,n)ff(j,1,m)ff(l,0,1)d[i][j][l] = inf;

    deque<array<int,3>> que; que.push_front({Sx, Sy, 0});
    d[Sx][Sy][0] = 0;

    while(sz(que)){
        auto [x, y, z] = que.front(); que.pop_front();

        if(z == 0){
            ff(i,0,3){
                int nwx = x + dx[i];
                int nwy = y + dy[i];
                if(nwx >= 1 && nwx <= n && nwy >= 1 && nwy <= m){
                    if(s[nwx][nwy] == '.'){
                        if(d[nwx][nwy][0] > d[x][y][0]){
                            d[nwx][nwy][0] = d[x][y][0];
                            que.push_front({nwx, nwy, 0});
                        }
                    }
                    else{
                        if(d[nwx][nwy][1] > d[x][y][0]){
                            d[nwx][nwy][1] = d[x][y][0];
                            que.push_front({nwx, nwy, 1});
                        }
                    }                    
                }
            }
        }
        else{
            ff(nwx,max(1,x - k + 1),min(n,x + k - 1)){
                ff(nwy,max(1,y - k + 1),min(m,y + k - 1)){
                    if(d[nwx][nwy][0] > d[x][y][1] + 1){
                        d[nwx][nwy][0] = d[x][y][1] + 1;
                        que.push_back({nwx, nwy, 0});
                    }
                }
            }
        }

    }

    cout << d[Gx][Gy][0] << '\n';

    return 0;
}
/*

2 4 2
1 1
2 4
.###
###.

6 6 1
1 6
6 1
..#.#.
##.###
####.#
...###
##.##.
.#.###

6 7 6
6 4
3 1
..#.#.#
##.##..
.######
#..#.#.
.######
..#.##.

1 15 1
1 15
1 1
...............

// probati bojenje sahovski
*/
 
 
 
 
 
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 460 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 456 KB Output is correct
8 Correct 0 ms 604 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 1 ms 344 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 344 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 6 ms 3676 KB Output is correct
20 Correct 7 ms 8048 KB Output is correct
21 Correct 6 ms 4192 KB Output is correct
22 Correct 6 ms 3676 KB Output is correct
23 Correct 7 ms 3856 KB Output is correct
24 Correct 10 ms 10272 KB Output is correct
25 Correct 11 ms 10276 KB Output is correct
26 Correct 6 ms 3932 KB Output is correct
27 Correct 7 ms 3676 KB Output is correct
28 Correct 6 ms 3676 KB Output is correct
29 Correct 15 ms 9052 KB Output is correct
30 Correct 8 ms 7260 KB Output is correct
31 Correct 11 ms 9952 KB Output is correct
32 Correct 15 ms 9052 KB Output is correct
33 Correct 13 ms 9060 KB Output is correct
34 Correct 22 ms 25172 KB Output is correct
35 Correct 24 ms 25328 KB Output is correct
36 Correct 16 ms 9052 KB Output is correct
37 Correct 15 ms 8920 KB Output is correct
38 Correct 16 ms 9052 KB Output is correct
39 Correct 242 ms 85844 KB Output is correct
40 Correct 17 ms 11100 KB Output is correct
41 Correct 32 ms 30976 KB Output is correct
42 Correct 26 ms 12640 KB Output is correct
43 Correct 34 ms 27344 KB Output is correct
44 Correct 93 ms 56016 KB Output is correct
45 Correct 103 ms 63292 KB Output is correct
46 Correct 160 ms 94952 KB Output is correct
47 Correct 212 ms 85864 KB Output is correct
48 Correct 322 ms 85884 KB Output is correct
49 Correct 229 ms 249880 KB Output is correct
50 Correct 246 ms 249716 KB Output is correct
51 Correct 206 ms 86100 KB Output is correct
52 Correct 204 ms 85840 KB Output is correct
53 Correct 222 ms 85672 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 1 ms 456 KB Output is correct
13 Correct 2 ms 344 KB Output is correct
14 Correct 3 ms 348 KB Output is correct
15 Correct 0 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 472 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 392 KB Output is correct
30 Correct 0 ms 344 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 352 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 600 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 2 ms 344 KB Output is correct
11 Correct 3 ms 348 KB Output is correct
12 Correct 0 ms 604 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 1 ms 344 KB Output is correct
19 Correct 1 ms 600 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 2 ms 604 KB Output is correct
25 Correct 7 ms 2652 KB Output is correct
26 Correct 8 ms 4184 KB Output is correct
27 Correct 5 ms 4256 KB Output is correct
28 Correct 86 ms 4952 KB Output is correct
29 Execution timed out 2037 ms 4440 KB Time limit exceeded
30 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 1 ms 456 KB Output is correct
13 Correct 2 ms 344 KB Output is correct
14 Correct 3 ms 348 KB Output is correct
15 Correct 0 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 472 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 392 KB Output is correct
30 Correct 0 ms 344 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 6 ms 3676 KB Output is correct
34 Correct 2 ms 604 KB Output is correct
35 Correct 1 ms 856 KB Output is correct
36 Correct 6 ms 2652 KB Output is correct
37 Correct 8 ms 8028 KB Output is correct
38 Correct 8 ms 4184 KB Output is correct
39 Correct 4 ms 4128 KB Output is correct
40 Correct 6 ms 3916 KB Output is correct
41 Correct 6 ms 3672 KB Output is correct
42 Correct 87 ms 4948 KB Output is correct
43 Execution timed out 2056 ms 4444 KB Time limit exceeded
44 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 1 ms 456 KB Output is correct
13 Correct 2 ms 344 KB Output is correct
14 Correct 3 ms 348 KB Output is correct
15 Correct 0 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 472 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 392 KB Output is correct
30 Correct 0 ms 344 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 6 ms 3676 KB Output is correct
34 Correct 2 ms 604 KB Output is correct
35 Correct 1 ms 856 KB Output is correct
36 Correct 6 ms 2652 KB Output is correct
37 Correct 8 ms 8028 KB Output is correct
38 Correct 8 ms 4184 KB Output is correct
39 Correct 4 ms 4128 KB Output is correct
40 Correct 6 ms 3916 KB Output is correct
41 Correct 6 ms 3672 KB Output is correct
42 Correct 87 ms 4948 KB Output is correct
43 Execution timed out 2056 ms 4444 KB Time limit exceeded
44 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 460 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 456 KB Output is correct
8 Correct 0 ms 604 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 1 ms 344 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 344 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 6 ms 3676 KB Output is correct
20 Correct 7 ms 8048 KB Output is correct
21 Correct 6 ms 4192 KB Output is correct
22 Correct 6 ms 3676 KB Output is correct
23 Correct 7 ms 3856 KB Output is correct
24 Correct 10 ms 10272 KB Output is correct
25 Correct 11 ms 10276 KB Output is correct
26 Correct 6 ms 3932 KB Output is correct
27 Correct 7 ms 3676 KB Output is correct
28 Correct 6 ms 3676 KB Output is correct
29 Correct 15 ms 9052 KB Output is correct
30 Correct 8 ms 7260 KB Output is correct
31 Correct 11 ms 9952 KB Output is correct
32 Correct 15 ms 9052 KB Output is correct
33 Correct 13 ms 9060 KB Output is correct
34 Correct 22 ms 25172 KB Output is correct
35 Correct 24 ms 25328 KB Output is correct
36 Correct 16 ms 9052 KB Output is correct
37 Correct 15 ms 8920 KB Output is correct
38 Correct 16 ms 9052 KB Output is correct
39 Correct 242 ms 85844 KB Output is correct
40 Correct 17 ms 11100 KB Output is correct
41 Correct 32 ms 30976 KB Output is correct
42 Correct 26 ms 12640 KB Output is correct
43 Correct 34 ms 27344 KB Output is correct
44 Correct 93 ms 56016 KB Output is correct
45 Correct 103 ms 63292 KB Output is correct
46 Correct 160 ms 94952 KB Output is correct
47 Correct 212 ms 85864 KB Output is correct
48 Correct 322 ms 85884 KB Output is correct
49 Correct 229 ms 249880 KB Output is correct
50 Correct 246 ms 249716 KB Output is correct
51 Correct 206 ms 86100 KB Output is correct
52 Correct 204 ms 85840 KB Output is correct
53 Correct 222 ms 85672 KB Output is correct
54 Correct 0 ms 344 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 0 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 0 ms 348 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 1 ms 456 KB Output is correct
66 Correct 2 ms 344 KB Output is correct
67 Correct 3 ms 348 KB Output is correct
68 Correct 0 ms 604 KB Output is correct
69 Correct 0 ms 604 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 0 ms 348 KB Output is correct
75 Correct 0 ms 472 KB Output is correct
76 Correct 0 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 0 ms 348 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 1 ms 348 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 0 ms 392 KB Output is correct
83 Correct 0 ms 344 KB Output is correct
84 Correct 1 ms 348 KB Output is correct
85 Correct 0 ms 348 KB Output is correct
86 Correct 0 ms 348 KB Output is correct
87 Correct 0 ms 348 KB Output is correct
88 Correct 0 ms 352 KB Output is correct
89 Correct 1 ms 344 KB Output is correct
90 Correct 1 ms 348 KB Output is correct
91 Correct 0 ms 600 KB Output is correct
92 Correct 0 ms 348 KB Output is correct
93 Correct 0 ms 344 KB Output is correct
94 Correct 0 ms 348 KB Output is correct
95 Correct 2 ms 344 KB Output is correct
96 Correct 3 ms 348 KB Output is correct
97 Correct 0 ms 604 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 0 ms 348 KB Output is correct
100 Correct 0 ms 348 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 1 ms 344 KB Output is correct
104 Correct 1 ms 600 KB Output is correct
105 Correct 0 ms 348 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 0 ms 348 KB Output is correct
108 Correct 0 ms 348 KB Output is correct
109 Correct 2 ms 604 KB Output is correct
110 Correct 7 ms 2652 KB Output is correct
111 Correct 8 ms 4184 KB Output is correct
112 Correct 5 ms 4256 KB Output is correct
113 Correct 86 ms 4952 KB Output is correct
114 Execution timed out 2037 ms 4440 KB Time limit exceeded
115 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 460 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 456 KB Output is correct
8 Correct 0 ms 604 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 1 ms 344 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 344 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 6 ms 3676 KB Output is correct
20 Correct 7 ms 8048 KB Output is correct
21 Correct 6 ms 4192 KB Output is correct
22 Correct 6 ms 3676 KB Output is correct
23 Correct 7 ms 3856 KB Output is correct
24 Correct 10 ms 10272 KB Output is correct
25 Correct 11 ms 10276 KB Output is correct
26 Correct 6 ms 3932 KB Output is correct
27 Correct 7 ms 3676 KB Output is correct
28 Correct 6 ms 3676 KB Output is correct
29 Correct 15 ms 9052 KB Output is correct
30 Correct 8 ms 7260 KB Output is correct
31 Correct 11 ms 9952 KB Output is correct
32 Correct 15 ms 9052 KB Output is correct
33 Correct 13 ms 9060 KB Output is correct
34 Correct 22 ms 25172 KB Output is correct
35 Correct 24 ms 25328 KB Output is correct
36 Correct 16 ms 9052 KB Output is correct
37 Correct 15 ms 8920 KB Output is correct
38 Correct 16 ms 9052 KB Output is correct
39 Correct 242 ms 85844 KB Output is correct
40 Correct 17 ms 11100 KB Output is correct
41 Correct 32 ms 30976 KB Output is correct
42 Correct 26 ms 12640 KB Output is correct
43 Correct 34 ms 27344 KB Output is correct
44 Correct 93 ms 56016 KB Output is correct
45 Correct 103 ms 63292 KB Output is correct
46 Correct 160 ms 94952 KB Output is correct
47 Correct 212 ms 85864 KB Output is correct
48 Correct 322 ms 85884 KB Output is correct
49 Correct 229 ms 249880 KB Output is correct
50 Correct 246 ms 249716 KB Output is correct
51 Correct 206 ms 86100 KB Output is correct
52 Correct 204 ms 85840 KB Output is correct
53 Correct 222 ms 85672 KB Output is correct
54 Correct 0 ms 344 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 0 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 0 ms 348 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 1 ms 456 KB Output is correct
66 Correct 2 ms 344 KB Output is correct
67 Correct 3 ms 348 KB Output is correct
68 Correct 0 ms 604 KB Output is correct
69 Correct 0 ms 604 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 0 ms 348 KB Output is correct
75 Correct 0 ms 472 KB Output is correct
76 Correct 0 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 0 ms 348 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 1 ms 348 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 0 ms 392 KB Output is correct
83 Correct 0 ms 344 KB Output is correct
84 Correct 1 ms 348 KB Output is correct
85 Correct 0 ms 348 KB Output is correct
86 Correct 0 ms 348 KB Output is correct
87 Correct 0 ms 348 KB Output is correct
88 Correct 0 ms 352 KB Output is correct
89 Correct 1 ms 344 KB Output is correct
90 Correct 1 ms 348 KB Output is correct
91 Correct 0 ms 600 KB Output is correct
92 Correct 0 ms 348 KB Output is correct
93 Correct 0 ms 344 KB Output is correct
94 Correct 0 ms 348 KB Output is correct
95 Correct 2 ms 344 KB Output is correct
96 Correct 3 ms 348 KB Output is correct
97 Correct 0 ms 604 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 0 ms 348 KB Output is correct
100 Correct 0 ms 348 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 1 ms 344 KB Output is correct
104 Correct 1 ms 600 KB Output is correct
105 Correct 0 ms 348 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 0 ms 348 KB Output is correct
108 Correct 0 ms 348 KB Output is correct
109 Correct 2 ms 604 KB Output is correct
110 Correct 7 ms 2652 KB Output is correct
111 Correct 8 ms 4184 KB Output is correct
112 Correct 5 ms 4256 KB Output is correct
113 Correct 86 ms 4952 KB Output is correct
114 Execution timed out 2037 ms 4440 KB Time limit exceeded
115 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 460 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 456 KB Output is correct
8 Correct 0 ms 604 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 1 ms 344 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 344 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 6 ms 3676 KB Output is correct
20 Correct 7 ms 8048 KB Output is correct
21 Correct 6 ms 4192 KB Output is correct
22 Correct 6 ms 3676 KB Output is correct
23 Correct 7 ms 3856 KB Output is correct
24 Correct 10 ms 10272 KB Output is correct
25 Correct 11 ms 10276 KB Output is correct
26 Correct 6 ms 3932 KB Output is correct
27 Correct 7 ms 3676 KB Output is correct
28 Correct 6 ms 3676 KB Output is correct
29 Correct 15 ms 9052 KB Output is correct
30 Correct 8 ms 7260 KB Output is correct
31 Correct 11 ms 9952 KB Output is correct
32 Correct 15 ms 9052 KB Output is correct
33 Correct 13 ms 9060 KB Output is correct
34 Correct 22 ms 25172 KB Output is correct
35 Correct 24 ms 25328 KB Output is correct
36 Correct 16 ms 9052 KB Output is correct
37 Correct 15 ms 8920 KB Output is correct
38 Correct 16 ms 9052 KB Output is correct
39 Correct 242 ms 85844 KB Output is correct
40 Correct 17 ms 11100 KB Output is correct
41 Correct 32 ms 30976 KB Output is correct
42 Correct 26 ms 12640 KB Output is correct
43 Correct 34 ms 27344 KB Output is correct
44 Correct 93 ms 56016 KB Output is correct
45 Correct 103 ms 63292 KB Output is correct
46 Correct 160 ms 94952 KB Output is correct
47 Correct 212 ms 85864 KB Output is correct
48 Correct 322 ms 85884 KB Output is correct
49 Correct 229 ms 249880 KB Output is correct
50 Correct 246 ms 249716 KB Output is correct
51 Correct 206 ms 86100 KB Output is correct
52 Correct 204 ms 85840 KB Output is correct
53 Correct 222 ms 85672 KB Output is correct
54 Correct 0 ms 344 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 0 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 0 ms 348 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 1 ms 456 KB Output is correct
66 Correct 2 ms 344 KB Output is correct
67 Correct 3 ms 348 KB Output is correct
68 Correct 0 ms 604 KB Output is correct
69 Correct 0 ms 604 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 0 ms 348 KB Output is correct
75 Correct 0 ms 472 KB Output is correct
76 Correct 0 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 0 ms 348 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 1 ms 348 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 0 ms 392 KB Output is correct
83 Correct 0 ms 344 KB Output is correct
84 Correct 1 ms 348 KB Output is correct
85 Correct 0 ms 348 KB Output is correct
86 Correct 0 ms 348 KB Output is correct
87 Correct 0 ms 348 KB Output is correct
88 Correct 0 ms 352 KB Output is correct
89 Correct 1 ms 344 KB Output is correct
90 Correct 1 ms 348 KB Output is correct
91 Correct 0 ms 600 KB Output is correct
92 Correct 0 ms 348 KB Output is correct
93 Correct 0 ms 344 KB Output is correct
94 Correct 0 ms 348 KB Output is correct
95 Correct 2 ms 344 KB Output is correct
96 Correct 3 ms 348 KB Output is correct
97 Correct 0 ms 604 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 0 ms 348 KB Output is correct
100 Correct 0 ms 348 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 1 ms 344 KB Output is correct
104 Correct 1 ms 600 KB Output is correct
105 Correct 0 ms 348 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 0 ms 348 KB Output is correct
108 Correct 0 ms 348 KB Output is correct
109 Correct 2 ms 604 KB Output is correct
110 Correct 7 ms 2652 KB Output is correct
111 Correct 8 ms 4184 KB Output is correct
112 Correct 5 ms 4256 KB Output is correct
113 Correct 86 ms 4952 KB Output is correct
114 Execution timed out 2037 ms 4440 KB Time limit exceeded
115 Halted 0 ms 0 KB -