답안 #573948

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
573948 2022-06-07T12:59:10 Z WongChun1234 화성 (APIO22_mars) C++17
100 / 100
1278 ms 5356 KB
#include "mars.h"
#include<bits/stdc++.h>
using namespace std;

const bool DEBUG=0;

bool board[50][50];
int clr[50][50];
vector<pair<int,int>> adj[50][50];

int X,Y,N,dx[4]={0,0,-1,1},dy[4]={-1,1,0,0};

bool ok(int x,int y){
	return (x>=X&&x<=2*N&&y>=Y&&y<=2*N);
}

void dfs(int x,int y,int pt){
	clr[x][y]=pt;
	if (DEBUG) cerr<<"dfs"<<x<<","<<y<<":"<<pt<<"\n";
	for (int i=0;i<4;i++){
		if (!ok(x+dx[i],y+dy[i])) continue;
		if (clr[x+dx[i]][y+dy[i]]) continue;
		if (!board[x+dx[i]][y+dy[i]]) continue;
		dfs(x+dx[i],y+dy[i],pt);
	}
	for (auto i:adj[x][y]){
		if (clr[i.first][i.second]) continue;
		dfs(i.first,i.second,pt);
	}
}

string process(vector <vector<string>> a, int x, int y, int k, int n)
{
	string ret(100,'0');
	bool lbord=(x==2*(n-k-1)),rbord=(y==2*(n-k-1));
	memset(board,0,sizeof(board));
	X=x; Y=y; N=n;
	if (lbord&&rbord){
		//corner cell
		for (int i=0;i<=2;i++) for (int j=0;j<=2;j++) board[x+i][y+j]=a[i][j][0]=='1';
		for (int i=0;i<=1;i++) for (int dy=0,j=y+2;j<=2*n;j++,dy++) board[x+i][j]=(a[i][2][dy]=='1');
		for (int i=0;i<=1;i++) for (int dy=0,j=x+2;j<=2*n;j++,dy++) board[j][y+i]=(a[2][i][dy]=='1');
		for (int dy=51,j=y+3;j<=2*n;j++,dy++) board[x+2][j]=(a[1][2][dy]=='1');
		for (int dx=51,i=x+3;i<=2*n;i++,dx++) board[i][y+2]=(a[2][1][dx]=='1');
		ret[0]=a[0][0][0];
		vector<pair<int,int>> coord,stk;
		coord.clear(); stk.clear();
		for (int i=0;i<50;i++) for (int j=0;j<50;j++) adj[i][j].clear();
		for (int i=2*n;i>=x+2;i--) if (board[i][y+2]&&!board[i+1][y+2]) coord.push_back({i,y+2});
		for (int j=x+3;j<=2*n;j++) if (board[x+2][j]&&!board[x+2][j-1]) coord.push_back({x+2,j});
		for (int i=11,dx=0;dx<coord.size();i+=2,dx++){
			if (a[2][2][i]=='1'){
				cerr<<stk.back().first<<","<<stk.back().second<<"<->"<<coord[dx].first<<","<<coord[dx].second<<"\n";
				adj[stk.back().first][stk.back().second].push_back(coord[dx]);
				adj[coord[dx].first][coord[dx].second].push_back(stk.back());
				stk.pop_back();
			}
			if (a[2][2][i+1]=='1'){
				stk.push_back(coord[dx]);
			}
		}
		int pt=0,pt2=0,lpos[200],lval=0;
		memset(clr,0,sizeof(clr)); memset(lpos,0,sizeof(lpos));
		for (int i=2*n;i>=x;i--) for (int j=y;j<=2*n;j++){
			if (clr[i][j]) continue;
			if (!board[i][j]) continue;
			++pt;
			dfs(i,j,pt);
		}
		for (int i=2*n;i>=x;i--) if (board[i][y]&&!board[i+1][y]){
			pt2++;
			if (lpos[clr[i][y]]) ret[10+2*lpos[clr[i][y]]]='1',ret[10+2*pt2-1]='1';
			lpos[clr[i][y]]=pt2;
		}
		for (int j=y+1;j<=2*n;j++) if (board[x][j]&&!board[x][j-1]){
			pt2++;
			if (lpos[clr[x][j]]) ret[10+2*lpos[clr[x][j]]]='1',ret[10+2*pt2-1]='1';
			lpos[clr[x][j]]=pt2;
		}
		for (int i=1;i<=10;i++) lval+=(a[2][2][i]=='1')<<(i-1);
		for (int i=1;i<=pt;i++) if ((!lpos[i])||(!x)) lval++;
		for (int i=1;i<=10;i++) ret[i]='0'+((lval>>(i-1))&1);
		if (!x){
			for (int i=0;i<10;i++) ret[i]=ret[i+1];
			for (int i=10;i<100;i++) ret[i]='0';
		}
		if (DEBUG){
			cerr<<x<<" "<<y<<" at turn "<<k<<":"<<lval<<"\n";
			for (int i=0;i<=2*n;i++){
				for (int j=0;j<=2*n;j++) cerr<<board[i][j]<<" ";
				cerr<<"\n";
			}
			for (int i=0;i<=2*n;i++){
				for (int j=0;j<=2*n;j++) cerr<<clr[i][j]<<" ";
				cerr<<"\n";
			}
		}
	}else if (lbord){
		ret[0]=a[0][0][0]; ret[1]=a[1][0][0];
		for (int i=x+2;i<=2*n;i++) ret[i-x]=a[2][0][i-x-2];
		if (y+1==2*(n-k-1)){
			ret[51]=a[1][1][0];
			for (int i=x+2;i<=2*n;i++) ret[i-x+50]=a[2][1][i-x-2];
		}
	}else if (rbord){
		ret[0]=a[0][0][0]; ret[1]=a[0][1][0];
		for (int j=y+2;j<=2*n;j++) ret[j-y]=a[0][2][j-y-2];
		if (x+1==2*(n-k-1)){
			ret[51]=a[1][1][0];
			for (int j=y+2;j<=2*n;j++) ret[j-y+50]=a[1][2][j-y-2];
		}
	}else ret=a[0][0];
	return ret;
}
/*
1
2
1 0 0 1 0
1 1 0 1 0
1 1 0 0 1
0 0 1 0 1
0 0 0 1 0
*/

