답안 #936593

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
936593 2024-03-02T09:34:04 Z penguin133 Maze (JOI23_ho_t3) C++17
27 / 100
2000 ms 1217672 KB
#include <bits/stdc++.h>
using namespace std;

//#define int long long
#define pi pair<int, int>
#define pii pair<int, pi>
#define fi first
#define se second
#ifdef _WIN32
#define getchar_unlocked _getchar_nolock
#endif
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

vector <pi> adj[10000005];
int cnt, n, q;
struct node{
	int s, e, m;
	int nd, nd2;
	node *l, *r;
	node(int _s, int _e){
		s = _s, e = _e, m = (s + e) >> 1;
		nd = cnt++;
		nd2 = cnt++;
		if(s == e){
			adj[s].push_back({nd2, 0});
			adj[nd].push_back({s, 0});
		}
		else{
			l = new node(s, m);
			r = new node(m+1, e);
			adj[nd].push_back({l->nd, 0});
			adj[nd].push_back({r->nd, 0});
			adj[r->nd2].push_back({nd2, 0});
			adj[l->nd2].push_back({nd2, 0});
		}
	}
	
	void upd(int a, int b, int u, int v){
		if(s == a && b == e){
			adj[u].push_back({nd, v});
			return;
		}
		if(b <= m)l->upd(a, b, u, v);
		else if(a > m)r->upd(a, b, u, v);
		else l->upd(a, m, u, v), r->upd(m+1, b, u, v);
	}
	
	void upd2(int a, int b, int u, int v){
		if(s == a && b == e){
			adj[nd2].push_back({u, v});
			return;
		}
		if(b <= m)l->upd2(a, b, u, v);
		else if(a > m)r->upd2(a, b, u, v);
		else l->upd2(a, m, u, v), r->upd2(m+1, b, u, v);
	}
	
}*root;

char A[6000005]; int r, c;
inline int conv(int x, int y){
	return (x - 1) * c + y;
}

int dist[10000005];

void solve(){
	cin >> r >> c >> n;
	int a, b, cc, d; cin >> a >> b >> cc >> d;
	
	cnt = r * c + 1;
	root = new node(1, r * c);
	if(r > c){
		for(int i = 1; i <= r; i++){
			for(int j = 1; j <= c; j++)cin >> A[conv(j, i)];
		}
		swap(r, c);
	}
	else for(int i = 1; i <= r; i++)for(int j = 1; j <= c; j++)cin >> A[conv(i, j)];
	for(int i = 1; i <= r * c; i++){
		if(i > c && A[i - c] == '.')adj[i].push_back({i - c, 0});
		if(i <= c * (r - 1) && A[i + c] == '.')adj[i].push_back({i + c, 0});
		if(i % c != 1 && A[i - 1] == '.')adj[i].push_back({i - 1, 0});
		if(i % c && A[i + 1] == '.')adj[i].push_back({i + 1, 0});
		int aaa = (i - 1) / c + 1, bbb = (i - 1) % c + 1;
		for(int j = max(-n, -aaa + 1); j <= min(n, r - aaa); j++){
			if((i - 1) / c + 1 + j <= 0 || (i - 1) / c + 1 + j > r)continue;
			if(j == -n || j == n){
				int lft = max(1, bbb - n + 1);
				int rgt = min(c, bbb + n - 1);
				root->upd(conv(aaa + j, lft), conv(aaa + j, rgt), i, 1);
			}
			else{
				int lft = max(1, bbb - n);
				int rgt = min(c, bbb + n);
				root->upd(conv(aaa + j, lft), conv(aaa + j, rgt), i, 1);
			}
		}
	}
	for(int i = 1; i <= cnt; i++)dist[i] = 2e9;
	dist[conv(a, b)] = 0;
	//for(auto [i, j] : adj[conv(a, b)])cout << i << ' ' << j << '\n';
	deque <int> dq;
	dq.push_back(conv(a, b));
	while(!dq.empty()){
		int x = dq.front(); dq.pop_front();
		for(auto [i, j] : adj[x]){
			if(dist[i] > dist[x] + j){
				dist[i] = dist[x] + j;
				if(j)dq.push_back(i);
				else dq.push_front(i);
			}
		}
	}
	//for(int i = 1; i <= cnt; i++)cout << dist[i] << ' ';
	cout << dist[conv(cc, d)];
}

