답안 #895977

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
895977 2023-12-31T09:20:15 Z niter Maze (JOI23_ho_t3) C++14
51 / 100
2000 ms 34340 KB
#include <bits/stdc++.h>
#define loop(i,a,b) for(int i = (a); i < (b); i ++)
#define pb push_back
#define ins insert
#define pii pair<int,int>
#define ff first
#define ss second
#define BAE(x) (x).begin(), (x).end()
#define op(x) cerr << #x << " = " << x << endl;
#define opa(x) cerr << #x << " = " << x << ", ";
#define spac cerr << ' ';
#define entr cerr << endl;
#define STL(x) cerr << #x << " : "; for(auto &qwe:x) cerr << qwe << ' '; cerr << endl;
#define ARR(x, nnn) cerr << #x << " : "; loop(qwe,0,nnn) cerr << x[qwe] << ' '; cerr << endl;
using namespace std;
mt19937 RNG(chrono::steady_clock::now().time_since_epoch().count());
ostream& operator<<(ostream& os, pii A){ os << "\n[" << A.ff << ", " << A.ss << "]"; }

inline bool check(int i, int j, int n, int m){
    return i >= 0 && j >= 0 && i < n && j < m;
}
const int INF = (int)(1e9);
const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
vector<pii> dr;
vector<vector<char>> c;
vector<vector<int>> dis;
vector<vector<bool>> special;

int main(){
    ios::sync_with_stdio(false); cin.tie(0);
    int n, m, L;
    cin >> n >> m >> L;
    pii s, t;
    cin >> s.ff >> s.ss >> t.ff >> t.ss;
    s.ff--; s.ss--; t.ff--; t.ss--;
    c = vector<vector<char>>(n, vector<char>(m, ' '));
    loop(i,0,n){
        loop(j,0,m){
            cin >> c[i][j];
        }
    }
    for(int i = -1; i <= 1; i += 2){
        for(int j = -1; j <= 1; j += 2){
            for(int k = 0; k < L; k ++){
                dr.pb({k * i, L * j});
                dr.pb({L * j, k * i});
            }
        }
    }
    sort(BAE(dr));
    dr.resize(unique(BAE(dr)) - dr.begin());
//    STL(dr);
    special = vector<vector<bool>>(n, vector<bool>(m, false));
    for(auto &i:dr){
        int nx = s.ff + i.ff;
        int ny = s.ss + i.ss;
        if(check(nx, ny, n, m)){
            special[nx][ny] = true;
        }
    }
    dis = vector<vector<int>>(n, vector<int>(m, INF));
    dis[s.ff][s.ss] = 0;
    queue<pii> Q;
    Q.push(s);
    while(!Q.empty()){
        int nowx = Q.front().ff;
        int nowy = Q.front().ss;
        Q.pop();
        if(special[nowx][nowy]) continue;
        loop(d,0,4){
            int nx = nowx + dx[d];
            int ny = nowy + dy[d];
            if(!check(nx, ny, n, m)) continue;
            if(dis[nx][ny] == INF){
                dis[nx][ny] = 1;
                Q.push({nx, ny});
            }
        }
    }
//    for(auto &i:dis){
//        STL(i) entr
//    }
    priority_queue<pair<int,pii>, vector<pair<int,pii>>, greater<pair<int,pii>>> pq;
    loop(i,0,n){
        loop(j,0,m){
            if(dis[i][j] != INF) pq.push({dis[i][j], {i, j}});
        }
    }
//    pq.push({0, s});
    while(!pq.empty()){
        int nowx = pq.top().ss.ff;
        int nowy = pq.top().ss.ss;
        int nowd = pq.top().ff;
        pq.pop();
        if(nowd != dis[nowx][nowy]) continue;
        loop(d,0,4){
            int nx = nowx + dx[d];
            int ny = nowy + dy[d];
            if(!check(nx, ny, n, m)) continue;
            if(c[nx][ny] == '#') continue;
            if(dis[nx][ny] > nowd){
                dis[nx][ny] = nowd;
                pq.push({dis[nx][ny], {nx, ny}});
            }
        }
        for(auto &d:dr){
            int nx = nowx + d.ff;
            int ny = nowy + d.ss;
            if(!check(nx, ny, n, m)) continue;
            if(dis[nx][ny] > nowd + 1){
                dis[nx][ny] = nowd + 1;
                pq.push({dis[nx][ny], {nx, ny}});
            }
        }
    }
    assert(dis[t.ff][t.ss] != INF);
    cout << dis[t.ff][t.ss] << '\n';
}
/*
5 5 2
1 1
4 4
.####
#####
#####
###.#
#####
*/