Compilation message

mars.cpp: In function 'std::string process(std::vector<std::vector<std::__cxx11::basic_string<char> > >, int, int, int, int)':
mars.cpp:51:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   51 |   for (int i=11,dx=0;dx<coord.size();i+=2,dx++){
      |                      ~~^~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 2800 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2744 KB Output is correct
4 Correct 8 ms 2732 KB Output is correct
5 Correct 7 ms 2780 KB Output is correct
6 Correct 8 ms 2932 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 2800 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2744 KB Output is correct
4 Correct 8 ms 2732 KB Output is correct
5 Correct 7 ms 2780 KB Output is correct
6 Correct 8 ms 2932 KB Output is correct
7 Correct 8 ms 2856 KB Output is correct
8 Correct 16 ms 2980 KB Output is correct
9 Correct 16 ms 3004 KB Output is correct
10 Correct 16 ms 2956 KB Output is correct
11 Correct 16 ms 2820 KB Output is correct
12 Correct 16 ms 2984 KB Output is correct
13 Correct 16 ms 2932 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 2800 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2744 KB Output is correct
4 Correct 8 ms 2732 KB Output is correct
5 Correct 7 ms 2780 KB Output is correct
6 Correct 8 ms 2932 KB Output is correct
7 Correct 8 ms 2856 KB Output is correct
8 Correct 16 ms 2980 KB Output is correct
9 Correct 16 ms 3004 KB Output is correct
10 Correct 16 ms 2956 KB Output is correct
11 Correct 16 ms 2820 KB Output is correct
12 Correct 16 ms 2984 KB Output is correct
13 Correct 16 ms 2932 KB Output is correct
14 Correct 30 ms 3020 KB Output is correct
15 Correct 43 ms 3092 KB Output is correct
16 Correct 43 ms 3064 KB Output is correct
17 Correct 43 ms 3052 KB Output is correct
18 Correct 41 ms 3100 KB Output is correct
19 Correct 41 ms 3032 KB Output is correct
20 Correct 40 ms 3084 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 2800 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2744 KB Output is correct
4 Correct 8 ms 2732 KB Output is correct
5 Correct 7 ms 2780 KB Output is correct
6 Correct 8 ms 2932 KB Output is correct
7 Correct 8 ms 2856 KB Output is correct
8 Correct 16 ms 2980 KB Output is correct
9 Correct 16 ms 3004 KB Output is correct
10 Correct 16 ms 2956 KB Output is correct
11 Correct 16 ms 2820 KB Output is correct
12 Correct 16 ms 2984 KB Output is correct
13 Correct 16 ms 2932 KB Output is correct
14 Correct 30 ms 3020 KB Output is correct
15 Correct 43 ms 3092 KB Output is correct
16 Correct 43 ms 3064 KB Output is correct
17 Correct 43 ms 3052 KB Output is correct
18 Correct 41 ms 3100 KB Output is correct
19 Correct 41 ms 3032 KB Output is correct
20 Correct 40 ms 3084 KB Output is correct
21 Correct 65 ms 3224 KB Output is correct
22 Correct 84 ms 3228 KB Output is correct
23 Correct 89 ms 3244 KB Output is correct
24 Correct 85 ms 3260 KB Output is correct
25 Correct 93 ms 3304 KB Output is correct
26 Correct 88 ms 3408 KB Output is correct
27 Correct 84 ms 3196 KB Output is correct
28 Correct 89 ms 3256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 2800 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2744 KB Output is correct
4 Correct 8 ms 2732 KB Output is correct
5 Correct 7 ms 2780 KB Output is correct
6 Correct 8 ms 2932 KB Output is correct
7 Correct 8 ms 2856 KB Output is correct
8 Correct 16 ms 2980 KB Output is correct
9 Correct 16 ms 3004 KB Output is correct
10 Correct 16 ms 2956 KB Output is correct
11 Correct 16 ms 2820 KB Output is correct
12 Correct 16 ms 2984 KB Output is correct
13 Correct 16 ms 2932 KB Output is correct
14 Correct 30 ms 3020 KB Output is correct
15 Correct 43 ms 3092 KB Output is correct
16 Correct 43 ms 3064 KB Output is correct
17 Correct 43 ms 3052 KB Output is correct
18 Correct 41 ms 3100 KB Output is correct
19 Correct 41 ms 3032 KB Output is correct
20 Correct 40 ms 3084 KB Output is correct
21 Correct 65 ms 3224 KB Output is correct
22 Correct 84 ms 3228 KB Output is correct
23 Correct 89 ms 3244 KB Output is correct
24 Correct 85 ms 3260 KB Output is correct
25 Correct 93 ms 3304 KB Output is correct
26 Correct 88 ms 3408 KB Output is correct
27 Correct 84 ms 3196 KB Output is correct
28 Correct 89 ms 3256 KB Output is correct
29 Correct 129 ms 3456 KB Output is correct
30 Correct 164 ms 3456 KB Output is correct
31 Correct 161 ms 3452 KB Output is correct
32 Correct 165 ms 3412 KB Output is correct
33 Correct 170 ms 3404 KB Output is correct
34 Correct 169 ms 3432 KB Output is correct
35 Correct 163 ms 3404 KB Output is correct
36 Correct 163 ms 3448 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 2800 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2744 KB Output is correct
4 Correct 8 ms 2732 KB Output is correct
5 Correct 7 ms 2780 KB Output is correct
6 Correct 8 ms 2932 KB Output is correct
7 Correct 8 ms 2856 KB Output is correct
8 Correct 16 ms 2980 KB Output is correct
9 Correct 16 ms 3004 KB Output is correct
10 Correct 16 ms 2956 KB Output is correct
11 Correct 16 ms 2820 KB Output is correct
12 Correct 16 ms 2984 KB Output is correct
13 Correct 16 ms 2932 KB Output is correct
14 Correct 30 ms 3020 KB Output is correct
15 Correct 43 ms 3092 KB Output is correct
16 Correct 43 ms 3064 KB Output is correct
17 Correct 43 ms 3052 KB Output is correct
18 Correct 41 ms 3100 KB Output is correct
19 Correct 41 ms 3032 KB Output is correct
20 Correct 40 ms 3084 KB Output is correct
21 Correct 65 ms 3224 KB Output is correct
22 Correct 84 ms 3228 KB Output is correct
23 Correct 89 ms 3244 KB Output is correct
24 Correct 85 ms 3260 KB Output is correct
25 Correct 93 ms 3304 KB Output is correct
26 Correct 88 ms 3408 KB Output is correct
27 Correct 84 ms 3196 KB Output is correct
28 Correct 89 ms 3256 KB Output is correct
29 Correct 129 ms 3456 KB Output is correct
30 Correct 164 ms 3456 KB Output is correct
31 Correct 161 ms 3452 KB Output is correct
32 Correct 165 ms 3412 KB Output is correct
33 Correct 170 ms 3404 KB Output is correct
34 Correct 169 ms 3432 KB Output is correct
35 Correct 163 ms 3404 KB Output is correct
36 Correct 163 ms 3448 KB Output is correct
37 Correct 228 ms 3696 KB Output is correct
38 Correct 299 ms 3784 KB Output is correct
39 Correct 277 ms 3776 KB Output is correct
40 Correct 312 ms 3856 KB Output is correct
41 Correct 278 ms 3728 KB Output is correct
42 Correct 298 ms 3776 KB Output is correct
43 Correct 279 ms 3772 KB Output is correct
44 Correct 279 ms 3744 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 2800 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2744 KB Output is correct
4 Correct 8 ms 2732 KB Output is correct
5 Correct 7 ms 2780 KB Output is correct
6 Correct 8 ms 2932 KB Output is correct
7 Correct 8 ms 2856 KB Output is correct
8 Correct 16 ms 2980 KB Output is correct
9 Correct 16 ms 3004 KB Output is correct
10 Correct 16 ms 2956 KB Output is correct
11 Correct 16 ms 2820 KB Output is correct
12 Correct 16 ms 2984 KB Output is correct
13 Correct 16 ms 2932 KB Output is correct
14 Correct 30 ms 3020 KB Output is correct
15 Correct 43 ms 3092 KB Output is correct
16 Correct 43 ms 3064 KB Output is correct
17 Correct 43 ms 3052 KB Output is correct
18 Correct 41 ms 3100 KB Output is correct
19 Correct 41 ms 3032 KB Output is correct
20 Correct 40 ms 3084 KB Output is correct
21 Correct 65 ms 3224 KB Output is correct
22 Correct 84 ms 3228 KB Output is correct
23 Correct 89 ms 3244 KB Output is correct
24 Correct 85 ms 3260 KB Output is correct
25 Correct 93 ms 3304 KB Output is correct
26 Correct 88 ms 3408 KB Output is correct
27 Correct 84 ms 3196 KB Output is correct
28 Correct 89 ms 3256 KB Output is correct
29 Correct 129 ms 3456 KB Output is correct
30 Correct 164 ms 3456 KB Output is correct
31 Correct 161 ms 3452 KB Output is correct
32 Correct 165 ms 3412 KB Output is correct
33 Correct 170 ms 3404 KB Output is correct
34 Correct 169 ms 3432 KB Output is correct
35 Correct 163 ms 3404 KB Output is correct
36 Correct 163 ms 3448 KB Output is correct
37 Correct 228 ms 3696 KB Output is correct
38 Correct 299 ms 3784 KB Output is correct
39 Correct 277 ms 3776 KB Output is correct
40 Correct 312 ms 3856 KB Output is correct
41 Correct 278 ms 3728 KB Output is correct
42 Correct 298 ms 3776 KB Output is correct
43 Correct 279 ms 3772 KB Output is correct
44 Correct 279 ms 3744 KB Output is correct
45 Correct 371 ms 3960 KB Output is correct
46 Correct 437 ms 4136 KB Output is correct
47 Correct 431 ms 3920 KB Output is correct
48 Correct 431 ms 4036 KB Output is correct
49 Correct 465 ms 4184 KB Output is correct
50 Correct 433 ms 3936 KB Output is correct
51 Correct 459 ms 3928 KB Output is correct
52 Correct 446 ms 4000 KB Output is correct
53 Correct 447 ms 3972 KB Output is correct
54 Correct 428 ms 4012 KB Output is correct
55 Correct 452 ms 3960 KB Output is correct
56 Correct 444 ms 3984 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 2800 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2744 KB Output is correct
4 Correct 8 ms 2732 KB Output is correct
5 Correct 7 ms 2780 KB Output is correct
6 Correct 8 ms 2932 KB Output is correct
7 Correct 8 ms 2856 KB Output is correct
8 Correct 16 ms 2980 KB Output is correct
9 Correct 16 ms 3004 KB Output is correct
10 Correct 16 ms 2956 KB Output is correct
11 Correct 16 ms 2820 KB Output is correct
12 Correct 16 ms 2984 KB Output is correct
13 Correct 16 ms 2932 KB Output is correct
14 Correct 30 ms 3020 KB Output is correct
15 Correct 43 ms 3092 KB Output is correct
16 Correct 43 ms 3064 KB Output is correct
17 Correct 43 ms 3052 KB Output is correct
18 Correct 41 ms 3100 KB Output is correct
19 Correct 41 ms 3032 KB Output is correct
20 Correct 40 ms 3084 KB Output is correct
21 Correct 65 ms 3224 KB Output is correct
22 Correct 84 ms 3228 KB Output is correct
23 Correct 89 ms 3244 KB Output is correct
24 Correct 85 ms 3260 KB Output is correct
25 Correct 93 ms 3304 KB Output is correct
26 Correct 88 ms 3408 KB Output is correct
27 Correct 84 ms 3196 KB Output is correct
28 Correct 89 ms 3256 KB Output is correct
29 Correct 129 ms 3456 KB Output is correct
30 Correct 164 ms 3456 KB Output is correct
31 Correct 161 ms 3452 KB Output is correct
32 Correct 165 ms 3412 KB Output is correct
33 Correct 170 ms 3404 KB Output is correct
34 Correct 169 ms 3432 KB Output is correct
35 Correct 163 ms 3404 KB Output is correct
36 Correct 163 ms 3448 KB Output is correct
37 Correct 228 ms 3696 KB Output is correct
38 Correct 299 ms 3784 KB Output is correct
39 Correct 277 ms 3776 KB Output is correct
40 Correct 312 ms 3856 KB Output is correct
41 Correct 278 ms 3728 KB Output is correct
42 Correct 298 ms 3776 KB Output is correct
43 Correct 279 ms 3772 KB Output is correct
44 Correct 279 ms 3744 KB Output is correct
45 Correct 371 ms 3960 KB Output is correct
46 Correct 437 ms 4136 KB Output is correct
47 Correct 431 ms 3920 KB Output is correct
48 Correct 431 ms 4036 KB Output is correct
49 Correct 465 ms 4184 KB Output is correct
50 Correct 433 ms 3936 KB Output is correct
51 Correct 459 ms 3928 KB Output is correct
52 Correct 446 ms 4000 KB Output is correct
53 Correct 447 ms 3972 KB Output is correct
54 Correct 428 ms 4012 KB Output is correct
55 Correct 452 ms 3960 KB Output is correct
56 Correct 444 ms 3984 KB Output is correct
57 Correct 544 ms 4468 KB Output is correct
58 Correct 675 ms 4724 KB Output is correct
59 Correct 667 ms 4436 KB Output is correct
60 Correct 673 ms 4788 KB Output is correct
61 Correct 643 ms 4544 KB Output is correct
62 Correct 641 ms 4680 KB Output is correct
63 Correct 676 ms 4616 KB Output is correct
64 Correct 669 ms 4652 KB Output is correct
65 Correct 663 ms 4608 KB Output is correct
66 Correct 662 ms 4728 KB Output is correct
67 Correct 665 ms 4592 KB Output is correct
68 Correct 676 ms 4632 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 2800 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2744 KB Output is correct
4 Correct 8 ms 2732 KB Output is correct
5 Correct 7 ms 2780 KB Output is correct
6 Correct 8 ms 2932 KB Output is correct
7 Correct 8 ms 2856 KB Output is correct
8 Correct 16 ms 2980 KB Output is correct
9 Correct 16 ms 3004 KB Output is correct
10 Correct 16 ms 2956 KB Output is correct
11 Correct 16 ms 2820 KB Output is correct
12 Correct 16 ms 2984 KB Output is correct
13 Correct 16 ms 2932 KB Output is correct
14 Correct 30 ms 3020 KB Output is correct
15 Correct 43 ms 3092 KB Output is correct
16 Correct 43 ms 3064 KB Output is correct
17 Correct 43 ms 3052 KB Output is correct
18 Correct 41 ms 3100 KB Output is correct
19 Correct 41 ms 3032 KB Output is correct
20 Correct 40 ms 3084 KB Output is correct
21 Correct 65 ms 3224 KB Output is correct
22 Correct 84 ms 3228 KB Output is correct
23 Correct 89 ms 3244 KB Output is correct
24 Correct 85 ms 3260 KB Output is correct
25 Correct 93 ms 3304 KB Output is correct
26 Correct 88 ms 3408 KB Output is correct
27 Correct 84 ms 3196 KB Output is correct
28 Correct 89 ms 3256 KB Output is correct
29 Correct 129 ms 3456 KB Output is correct
30 Correct 164 ms 3456 KB Output is correct
31 Correct 161 ms 3452 KB Output is correct
32 Correct 165 ms 3412 KB Output is correct
33 Correct 170 ms 3404 KB Output is correct
34 Correct 169 ms 3432 KB Output is correct
35 Correct 163 ms 3404 KB Output is correct
36 Correct 163 ms 3448 KB Output is correct
37 Correct 228 ms 3696 KB Output is correct
38 Correct 299 ms 3784 KB Output is correct
39 Correct 277 ms 3776 KB Output is correct
40 Correct 312 ms 3856 KB Output is correct
41 Correct 278 ms 3728 KB Output is correct
42 Correct 298 ms 3776 KB Output is correct
43 Correct 279 ms 3772 KB Output is correct
44 Correct 279 ms 3744 KB Output is correct
45 Correct 371 ms 3960 KB Output is correct
46 Correct 437 ms 4136 KB Output is correct
47 Correct 431 ms 3920 KB Output is correct
48 Correct 431 ms 4036 KB Output is correct
49 Correct 465 ms 4184 KB Output is correct
50 Correct 433 ms 3936 KB Output is correct
51 Correct 459 ms 3928 KB Output is correct
52 Correct 446 ms 4000 KB Output is correct
53 Correct 447 ms 3972 KB Output is correct
54 Correct 428 ms 4012 KB Output is correct
55 Correct 452 ms 3960 KB Output is correct
56 Correct 444 ms 3984 KB Output is correct
57 Correct 544 ms 4468 KB Output is correct
58 Correct 675 ms 4724 KB Output is correct
59 Correct 667 ms 4436 KB Output is correct
60 Correct 673 ms 4788 KB Output is correct
61 Correct 643 ms 4544 KB Output is correct
62 Correct 641 ms 4680 KB Output is correct
63 Correct 676 ms 4616 KB Output is correct
64 Correct 669 ms 4652 KB Output is correct
65 Correct 663 ms 4608 KB Output is correct
66 Correct 662 ms 4728 KB Output is correct
67 Correct 665 ms 4592 KB Output is correct
68 Correct 676 ms 4632 KB Output is correct
69 Correct 776 ms 4684 KB Output is correct
70 Correct 921 ms 4736 KB Output is correct
71 Correct 947 ms 4812 KB Output is correct
72 Correct 904 ms 4800 KB Output is correct
73 Correct 925 ms 4712 KB Output is correct
74 Correct 947 ms 4796 KB Output is correct
75 Correct 972 ms 4772 KB Output is correct
76 Correct 963 ms 4932 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 2800 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2744 KB Output is correct
4 Correct 8 ms 2732 KB Output is correct
5 Correct 7 ms 2780 KB Output is correct
6 Correct 8 ms 2932 KB Output is correct
7 Correct 8 ms 2856 KB Output is correct
8 Correct 16 ms 2980 KB Output is correct
9 Correct 16 ms 3004 KB Output is correct
10 Correct 16 ms 2956 KB Output is correct
11 Correct 16 ms 2820 KB Output is correct
12 Correct 16 ms 2984 KB Output is correct
13 Correct 16 ms 2932 KB Output is correct
14 Correct 30 ms 3020 KB Output is correct
15 Correct 43 ms 3092 KB Output is correct
16 Correct 43 ms 3064 KB Output is correct
17 Correct 43 ms 3052 KB Output is correct
18 Correct 41 ms 3100 KB Output is correct
19 Correct 41 ms 3032 KB Output is correct
20 Correct 40 ms 3084 KB Output is correct
21 Correct 65 ms 3224 KB Output is correct
22 Correct 84 ms 3228 KB Output is correct
23 Correct 89 ms 3244 KB Output is correct
24 Correct 85 ms 3260 KB Output is correct
25 Correct 93 ms 3304 KB Output is correct
26 Correct 88 ms 3408 KB Output is correct
27 Correct 84 ms 3196 KB Output is correct
28 Correct 89 ms 3256 KB Output is correct
29 Correct 129 ms 3456 KB Output is correct
30 Correct 164 ms 3456 KB Output is correct
31 Correct 161 ms 3452 KB Output is correct
32 Correct 165 ms 3412 KB Output is correct
33 Correct 170 ms 3404 KB Output is correct
34 Correct 169 ms 3432 KB Output is correct
35 Correct 163 ms 3404 KB Output is correct
36 Correct 163 ms 3448 KB Output is correct
37 Correct 228 ms 3696 KB Output is correct
38 Correct 299 ms 3784 KB Output is correct
39 Correct 277 ms 3776 KB Output is correct
40 Correct 312 ms 3856 KB Output is correct
41 Correct 278 ms 3728 KB Output is correct
42 Correct 298 ms 3776 KB Output is correct
43 Correct 279 ms 3772 KB Output is correct
44 Correct 279 ms 3744 KB Output is correct
45 Correct 371 ms 3960 KB Output is correct
46 Correct 437 ms 4136 KB Output is correct
47 Correct 431 ms 3920 KB Output is correct
48 Correct 431 ms 4036 KB Output is correct
49 Correct 465 ms 4184 KB Output is correct
50 Correct 433 ms 3936 KB Output is correct
51 Correct 459 ms 3928 KB Output is correct
52 Correct 446 ms 4000 KB Output is correct
53 Correct 447 ms 3972 KB Output is correct
54 Correct 428 ms 4012 KB Output is correct
55 Correct 452 ms 3960 KB Output is correct
56 Correct 444 ms 3984 KB Output is correct
57 Correct 544 ms 4468 KB Output is correct
58 Correct 675 ms 4724 KB Output is correct
59 Correct 667 ms 4436 KB Output is correct
60 Correct 673 ms 4788 KB Output is correct
61 Correct 643 ms 4544 KB Output is correct
62 Correct 641 ms 4680 KB Output is correct
63 Correct 676 ms 4616 KB Output is correct
64 Correct 669 ms 4652 KB Output is correct
65 Correct 663 ms 4608 KB Output is correct
66 Correct 662 ms 4728 KB Output is correct
67 Correct 665 ms 4592 KB Output is correct
68 Correct 676 ms 4632 KB Output is correct
69 Correct 776 ms 4684 KB Output is correct
70 Correct 921 ms 4736 KB Output is correct
71 Correct 947 ms 4812 KB Output is correct
72 Correct 904 ms 4800 KB Output is correct
73 Correct 925 ms 4712 KB Output is correct
74 Correct 947 ms 4796 KB Output is correct
75 Correct 972 ms 4772 KB Output is correct
76 Correct 963 ms 4932 KB Output is correct
77 Correct 920 ms 4820 KB Output is correct
78 Correct 1276 ms 5148 KB Output is correct
79 Correct 1256 ms 5176 KB Output is correct
80 Correct 1259 ms 5120 KB Output is correct
81 Correct 1251 ms 5156 KB Output is correct
82 Correct 1248 ms 5144 KB Output is correct
83 Correct 1266 ms 5356 KB Output is correct
84 Correct 1278 ms 5276 KB Output is correct