main(){
	ios::sync_with_stdio(0);cin.tie(0);
	int tc = 1;
	//cin >> tc;
	for(int tc1=1;tc1<=tc;tc1++){
		// cout << "Case #" << tc1 << ": ";
		solve();
	}
}

Compilation message

Main.cpp:119:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
  119 | main(){
      | ^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 85 ms 239184 KB Output is correct
2 Correct 56 ms 238932 KB Output is correct
3 Correct 57 ms 239184 KB Output is correct
4 Correct 58 ms 239476 KB Output is correct
5 Correct 57 ms 239412 KB Output is correct
6 Correct 56 ms 239276 KB Output is correct
7 Correct 56 ms 239360 KB Output is correct
8 Correct 60 ms 239192 KB Output is correct
9 Correct 56 ms 238932 KB Output is correct
10 Correct 56 ms 238920 KB Output is correct
11 Correct 56 ms 239192 KB Output is correct
12 Correct 60 ms 238836 KB Output is correct
13 Correct 55 ms 239112 KB Output is correct
14 Correct 56 ms 239036 KB Output is correct
15 Correct 57 ms 238932 KB Output is correct
16 Correct 56 ms 239332 KB Output is correct
17 Correct 58 ms 239188 KB Output is correct
18 Correct 57 ms 239188 KB Output is correct
19 Correct 110 ms 262740 KB Output is correct
20 Correct 85 ms 256560 KB Output is correct
21 Correct 113 ms 266568 KB Output is correct
22 Correct 116 ms 262992 KB Output is correct
23 Correct 113 ms 262924 KB Output is correct
24 Correct 97 ms 262740 KB Output is correct
25 Correct 94 ms 260844 KB Output is correct
26 Correct 120 ms 263248 KB Output is correct
27 Correct 127 ms 263252 KB Output is correct
28 Correct 110 ms 262736 KB Output is correct
29 Correct 197 ms 294224 KB Output is correct
30 Correct 108 ms 263072 KB Output is correct
31 Correct 208 ms 303612 KB Output is correct
32 Correct 209 ms 295248 KB Output is correct
33 Correct 199 ms 294112 KB Output is correct
34 Correct 159 ms 293976 KB Output is correct
35 Correct 159 ms 289108 KB Output is correct
36 Correct 223 ms 295764 KB Output is correct
37 Correct 243 ms 295088 KB Output is correct
38 Correct 211 ms 294232 KB Output is correct
39 Correct 1589 ms 755572 KB Output is correct
40 Correct 223 ms 302300 KB Output is correct
41 Correct 188 ms 303732 KB Output is correct
42 Correct 273 ms 315304 KB Output is correct
43 Correct 265 ms 324448 KB Output is correct
44 Correct 763 ms 507604 KB Output is correct
45 Correct 775 ms 513940 KB Output is correct
46 Correct 1485 ms 841724 KB Output is correct
47 Correct 1596 ms 770640 KB Output is correct
48 Correct 1581 ms 753056 KB Output is correct
49 Correct 1103 ms 752368 KB Output is correct
50 Correct 1086 ms 699288 KB Output is correct
51 Correct 1756 ms 777408 KB Output is correct
52 Correct 1761 ms 771060 KB Output is correct
53 Correct 1514 ms 753168 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 238932 KB Output is correct
2 Correct 55 ms 238852 KB Output is correct
3 Correct 55 ms 239064 KB Output is correct
4 Correct 57 ms 239068 KB Output is correct
5 Correct 55 ms 239188 KB Output is correct
6 Correct 56 ms 239076 KB Output is correct
7 Correct 55 ms 238928 KB Output is correct
8 Correct 55 ms 238928 KB Output is correct
9 Correct 55 ms 239344 KB Output is correct
10 Correct 57 ms 239404 KB Output is correct
11 Correct 55 ms 239276 KB Output is correct
12 Correct 63 ms 241344 KB Output is correct
13 Correct 62 ms 241492 KB Output is correct
14 Correct 58 ms 241232 KB Output is correct
15 Correct 56 ms 239188 KB Output is correct
16 Correct 57 ms 239196 KB Output is correct
17 Correct 56 ms 239188 KB Output is correct
18 Correct 55 ms 238928 KB Output is correct
19 Correct 63 ms 239700 KB Output is correct
20 Correct 55 ms 238932 KB Output is correct
21 Correct 55 ms 238932 KB Output is correct
22 Correct 57 ms 239188 KB Output is correct
23 Correct 56 ms 238928 KB Output is correct
24 Correct 59 ms 239084 KB Output is correct
25 Correct 58 ms 239188 KB Output is correct
26 Correct 57 ms 239044 KB Output is correct
27 Correct 56 ms 238928 KB Output is correct
28 Correct 58 ms 239184 KB Output is correct
29 Correct 55 ms 238936 KB Output is correct
30 Correct 56 ms 239424 KB Output is correct
31 Correct 56 ms 239396 KB Output is correct
32 Correct 57 ms 239420 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 239076 KB Output is correct
2 Correct 55 ms 238928 KB Output is correct
3 Correct 55 ms 238936 KB Output is correct
4 Correct 57 ms 239068 KB Output is correct
5 Correct 56 ms 238928 KB Output is correct
6 Correct 55 ms 238892 KB Output is correct
7 Correct 55 ms 239472 KB Output is correct
8 Correct 62 ms 239224 KB Output is correct
9 Correct 58 ms 241236 KB Output is correct
10 Correct 57 ms 241236 KB Output is correct
11 Correct 58 ms 241216 KB Output is correct
12 Correct 56 ms 239196 KB Output is correct
13 Correct 55 ms 238928 KB Output is correct
14 Correct 55 ms 239496 KB Output is correct
15 Correct 54 ms 239076 KB Output is correct
16 Correct 56 ms 239228 KB Output is correct
17 Correct 56 ms 239172 KB Output is correct
18 Correct 54 ms 238928 KB Output is correct
19 Correct 54 ms 238940 KB Output is correct
20 Correct 55 ms 238928 KB Output is correct
21 Correct 56 ms 239188 KB Output is correct
22 Correct 55 ms 239184 KB Output is correct
23 Correct 54 ms 239188 KB Output is correct
24 Correct 69 ms 243388 KB Output is correct
25 Correct 121 ms 262736 KB Output is correct
26 Correct 179 ms 283512 KB Output is correct
27 Correct 112 ms 266564 KB Output is correct
28 Execution timed out 2102 ms 1217536 KB Time limit exceeded
29 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 238932 KB Output is correct
2 Correct 55 ms 238852 KB Output is correct
3 Correct 55 ms 239064 KB Output is correct
4 Correct 57 ms 239068 KB Output is correct
5 Correct 55 ms 239188 KB Output is correct
6 Correct 56 ms 239076 KB Output is correct
7 Correct 55 ms 238928 KB Output is correct
8 Correct 55 ms 238928 KB Output is correct
9 Correct 55 ms 239344 KB Output is correct
10 Correct 57 ms 239404 KB Output is correct
11 Correct 55 ms 239276 KB Output is correct
12 Correct 63 ms 241344 KB Output is correct
13 Correct 62 ms 241492 KB Output is correct
14 Correct 58 ms 241232 KB Output is correct
15 Correct 56 ms 239188 KB Output is correct
16 Correct 57 ms 239196 KB Output is correct
17 Correct 56 ms 239188 KB Output is correct
18 Correct 55 ms 238928 KB Output is correct
19 Correct 63 ms 239700 KB Output is correct
20 Correct 55 ms 238932 KB Output is correct
21 Correct 55 ms 238932 KB Output is correct
22 Correct 57 ms 239188 KB Output is correct
23 Correct 56 ms 238928 KB Output is correct
24 Correct 59 ms 239084 KB Output is correct
25 Correct 58 ms 239188 KB Output is correct
26 Correct 57 ms 239044 KB Output is correct
27 Correct 56 ms 238928 KB Output is correct
28 Correct 58 ms 239184 KB Output is correct
29 Correct 55 ms 238936 KB Output is correct
30 Correct 56 ms 239424 KB Output is correct
31 Correct 56 ms 239396 KB Output is correct
32 Correct 57 ms 239420 KB Output is correct
33 Correct 116 ms 262740 KB Output is correct
34 Correct 66 ms 243180 KB Output is correct
35 Correct 63 ms 240464 KB Output is correct
36 Correct 117 ms 262488 KB Output is correct
37 Correct 89 ms 256340 KB Output is correct
38 Correct 209 ms 283564 KB Output is correct
39 Correct 113 ms 266736 KB Output is correct
40 Correct 112 ms 263000 KB Output is correct
41 Correct 114 ms 262676 KB Output is correct
42 Execution timed out 2090 ms 1217672 KB Time limit exceeded
43 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 238932 KB Output is correct
2 Correct 55 ms 238852 KB Output is correct
3 Correct 55 ms 239064 KB Output is correct
4 Correct 57 ms 239068 KB Output is correct
5 Correct 55 ms 239188 KB Output is correct
6 Correct 56 ms 239076 KB Output is correct
7 Correct 55 ms 238928 KB Output is correct
8 Correct 55 ms 238928 KB Output is correct
9 Correct 55 ms 239344 KB Output is correct
10 Correct 57 ms 239404 KB Output is correct
11 Correct 55 ms 239276 KB Output is correct
12 Correct 63 ms 241344 KB Output is correct
13 Correct 62 ms 241492 KB Output is correct
14 Correct 58 ms 241232 KB Output is correct
15 Correct 56 ms 239188 KB Output is correct
16 Correct 57 ms 239196 KB Output is correct
17 Correct 56 ms 239188 KB Output is correct
18 Correct 55 ms 238928 KB Output is correct
19 Correct 63 ms 239700 KB Output is correct
20 Correct 55 ms 238932 KB Output is correct
21 Correct 55 ms 238932 KB Output is correct
22 Correct 57 ms 239188 KB Output is correct
23 Correct 56 ms 238928 KB Output is correct
24 Correct 59 ms 239084 KB Output is correct
25 Correct 58 ms 239188 KB Output is correct
26 Correct 57 ms 239044 KB Output is correct
27 Correct 56 ms 238928 KB Output is correct
28 Correct 58 ms 239184 KB Output is correct
29 Correct 55 ms 238936 KB Output is correct
30 Correct 56 ms 239424 KB Output is correct
31 Correct 56 ms 239396 KB Output is correct
32 Correct 57 ms 239420 KB Output is correct
33 Correct 116 ms 262740 KB Output is correct
34 Correct 66 ms 243180 KB Output is correct
35 Correct 63 ms 240464 KB Output is correct
36 Correct 117 ms 262488 KB Output is correct
37 Correct 89 ms 256340 KB Output is correct
38 Correct 209 ms 283564 KB Output is correct
39 Correct 113 ms 266736 KB Output is correct
40 Correct 112 ms 263000 KB Output is correct
41 Correct 114 ms 262676 KB Output is correct
42 Execution timed out 2090 ms 1217672 KB Time limit exceeded
43 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 85 ms 239184 KB Output is correct
2 Correct 56 ms 238932 KB Output is correct
3 Correct 57 ms 239184 KB Output is correct
4 Correct 58 ms 239476 KB Output is correct
5 Correct 57 ms 239412 KB Output is correct
6 Correct 56 ms 239276 KB Output is correct
7 Correct 56 ms 239360 KB Output is correct
8 Correct 60 ms 239192 KB Output is correct
9 Correct 56 ms 238932 KB Output is correct
10 Correct 56 ms 238920 KB Output is correct
11 Correct 56 ms 239192 KB Output is correct
12 Correct 60 ms 238836 KB Output is correct
13 Correct 55 ms 239112 KB Output is correct
14 Correct 56 ms 239036 KB Output is correct
15 Correct 57 ms 238932 KB Output is correct
16 Correct 56 ms 239332 KB Output is correct
17 Correct 58 ms 239188 KB Output is correct
18 Correct 57 ms 239188 KB Output is correct
19 Correct 110 ms 262740 KB Output is correct
20 Correct 85 ms 256560 KB Output is correct
21 Correct 113 ms 266568 KB Output is correct
22 Correct 116 ms 262992 KB Output is correct
23 Correct 113 ms 262924 KB Output is correct
24 Correct 97 ms 262740 KB Output is correct
25 Correct 94 ms 260844 KB Output is correct
26 Correct 120 ms 263248 KB Output is correct
27 Correct 127 ms 263252 KB Output is correct
28 Correct 110 ms 262736 KB Output is correct
29 Correct 197 ms 294224 KB Output is correct
30 Correct 108 ms 263072 KB Output is correct
31 Correct 208 ms 303612 KB Output is correct
32 Correct 209 ms 295248 KB Output is correct
33 Correct 199 ms 294112 KB Output is correct
34 Correct 159 ms 293976 KB Output is correct
35 Correct 159 ms 289108 KB Output is correct
36 Correct 223 ms 295764 KB Output is correct
37 Correct 243 ms 295088 KB Output is correct
38 Correct 211 ms 294232 KB Output is correct
39 Correct 1589 ms 755572 KB Output is correct
40 Correct 223 ms 302300 KB Output is correct
41 Correct 188 ms 303732 KB Output is correct
42 Correct 273 ms 315304 KB Output is correct
43 Correct 265 ms 324448 KB Output is correct
44 Correct 763 ms 507604 KB Output is correct
45 Correct 775 ms 513940 KB Output is correct
46 Correct 1485 ms 841724 KB Output is correct
47 Correct 1596 ms 770640 KB Output is correct
48 Correct 1581 ms 753056 KB Output is correct
49 Correct 1103 ms 752368 KB Output is correct
50 Correct 1086 ms 699288 KB Output is correct
51 Correct 1756 ms 777408 KB Output is correct
52 Correct 1761 ms 771060 KB Output is correct
53 Correct 1514 ms 753168 KB Output is correct
54 Correct 55 ms 238932 KB Output is correct
55 Correct 55 ms 238852 KB Output is correct
56 Correct 55 ms 239064 KB Output is correct
57 Correct 57 ms 239068 KB Output is correct
58 Correct 55 ms 239188 KB Output is correct
59 Correct 56 ms 239076 KB Output is correct
60 Correct 55 ms 238928 KB Output is correct
61 Correct 55 ms 238928 KB Output is correct
62 Correct 55 ms 239344 KB Output is correct
63 Correct 57 ms 239404 KB Output is correct
64 Correct 55 ms 239276 KB Output is correct
65 Correct 63 ms 241344 KB Output is correct
66 Correct 62 ms 241492 KB Output is correct
67 Correct 58 ms 241232 KB Output is correct
68 Correct 56 ms 239188 KB Output is correct
69 Correct 57 ms 239196 KB Output is correct
70 Correct 56 ms 239188 KB Output is correct
71 Correct 55 ms 238928 KB Output is correct
72 Correct 63 ms 239700 KB Output is correct
73 Correct 55 ms 238932 KB Output is correct
74 Correct 55 ms 238932 KB Output is correct
75 Correct 57 ms 239188 KB Output is correct
76 Correct 56 ms 238928 KB Output is correct
77 Correct 59 ms 239084 KB Output is correct
78 Correct 58 ms 239188 KB Output is correct
79 Correct 57 ms 239044 KB Output is correct
80 Correct 56 ms 238928 KB Output is correct
81 Correct 58 ms 239184 KB Output is correct
82 Correct 55 ms 238936 KB Output is correct
83 Correct 56 ms 239424 KB Output is correct
84 Correct 56 ms 239396 KB Output is correct
85 Correct 57 ms 239420 KB Output is correct
86 Correct 55 ms 239076 KB Output is correct
87 Correct 55 ms 238928 KB Output is correct
88 Correct 55 ms 238936 KB Output is correct
89 Correct 57 ms 239068 KB Output is correct
90 Correct 56 ms 238928 KB Output is correct
91 Correct 55 ms 238892 KB Output is correct
92 Correct 55 ms 239472 KB Output is correct
93 Correct 62 ms 239224 KB Output is correct
94 Correct 58 ms 241236 KB Output is correct
95 Correct 57 ms 241236 KB Output is correct
96 Correct 58 ms 241216 KB Output is correct
97 Correct 56 ms 239196 KB Output is correct
98 Correct 55 ms 238928 KB Output is correct
99 Correct 55 ms 239496 KB Output is correct
100 Correct 54 ms 239076 KB Output is correct
101 Correct 56 ms 239228 KB Output is correct
102 Correct 56 ms 239172 KB Output is correct
103 Correct 54 ms 238928 KB Output is correct
104 Correct 54 ms 238940 KB Output is correct
105 Correct 55 ms 238928 KB Output is correct
106 Correct 56 ms 239188 KB Output is correct
107 Correct 55 ms 239184 KB Output is correct
108 Correct 54 ms 239188 KB Output is correct
109 Correct 69 ms 243388 KB Output is correct
110 Correct 121 ms 262736 KB Output is correct
111 Correct 179 ms 283512 KB Output is correct
112 Correct 112 ms 266564 KB Output is correct
113 Execution timed out 2102 ms 1217536 KB Time limit exceeded
114 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 85 ms 239184 KB Output is correct
2 Correct 56 ms 238932 KB Output is correct
3 Correct 57 ms 239184 KB Output is correct
4 Correct 58 ms 239476 KB Output is correct
5 Correct 57 ms 239412 KB Output is correct
6 Correct 56 ms 239276 KB Output is correct
7 Correct 56 ms 239360 KB Output is correct
8 Correct 60 ms 239192 KB Output is correct
9 Correct 56 ms 238932 KB Output is correct
10 Correct 56 ms 238920 KB Output is correct
11 Correct 56 ms 239192 KB Output is correct
12 Correct 60 ms 238836 KB Output is correct
13 Correct 55 ms 239112 KB Output is correct
14 Correct 56 ms 239036 KB Output is correct
15 Correct 57 ms 238932 KB Output is correct
16 Correct 56 ms 239332 KB Output is correct
17 Correct 58 ms 239188 KB Output is correct
18 Correct 57 ms 239188 KB Output is correct
19 Correct 110 ms 262740 KB Output is correct
20 Correct 85 ms 256560 KB Output is correct
21 Correct 113 ms 266568 KB Output is correct
22 Correct 116 ms 262992 KB Output is correct
23 Correct 113 ms 262924 KB Output is correct
24 Correct 97 ms 262740 KB Output is correct
25 Correct 94 ms 260844 KB Output is correct
26 Correct 120 ms 263248 KB Output is correct
27 Correct 127 ms 263252 KB Output is correct
28 Correct 110 ms 262736 KB Output is correct
29 Correct 197 ms 294224 KB Output is correct
30 Correct 108 ms 263072 KB Output is correct
31 Correct 208 ms 303612 KB Output is correct
32 Correct 209 ms 295248 KB Output is correct
33 Correct 199 ms 294112 KB Output is correct
34 Correct 159 ms 293976 KB Output is correct
35 Correct 159 ms 289108 KB Output is correct
36 Correct 223 ms 295764 KB Output is correct
37 Correct 243 ms 295088 KB Output is correct
38 Correct 211 ms 294232 KB Output is correct
39 Correct 1589 ms 755572 KB Output is correct
40 Correct 223 ms 302300 KB Output is correct
41 Correct 188 ms 303732 KB Output is correct
42 Correct 273 ms 315304 KB Output is correct
43 Correct 265 ms 324448 KB Output is correct
44 Correct 763 ms 507604 KB Output is correct
45 Correct 775 ms 513940 KB Output is correct
46 Correct 1485 ms 841724 KB Output is correct
47 Correct 1596 ms 770640 KB Output is correct
48 Correct 1581 ms 753056 KB Output is correct
49 Correct 1103 ms 752368 KB Output is correct
50 Correct 1086 ms 699288 KB Output is correct
51 Correct 1756 ms 777408 KB Output is correct
52 Correct 1761 ms 771060 KB Output is correct
53 Correct 1514 ms 753168 KB Output is correct
54 Correct 55 ms 238932 KB Output is correct
55 Correct 55 ms 238852 KB Output is correct
56 Correct 55 ms 239064 KB Output is correct
57 Correct 57 ms 239068 KB Output is correct
58 Correct 55 ms 239188 KB Output is correct
59 Correct 56 ms 239076 KB Output is correct
60 Correct 55 ms 238928 KB Output is correct
61 Correct 55 ms 238928 KB Output is correct
62 Correct 55 ms 239344 KB Output is correct
63 Correct 57 ms 239404 KB Output is correct
64 Correct 55 ms 239276 KB Output is correct
65 Correct 63 ms 241344 KB Output is correct
66 Correct 62 ms 241492 KB Output is correct
67 Correct 58 ms 241232 KB Output is correct
68 Correct 56 ms 239188 KB Output is correct
69 Correct 57 ms 239196 KB Output is correct
70 Correct 56 ms 239188 KB Output is correct
71 Correct 55 ms 238928 KB Output is correct
72 Correct 63 ms 239700 KB Output is correct
73 Correct 55 ms 238932 KB Output is correct
74 Correct 55 ms 238932 KB Output is correct
75 Correct 57 ms 239188 KB Output is correct
76 Correct 56 ms 238928 KB Output is correct
77 Correct 59 ms 239084 KB Output is correct
78 Correct 58 ms 239188 KB Output is correct
79 Correct 57 ms 239044 KB Output is correct
80 Correct 56 ms 238928 KB Output is correct
81 Correct 58 ms 239184 KB Output is correct
82 Correct 55 ms 238936 KB Output is correct
83 Correct 56 ms 239424 KB Output is correct
84 Correct 56 ms 239396 KB Output is correct
85 Correct 57 ms 239420 KB Output is correct
86 Correct 55 ms 239076 KB Output is correct
87 Correct 55 ms 238928 KB Output is correct
88 Correct 55 ms 238936 KB Output is correct
89 Correct 57 ms 239068 KB Output is correct
90 Correct 56 ms 238928 KB Output is correct
91 Correct 55 ms 238892 KB Output is correct
92 Correct 55 ms 239472 KB Output is correct
93 Correct 62 ms 239224 KB Output is correct
94 Correct 58 ms 241236 KB Output is correct
95 Correct 57 ms 241236 KB Output is correct
96 Correct 58 ms 241216 KB Output is correct
97 Correct 56 ms 239196 KB Output is correct
98 Correct 55 ms 238928 KB Output is correct
99 Correct 55 ms 239496 KB Output is correct
100 Correct 54 ms 239076 KB Output is correct
101 Correct 56 ms 239228 KB Output is correct
102 Correct 56 ms 239172 KB Output is correct
103 Correct 54 ms 238928 KB Output is correct
104 Correct 54 ms 238940 KB Output is correct
105 Correct 55 ms 238928 KB Output is correct
106 Correct 56 ms 239188 KB Output is correct
107 Correct 55 ms 239184 KB Output is correct
108 Correct 54 ms 239188 KB Output is correct
109 Correct 69 ms 243388 KB Output is correct
110 Correct 121 ms 262736 KB Output is correct
111 Correct 179 ms 283512 KB Output is correct
112 Correct 112 ms 266564 KB Output is correct
113 Execution timed out 2102 ms 1217536 KB Time limit exceeded
114 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 85 ms 239184 KB Output is correct
2 Correct 56 ms 238932 KB Output is correct
3 Correct 57 ms 239184 KB Output is correct
4 Correct 58 ms 239476 KB Output is correct
5 Correct 57 ms 239412 KB Output is correct
6 Correct 56 ms 239276 KB Output is correct
7 Correct 56 ms 239360 KB Output is correct
8 Correct 60 ms 239192 KB Output is correct
9 Correct 56 ms 238932 KB Output is correct
10 Correct 56 ms 238920 KB Output is correct
11 Correct 56 ms 239192 KB Output is correct
12 Correct 60 ms 238836 KB Output is correct
13 Correct 55 ms 239112 KB Output is correct
14 Correct 56 ms 239036 KB Output is correct
15 Correct 57 ms 238932 KB Output is correct
16 Correct 56 ms 239332 KB Output is correct
17 Correct 58 ms 239188 KB Output is correct
18 Correct 57 ms 239188 KB Output is correct
19 Correct 110 ms 262740 KB Output is correct
20 Correct 85 ms 256560 KB Output is correct
21 Correct 113 ms 266568 KB Output is correct
22 Correct 116 ms 262992 KB Output is correct
23 Correct 113 ms 262924 KB Output is correct
24 Correct 97 ms 262740 KB Output is correct
25 Correct 94 ms 260844 KB Output is correct
26 Correct 120 ms 263248 KB Output is correct
27 Correct 127 ms 263252 KB Output is correct
28 Correct 110 ms 262736 KB Output is correct
29 Correct 197 ms 294224 KB Output is correct
30 Correct 108 ms 263072 KB Output is correct
31 Correct 208 ms 303612 KB Output is correct
32 Correct 209 ms 295248 KB Output is correct
33 Correct 199 ms 294112 KB Output is correct
34 Correct 159 ms 293976 KB Output is correct
35 Correct 159 ms 289108 KB Output is correct
36 Correct 223 ms 295764 KB Output is correct
37 Correct 243 ms 295088 KB Output is correct
38 Correct 211 ms 294232 KB Output is correct
39 Correct 1589 ms 755572 KB Output is correct
40 Correct 223 ms 302300 KB Output is correct
41 Correct 188 ms 303732 KB Output is correct
42 Correct 273 ms 315304 KB Output is correct
43 Correct 265 ms 324448 KB Output is correct
44 Correct 763 ms 507604 KB Output is correct
45 Correct 775 ms 513940 KB Output is correct
46 Correct 1485 ms 841724 KB Output is correct
47 Correct 1596 ms 770640 KB Output is correct
48 Correct 1581 ms 753056 KB Output is correct
49 Correct 1103 ms 752368 KB Output is correct
50 Correct 1086 ms 699288 KB Output is correct
51 Correct 1756 ms 777408 KB Output is correct
52 Correct 1761 ms 771060 KB Output is correct
53 Correct 1514 ms 753168 KB Output is correct
54 Correct 55 ms 238932 KB Output is correct
55 Correct 55 ms 238852 KB Output is correct
56 Correct 55 ms 239064 KB Output is correct
57 Correct 57 ms 239068 KB Output is correct
58 Correct 55 ms 239188 KB Output is correct
59 Correct 56 ms 239076 KB Output is correct
60 Correct 55 ms 238928 KB Output is correct
61 Correct 55 ms 238928 KB Output is correct
62 Correct 55 ms 239344 KB Output is correct
63 Correct 57 ms 239404 KB Output is correct
64 Correct 55 ms 239276 KB Output is correct
65 Correct 63 ms 241344 KB Output is correct
66 Correct 62 ms 241492 KB Output is correct
67 Correct 58 ms 241232 KB Output is correct
68 Correct 56 ms 239188 KB Output is correct
69 Correct 57 ms 239196 KB Output is correct
70 Correct 56 ms 239188 KB Output is correct
71 Correct 55 ms 238928 KB Output is correct
72 Correct 63 ms 239700 KB Output is correct
73 Correct 55 ms 238932 KB Output is correct
74 Correct 55 ms 238932 KB Output is correct
75 Correct 57 ms 239188 KB Output is correct
76 Correct 56 ms 238928 KB Output is correct
77 Correct 59 ms 239084 KB Output is correct
78 Correct 58 ms 239188 KB Output is correct
79 Correct 57 ms 239044 KB Output is correct
80 Correct 56 ms 238928 KB Output is correct
81 Correct 58 ms 239184 KB Output is correct
82 Correct 55 ms 238936 KB Output is correct
83 Correct 56 ms 239424 KB Output is correct
84 Correct 56 ms 239396 KB Output is correct
85 Correct 57 ms 239420 KB Output is correct
86 Correct 55 ms 239076 KB Output is correct
87 Correct 55 ms 238928 KB Output is correct
88 Correct 55 ms 238936 KB Output is correct
89 Correct 57 ms 239068 KB Output is correct
90 Correct 56 ms 238928 KB Output is correct
91 Correct 55 ms 238892 KB Output is correct
92 Correct 55 ms 239472 KB Output is correct
93 Correct 62 ms 239224 KB Output is correct
94 Correct 58 ms 241236 KB Output is correct
95 Correct 57 ms 241236 KB Output is correct
96 Correct 58 ms 241216 KB Output is correct
97 Correct 56 ms 239196 KB Output is correct
98 Correct 55 ms 238928 KB Output is correct
99 Correct 55 ms 239496 KB Output is correct
100 Correct 54 ms 239076 KB Output is correct
101 Correct 56 ms 239228 KB Output is correct
102 Correct 56 ms 239172 KB Output is correct
103 Correct 54 ms 238928 KB Output is correct
104 Correct 54 ms 238940 KB Output is correct
105 Correct 55 ms 238928 KB Output is correct
106 Correct 56 ms 239188 KB Output is correct
107 Correct 55 ms 239184 KB Output is correct
108 Correct 54 ms 239188 KB Output is correct
109 Correct 69 ms 243388 KB Output is correct
110 Correct 121 ms 262736 KB Output is correct
111 Correct 179 ms 283512 KB Output is correct
112 Correct 112 ms 266564 KB Output is correct
113 Execution timed out 2102 ms 1217536 KB Time limit exceeded
114 Halted 0 ms 0 KB -