Compilation message

Main.cpp: In function 'std::ostream& operator<<(std::ostream&, std::pair<int, int>)':
Main.cpp:17:86: warning: no return statement in function returning non-void [-Wreturn-type]
   17 | ostream& operator<<(ostream& os, pii A){ os << "\n[" << A.ff << ", " << A.ss << "]"; }
      |                                                                                      ^
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 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 1 ms 500 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 464 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 460 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 1 ms 604 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 0 ms 348 KB Output is correct
19 Correct 8 ms 860 KB Output is correct
20 Correct 2 ms 856 KB Output is correct
21 Correct 7 ms 860 KB Output is correct
22 Correct 11 ms 856 KB Output is correct
23 Correct 7 ms 996 KB Output is correct
24 Correct 3 ms 1040 KB Output is correct
25 Correct 3 ms 1116 KB Output is correct
26 Correct 12 ms 860 KB Output is correct
27 Correct 11 ms 860 KB Output is correct
28 Correct 8 ms 844 KB Output is correct
29 Correct 19 ms 1372 KB Output is correct
30 Correct 6 ms 860 KB Output is correct
31 Correct 17 ms 1372 KB Output is correct
32 Correct 26 ms 1372 KB Output is correct
33 Correct 17 ms 1284 KB Output is correct
34 Correct 6 ms 1736 KB Output is correct
35 Correct 6 ms 1752 KB Output is correct
36 Correct 29 ms 1368 KB Output is correct
37 Correct 27 ms 1372 KB Output is correct
38 Correct 19 ms 1372 KB Output is correct
39 Correct 204 ms 9388 KB Output is correct
40 Correct 26 ms 1372 KB Output is correct
41 Correct 7 ms 2212 KB Output is correct
42 Correct 30 ms 1628 KB Output is correct
43 Correct 15 ms 2392 KB Output is correct
44 Correct 103 ms 5212 KB Output is correct
45 Correct 64 ms 5560 KB Output is correct
46 Correct 208 ms 9636 KB Output is correct
47 Correct 266 ms 9504 KB Output is correct
48 Correct 183 ms 9308 KB Output is correct
49 Correct 50 ms 15000 KB Output is correct
50 Correct 50 ms 15096 KB Output is correct
51 Correct 299 ms 9748 KB Output is correct
52 Correct 282 ms 9564 KB Output is correct
53 Correct 205 ms 9508 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 344 KB Output is correct
8 Correct 1 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 348 KB Output is correct
13 Correct 1 ms 348 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 468 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 1 ms 344 KB Output is correct
22 Correct 0 ms 348 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 600 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 652 KB Output is correct
29 Correct 0 ms 464 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 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 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 1 ms 348 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 1 ms 456 KB Output is correct
12 Correct 0 ms 464 KB Output is correct
13 Correct 1 ms 348 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 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 1 ms 348 KB Output is correct
23 Correct 0 ms 456 KB Output is correct
24 Correct 1 ms 348 KB Output is correct
25 Correct 8 ms 736 KB Output is correct
26 Correct 18 ms 1628 KB Output is correct
27 Correct 7 ms 860 KB Output is correct
28 Correct 121 ms 1624 KB Output is correct
29 Correct 122 ms 1628 KB Output is correct
30 Correct 114 ms 1624 KB Output is correct
31 Correct 42 ms 1108 KB Output is correct
32 Correct 11 ms 860 KB Output is correct
33 Correct 11 ms 860 KB Output is correct
34 Correct 121 ms 2760 KB Output is correct
35 Correct 17 ms 1372 KB Output is correct
36 Correct 465 ms 5840 KB Output is correct
37 Correct 467 ms 5328 KB Output is correct
38 Correct 443 ms 4560 KB Output is correct
39 Correct 288 ms 10044 KB Output is correct
40 Correct 1501 ms 33764 KB Output is correct
41 Correct 209 ms 9680 KB Output is correct
42 Execution timed out 2067 ms 34340 KB Time limit exceeded
43 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 344 KB Output is correct
8 Correct 1 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 348 KB Output is correct
13 Correct 1 ms 348 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 468 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 1 ms 344 KB Output is correct
22 Correct 0 ms 348 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 600 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 652 KB Output is correct
29 Correct 0 ms 464 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 10 ms 860 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 8 ms 604 KB Output is correct
37 Correct 2 ms 860 KB Output is correct
38 Correct 18 ms 1628 KB Output is correct
39 Correct 7 ms 880 KB Output is correct
40 Correct 10 ms 860 KB Output is correct
41 Correct 6 ms 860 KB Output is correct
42 Correct 125 ms 1624 KB Output is correct
43 Correct 119 ms 1628 KB Output is correct
44 Correct 116 ms 1624 KB Output is correct
45 Correct 2 ms 1116 KB Output is correct
46 Correct 3 ms 1116 KB Output is correct
47 Correct 6 ms 860 KB Output is correct
48 Correct 18 ms 868 KB Output is correct
49 Correct 24 ms 860 KB Output is correct
50 Correct 34 ms 856 KB Output is correct
51 Correct 45 ms 1116 KB Output is correct
52 Correct 11 ms 856 KB Output is correct
53 Correct 11 ms 932 KB Output is correct
54 Correct 7 ms 856 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 344 KB Output is correct
8 Correct 1 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 348 KB Output is correct
13 Correct 1 ms 348 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 468 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 1 ms 344 KB Output is correct
22 Correct 0 ms 348 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 600 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 652 KB Output is correct
29 Correct 0 ms 464 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 10 ms 860 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 8 ms 604 KB Output is correct
37 Correct 2 ms 860 KB Output is correct
38 Correct 18 ms 1628 KB Output is correct
39 Correct 7 ms 880 KB Output is correct
40 Correct 10 ms 860 KB Output is correct
41 Correct 6 ms 860 KB Output is correct
42 Correct 125 ms 1624 KB Output is correct
43 Correct 119 ms 1628 KB Output is correct
44 Correct 116 ms 1624 KB Output is correct
45 Correct 2 ms 1116 KB Output is correct
46 Correct 3 ms 1116 KB Output is correct
47 Correct 6 ms 860 KB Output is correct
48 Correct 18 ms 868 KB Output is correct
49 Correct 24 ms 860 KB Output is correct
50 Correct 34 ms 856 KB Output is correct
51 Correct 45 ms 1116 KB Output is correct
52 Correct 11 ms 856 KB Output is correct
53 Correct 11 ms 932 KB Output is correct
54 Correct 7 ms 856 KB Output is correct
55 Correct 19 ms 1372 KB Output is correct
56 Correct 5 ms 856 KB Output is correct
57 Correct 128 ms 2856 KB Output is correct
58 Correct 25 ms 1112 KB Output is correct
59 Correct 17 ms 1372 KB Output is correct
60 Correct 26 ms 1456 KB Output is correct
61 Correct 18 ms 1624 KB Output is correct
62 Correct 474 ms 5584 KB Output is correct
63 Correct 447 ms 4556 KB Output is correct
64 Correct 447 ms 4560 KB Output is correct
65 Correct 6 ms 1736 KB Output is correct
66 Correct 6 ms 1792 KB Output is correct
67 Correct 16 ms 1628 KB Output is correct
68 Correct 52 ms 1424 KB Output is correct
69 Correct 67 ms 1372 KB Output is correct
70 Correct 92 ms 1624 KB Output is correct
71 Correct 138 ms 1824 KB Output is correct
72 Correct 29 ms 1372 KB Output is correct
73 Correct 27 ms 1624 KB Output is correct
74 Correct 19 ms 1372 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 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 500 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 464 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 460 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 1 ms 604 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 0 ms 348 KB Output is correct
19 Correct 8 ms 860 KB Output is correct
20 Correct 2 ms 856 KB Output is correct
21 Correct 7 ms 860 KB Output is correct
22 Correct 11 ms 856 KB Output is correct
23 Correct 7 ms 996 KB Output is correct
24 Correct 3 ms 1040 KB Output is correct
25 Correct 3 ms 1116 KB Output is correct
26 Correct 12 ms 860 KB Output is correct
27 Correct 11 ms 860 KB Output is correct
28 Correct 8 ms 844 KB Output is correct
29 Correct 19 ms 1372 KB Output is correct
30 Correct 6 ms 860 KB Output is correct
31 Correct 17 ms 1372 KB Output is correct
32 Correct 26 ms 1372 KB Output is correct
33 Correct 17 ms 1284 KB Output is correct
34 Correct 6 ms 1736 KB Output is correct
35 Correct 6 ms 1752 KB Output is correct
36 Correct 29 ms 1368 KB Output is correct
37 Correct 27 ms 1372 KB Output is correct
38 Correct 19 ms 1372 KB Output is correct
39 Correct 204 ms 9388 KB Output is correct
40 Correct 26 ms 1372 KB Output is correct
41 Correct 7 ms 2212 KB Output is correct
42 Correct 30 ms 1628 KB Output is correct
43 Correct 15 ms 2392 KB Output is correct
44 Correct 103 ms 5212 KB Output is correct
45 Correct 64 ms 5560 KB Output is correct
46 Correct 208 ms 9636 KB Output is correct
47 Correct 266 ms 9504 KB Output is correct
48 Correct 183 ms 9308 KB Output is correct
49 Correct 50 ms 15000 KB Output is correct
50 Correct 50 ms 15096 KB Output is correct
51 Correct 299 ms 9748 KB Output is correct
52 Correct 282 ms 9564 KB Output is correct
53 Correct 205 ms 9508 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 344 KB Output is correct
61 Correct 1 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 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 1 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 0 ms 468 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 344 KB Output is correct
72 Correct 1 ms 344 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 1 ms 344 KB Output is correct
75 Correct 0 ms 348 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 600 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 0 ms 348 KB Output is correct
81 Correct 0 ms 652 KB Output is correct
82 Correct 0 ms 464 KB Output is correct
83 Correct 0 ms 348 KB Output is correct
84 Correct 0 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 348 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 0 ms 348 KB Output is correct
91 Correct 0 ms 348 KB Output is correct
92 Correct 0 ms 348 KB Output is correct
93 Correct 1 ms 348 KB Output is correct
94 Correct 1 ms 348 KB Output is correct
95 Correct 1 ms 348 KB Output is correct
96 Correct 1 ms 456 KB Output is correct
97 Correct 0 ms 464 KB Output is correct
98 Correct 1 ms 348 KB Output is correct
99 Correct 1 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 0 ms 348 KB Output is correct
104 Correct 0 ms 348 KB Output is correct
105 Correct 0 ms 348 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 1 ms 348 KB Output is correct
108 Correct 0 ms 456 KB Output is correct
109 Correct 1 ms 348 KB Output is correct
110 Correct 8 ms 736 KB Output is correct
111 Correct 18 ms 1628 KB Output is correct
112 Correct 7 ms 860 KB Output is correct
113 Correct 121 ms 1624 KB Output is correct
114 Correct 122 ms 1628 KB Output is correct
115 Correct 114 ms 1624 KB Output is correct
116 Correct 42 ms 1108 KB Output is correct
117 Correct 11 ms 860 KB Output is correct
118 Correct 11 ms 860 KB Output is correct
119 Correct 121 ms 2760 KB Output is correct
120 Correct 17 ms 1372 KB Output is correct
121 Correct 465 ms 5840 KB Output is correct
122 Correct 467 ms 5328 KB Output is correct
123 Correct 443 ms 4560 KB Output is correct
124 Correct 288 ms 10044 KB Output is correct
125 Correct 1501 ms 33764 KB Output is correct
126 Correct 209 ms 9680 KB Output is correct
127 Execution timed out 2067 ms 34340 KB Time limit exceeded
128 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 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 1 ms 500 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 464 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 460 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 1 ms 604 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 0 ms 348 KB Output is correct
19 Correct 8 ms 860 KB Output is correct
20 Correct 2 ms 856 KB Output is correct
21 Correct 7 ms 860 KB Output is correct
22 Correct 11 ms 856 KB Output is correct
23 Correct 7 ms 996 KB Output is correct
24 Correct 3 ms 1040 KB Output is correct
25 Correct 3 ms 1116 KB Output is correct
26 Correct 12 ms 860 KB Output is correct
27 Correct 11 ms 860 KB Output is correct
28 Correct 8 ms 844 KB Output is correct
29 Correct 19 ms 1372 KB Output is correct
30 Correct 6 ms 860 KB Output is correct
31 Correct 17 ms 1372 KB Output is correct
32 Correct 26 ms 1372 KB Output is correct
33 Correct 17 ms 1284 KB Output is correct
34 Correct 6 ms 1736 KB Output is correct
35 Correct 6 ms 1752 KB Output is correct
36 Correct 29 ms 1368 KB Output is correct
37 Correct 27 ms 1372 KB Output is correct
38 Correct 19 ms 1372 KB Output is correct
39 Correct 204 ms 9388 KB Output is correct
40 Correct 26 ms 1372 KB Output is correct
41 Correct 7 ms 2212 KB Output is correct
42 Correct 30 ms 1628 KB Output is correct
43 Correct 15 ms 2392 KB Output is correct
44 Correct 103 ms 5212 KB Output is correct
45 Correct 64 ms 5560 KB Output is correct
46 Correct 208 ms 9636 KB Output is correct
47 Correct 266 ms 9504 KB Output is correct
48 Correct 183 ms 9308 KB Output is correct
49 Correct 50 ms 15000 KB Output is correct
50 Correct 50 ms 15096 KB Output is correct
51 Correct 299 ms 9748 KB Output is correct
52 Correct 282 ms 9564 KB Output is correct
53 Correct 205 ms 9508 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 344 KB Output is correct
61 Correct 1 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 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 1 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 0 ms 468 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 344 KB Output is correct
72 Correct 1 ms 344 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 1 ms 344 KB Output is correct
75 Correct 0 ms 348 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 600 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 0 ms 348 KB Output is correct
81 Correct 0 ms 652 KB Output is correct
82 Correct 0 ms 464 KB Output is correct
83 Correct 0 ms 348 KB Output is correct
84 Correct 0 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 348 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 0 ms 348 KB Output is correct
91 Correct 0 ms 348 KB Output is correct
92 Correct 0 ms 348 KB Output is correct
93 Correct 1 ms 348 KB Output is correct
94 Correct 1 ms 348 KB Output is correct
95 Correct 1 ms 348 KB Output is correct
96 Correct 1 ms 456 KB Output is correct
97 Correct 0 ms 464 KB Output is correct
98 Correct 1 ms 348 KB Output is correct
99 Correct 1 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 0 ms 348 KB Output is correct
104 Correct 0 ms 348 KB Output is correct
105 Correct 0 ms 348 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 1 ms 348 KB Output is correct
108 Correct 0 ms 456 KB Output is correct
109 Correct 1 ms 348 KB Output is correct
110 Correct 8 ms 736 KB Output is correct
111 Correct 18 ms 1628 KB Output is correct
112 Correct 7 ms 860 KB Output is correct
113 Correct 121 ms 1624 KB Output is correct
114 Correct 122 ms 1628 KB Output is correct
115 Correct 114 ms 1624 KB Output is correct
116 Correct 42 ms 1108 KB Output is correct
117 Correct 11 ms 860 KB Output is correct
118 Correct 11 ms 860 KB Output is correct
119 Correct 121 ms 2760 KB Output is correct
120 Correct 17 ms 1372 KB Output is correct
121 Correct 465 ms 5840 KB Output is correct
122 Correct 467 ms 5328 KB Output is correct
123 Correct 443 ms 4560 KB Output is correct
124 Correct 288 ms 10044 KB Output is correct
125 Correct 1501 ms 33764 KB Output is correct
126 Correct 209 ms 9680 KB Output is correct
127 Execution timed out 2067 ms 34340 KB Time limit exceeded
128 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 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 1 ms 500 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 464 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 460 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 1 ms 604 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 0 ms 348 KB Output is correct
19 Correct 8 ms 860 KB Output is correct
20 Correct 2 ms 856 KB Output is correct
21 Correct 7 ms 860 KB Output is correct
22 Correct 11 ms 856 KB Output is correct
23 Correct 7 ms 996 KB Output is correct
24 Correct 3 ms 1040 KB Output is correct
25 Correct 3 ms 1116 KB Output is correct
26 Correct 12 ms 860 KB Output is correct
27 Correct 11 ms 860 KB Output is correct
28 Correct 8 ms 844 KB Output is correct
29 Correct 19 ms 1372 KB Output is correct
30 Correct 6 ms 860 KB Output is correct
31 Correct 17 ms 1372 KB Output is correct
32 Correct 26 ms 1372 KB Output is correct
33 Correct 17 ms 1284 KB Output is correct
34 Correct 6 ms 1736 KB Output is correct
35 Correct 6 ms 1752 KB Output is correct
36 Correct 29 ms 1368 KB Output is correct
37 Correct 27 ms 1372 KB Output is correct
38 Correct 19 ms 1372 KB Output is correct
39 Correct 204 ms 9388 KB Output is correct
40 Correct 26 ms 1372 KB Output is correct
41 Correct 7 ms 2212 KB Output is correct
42 Correct 30 ms 1628 KB Output is correct
43 Correct 15 ms 2392 KB Output is correct
44 Correct 103 ms 5212 KB Output is correct
45 Correct 64 ms 5560 KB Output is correct
46 Correct 208 ms 9636 KB Output is correct
47 Correct 266 ms 9504 KB Output is correct
48 Correct 183 ms 9308 KB Output is correct
49 Correct 50 ms 15000 KB Output is correct
50 Correct 50 ms 15096 KB Output is correct
51 Correct 299 ms 9748 KB Output is correct
52 Correct 282 ms 9564 KB Output is correct
53 Correct 205 ms 9508 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 344 KB Output is correct
61 Correct 1 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 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 1 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 0 ms 468 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 344 KB Output is correct
72 Correct 1 ms 344 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 1 ms 344 KB Output is correct
75 Correct 0 ms 348 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 600 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 0 ms 348 KB Output is correct
81 Correct 0 ms 652 KB Output is correct
82 Correct 0 ms 464 KB Output is correct
83 Correct 0 ms 348 KB Output is correct
84 Correct 0 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 348 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 0 ms 348 KB Output is correct
91 Correct 0 ms 348 KB Output is correct
92 Correct 0 ms 348 KB Output is correct
93 Correct 1 ms 348 KB Output is correct
94 Correct 1 ms 348 KB Output is correct
95 Correct 1 ms 348 KB Output is correct
96 Correct 1 ms 456 KB Output is correct
97 Correct 0 ms 464 KB Output is correct
98 Correct 1 ms 348 KB Output is correct
99 Correct 1 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 0 ms 348 KB Output is correct
104 Correct 0 ms 348 KB Output is correct
105 Correct 0 ms 348 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 1 ms 348 KB Output is correct
108 Correct 0 ms 456 KB Output is correct
109 Correct 1 ms 348 KB Output is correct
110 Correct 8 ms 736 KB Output is correct
111 Correct 18 ms 1628 KB Output is correct
112 Correct 7 ms 860 KB Output is correct
113 Correct 121 ms 1624 KB Output is correct
114 Correct 122 ms 1628 KB Output is correct
115 Correct 114 ms 1624 KB Output is correct
116 Correct 42 ms 1108 KB Output is correct
117 Correct 11 ms 860 KB Output is correct
118 Correct 11 ms 860 KB Output is correct
119 Correct 121 ms 2760 KB Output is correct
120 Correct 17 ms 1372 KB Output is correct
121 Correct 465 ms 5840 KB Output is correct
122 Correct 467 ms 5328 KB Output is correct
123 Correct 443 ms 4560 KB Output is correct
124 Correct 288 ms 10044 KB Output is correct
125 Correct 1501 ms 33764 KB Output is correct
126 Correct 209 ms 9680 KB Output is correct
127 Execution timed out 2067 ms 34340 KB Time limit exceeded
128 Halted 0 ms 0 KB -