답안 #573925

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
573925 2022-06-07T12:25:54 Z WongChun1234 화성 (APIO22_mars) C++17
78 / 100
944 ms 4896 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[100],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 8 ms 2744 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2796 KB Output is correct
4 Correct 8 ms 2792 KB Output is correct
5 Correct 8 ms 2728 KB Output is correct
6 Correct 8 ms 2808 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 2744 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2796 KB Output is correct
4 Correct 8 ms 2792 KB Output is correct
5 Correct 8 ms 2728 KB Output is correct
6 Correct 8 ms 2808 KB Output is correct
7 Correct 13 ms 2828 KB Output is correct
8 Correct 18 ms 2952 KB Output is correct
9 Correct 16 ms 2860 KB Output is correct
10 Correct 17 ms 2780 KB Output is correct
11 Correct 18 ms 2844 KB Output is correct
12 Correct 19 ms 2916 KB Output is correct
13 Correct 19 ms 2972 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 2744 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2796 KB Output is correct
4 Correct 8 ms 2792 KB Output is correct
5 Correct 8 ms 2728 KB Output is correct
6 Correct 8 ms 2808 KB Output is correct
7 Correct 13 ms 2828 KB Output is correct
8 Correct 18 ms 2952 KB Output is correct
9 Correct 16 ms 2860 KB Output is correct
10 Correct 17 ms 2780 KB Output is correct
11 Correct 18 ms 2844 KB Output is correct
12 Correct 19 ms 2916 KB Output is correct
13 Correct 19 ms 2972 KB Output is correct
14 Correct 32 ms 2928 KB Output is correct
15 Correct 41 ms 3092 KB Output is correct
16 Correct 41 ms 3124 KB Output is correct
17 Correct 41 ms 3104 KB Output is correct
18 Correct 41 ms 3104 KB Output is correct
19 Correct 44 ms 3180 KB Output is correct
20 Correct 40 ms 3160 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 2744 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2796 KB Output is correct
4 Correct 8 ms 2792 KB Output is correct
5 Correct 8 ms 2728 KB Output is correct
6 Correct 8 ms 2808 KB Output is correct
7 Correct 13 ms 2828 KB Output is correct
8 Correct 18 ms 2952 KB Output is correct
9 Correct 16 ms 2860 KB Output is correct
10 Correct 17 ms 2780 KB Output is correct
11 Correct 18 ms 2844 KB Output is correct
12 Correct 19 ms 2916 KB Output is correct
13 Correct 19 ms 2972 KB Output is correct
14 Correct 32 ms 2928 KB Output is correct
15 Correct 41 ms 3092 KB Output is correct
16 Correct 41 ms 3124 KB Output is correct
17 Correct 41 ms 3104 KB Output is correct
18 Correct 41 ms 3104 KB Output is correct
19 Correct 44 ms 3180 KB Output is correct
20 Correct 40 ms 3160 KB Output is correct
21 Correct 58 ms 3128 KB Output is correct
22 Correct 85 ms 3180 KB Output is correct
23 Correct 91 ms 3244 KB Output is correct
24 Correct 81 ms 3276 KB Output is correct
25 Correct 83 ms 3260 KB Output is correct
26 Correct 83 ms 3248 KB Output is correct
27 Correct 95 ms 3260 KB Output is correct
28 Correct 89 ms 3248 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 2744 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2796 KB Output is correct
4 Correct 8 ms 2792 KB Output is correct
5 Correct 8 ms 2728 KB Output is correct
6 Correct 8 ms 2808 KB Output is correct
7 Correct 13 ms 2828 KB Output is correct
8 Correct 18 ms 2952 KB Output is correct
9 Correct 16 ms 2860 KB Output is correct
10 Correct 17 ms 2780 KB Output is correct
11 Correct 18 ms 2844 KB Output is correct
12 Correct 19 ms 2916 KB Output is correct
13 Correct 19 ms 2972 KB Output is correct
14 Correct 32 ms 2928 KB Output is correct
15 Correct 41 ms 3092 KB Output is correct
16 Correct 41 ms 3124 KB Output is correct
17 Correct 41 ms 3104 KB Output is correct
18 Correct 41 ms 3104 KB Output is correct
19 Correct 44 ms 3180 KB Output is correct
20 Correct 40 ms 3160 KB Output is correct
21 Correct 58 ms 3128 KB Output is correct
22 Correct 85 ms 3180 KB Output is correct
23 Correct 91 ms 3244 KB Output is correct
24 Correct 81 ms 3276 KB Output is correct
25 Correct 83 ms 3260 KB Output is correct
26 Correct 83 ms 3248 KB Output is correct
27 Correct 95 ms 3260 KB Output is correct
28 Correct 89 ms 3248 KB Output is correct
29 Correct 122 ms 3388 KB Output is correct
30 Correct 167 ms 3508 KB Output is correct
31 Correct 159 ms 3452 KB Output is correct
32 Correct 164 ms 3456 KB Output is correct
33 Correct 172 ms 3572 KB Output is correct
34 Correct 158 ms 3400 KB Output is correct
35 Correct 165 ms 3488 KB Output is correct
36 Correct 171 ms 3384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 2744 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2796 KB Output is correct
4 Correct 8 ms 2792 KB Output is correct
5 Correct 8 ms 2728 KB Output is correct
6 Correct 8 ms 2808 KB Output is correct
7 Correct 13 ms 2828 KB Output is correct
8 Correct 18 ms 2952 KB Output is correct
9 Correct 16 ms 2860 KB Output is correct
10 Correct 17 ms 2780 KB Output is correct
11 Correct 18 ms 2844 KB Output is correct
12 Correct 19 ms 2916 KB Output is correct
13 Correct 19 ms 2972 KB Output is correct
14 Correct 32 ms 2928 KB Output is correct
15 Correct 41 ms 3092 KB Output is correct
16 Correct 41 ms 3124 KB Output is correct
17 Correct 41 ms 3104 KB Output is correct
18 Correct 41 ms 3104 KB Output is correct
19 Correct 44 ms 3180 KB Output is correct
20 Correct 40 ms 3160 KB Output is correct
21 Correct 58 ms 3128 KB Output is correct
22 Correct 85 ms 3180 KB Output is correct
23 Correct 91 ms 3244 KB Output is correct
24 Correct 81 ms 3276 KB Output is correct
25 Correct 83 ms 3260 KB Output is correct
26 Correct 83 ms 3248 KB Output is correct
27 Correct 95 ms 3260 KB Output is correct
28 Correct 89 ms 3248 KB Output is correct
29 Correct 122 ms 3388 KB Output is correct
30 Correct 167 ms 3508 KB Output is correct
31 Correct 159 ms 3452 KB Output is correct
32 Correct 164 ms 3456 KB Output is correct
33 Correct 172 ms 3572 KB Output is correct
34 Correct 158 ms 3400 KB Output is correct
35 Correct 165 ms 3488 KB Output is correct
36 Correct 171 ms 3384 KB Output is correct
37 Correct 218 ms 3764 KB Output is correct
38 Correct 284 ms 3764 KB Output is correct
39 Correct 288 ms 3752 KB Output is correct
40 Correct 283 ms 3736 KB Output is correct
41 Correct 276 ms 3812 KB Output is correct
42 Correct 273 ms 3732 KB Output is correct
43 Correct 282 ms 3752 KB Output is correct
44 Correct 271 ms 3752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 2744 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2796 KB Output is correct
4 Correct 8 ms 2792 KB Output is correct
5 Correct 8 ms 2728 KB Output is correct
6 Correct 8 ms 2808 KB Output is correct
7 Correct 13 ms 2828 KB Output is correct
8 Correct 18 ms 2952 KB Output is correct
9 Correct 16 ms 2860 KB Output is correct
10 Correct 17 ms 2780 KB Output is correct
11 Correct 18 ms 2844 KB Output is correct
12 Correct 19 ms 2916 KB Output is correct
13 Correct 19 ms 2972 KB Output is correct
14 Correct 32 ms 2928 KB Output is correct
15 Correct 41 ms 3092 KB Output is correct
16 Correct 41 ms 3124 KB Output is correct
17 Correct 41 ms 3104 KB Output is correct
18 Correct 41 ms 3104 KB Output is correct
19 Correct 44 ms 3180 KB Output is correct
20 Correct 40 ms 3160 KB Output is correct
21 Correct 58 ms 3128 KB Output is correct
22 Correct 85 ms 3180 KB Output is correct
23 Correct 91 ms 3244 KB Output is correct
24 Correct 81 ms 3276 KB Output is correct
25 Correct 83 ms 3260 KB Output is correct
26 Correct 83 ms 3248 KB Output is correct
27 Correct 95 ms 3260 KB Output is correct
28 Correct 89 ms 3248 KB Output is correct
29 Correct 122 ms 3388 KB Output is correct
30 Correct 167 ms 3508 KB Output is correct
31 Correct 159 ms 3452 KB Output is correct
32 Correct 164 ms 3456 KB Output is correct
33 Correct 172 ms 3572 KB Output is correct
34 Correct 158 ms 3400 KB Output is correct
35 Correct 165 ms 3488 KB Output is correct
36 Correct 171 ms 3384 KB Output is correct
37 Correct 218 ms 3764 KB Output is correct
38 Correct 284 ms 3764 KB Output is correct
39 Correct 288 ms 3752 KB Output is correct
40 Correct 283 ms 3736 KB Output is correct
41 Correct 276 ms 3812 KB Output is correct
42 Correct 273 ms 3732 KB Output is correct
43 Correct 282 ms 3752 KB Output is correct
44 Correct 271 ms 3752 KB Output is correct
45 Correct 354 ms 3824 KB Output is correct
46 Correct 432 ms 4024 KB Output is correct
47 Correct 432 ms 3932 KB Output is correct
48 Correct 427 ms 3956 KB Output is correct
49 Correct 428 ms 3936 KB Output is correct
50 Correct 430 ms 4052 KB Output is correct
51 Correct 460 ms 3944 KB Output is correct
52 Correct 437 ms 4048 KB Output is correct
53 Correct 440 ms 3952 KB Output is correct
54 Correct 432 ms 3952 KB Output is correct
55 Correct 438 ms 4140 KB Output is correct
56 Correct 447 ms 4156 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 2744 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2796 KB Output is correct
4 Correct 8 ms 2792 KB Output is correct
5 Correct 8 ms 2728 KB Output is correct
6 Correct 8 ms 2808 KB Output is correct
7 Correct 13 ms 2828 KB Output is correct
8 Correct 18 ms 2952 KB Output is correct
9 Correct 16 ms 2860 KB Output is correct
10 Correct 17 ms 2780 KB Output is correct
11 Correct 18 ms 2844 KB Output is correct
12 Correct 19 ms 2916 KB Output is correct
13 Correct 19 ms 2972 KB Output is correct
14 Correct 32 ms 2928 KB Output is correct
15 Correct 41 ms 3092 KB Output is correct
16 Correct 41 ms 3124 KB Output is correct
17 Correct 41 ms 3104 KB Output is correct
18 Correct 41 ms 3104 KB Output is correct
19 Correct 44 ms 3180 KB Output is correct
20 Correct 40 ms 3160 KB Output is correct
21 Correct 58 ms 3128 KB Output is correct
22 Correct 85 ms 3180 KB Output is correct
23 Correct 91 ms 3244 KB Output is correct
24 Correct 81 ms 3276 KB Output is correct
25 Correct 83 ms 3260 KB Output is correct
26 Correct 83 ms 3248 KB Output is correct
27 Correct 95 ms 3260 KB Output is correct
28 Correct 89 ms 3248 KB Output is correct
29 Correct 122 ms 3388 KB Output is correct
30 Correct 167 ms 3508 KB Output is correct
31 Correct 159 ms 3452 KB Output is correct
32 Correct 164 ms 3456 KB Output is correct
33 Correct 172 ms 3572 KB Output is correct
34 Correct 158 ms 3400 KB Output is correct
35 Correct 165 ms 3488 KB Output is correct
36 Correct 171 ms 3384 KB Output is correct
37 Correct 218 ms 3764 KB Output is correct
38 Correct 284 ms 3764 KB Output is correct
39 Correct 288 ms 3752 KB Output is correct
40 Correct 283 ms 3736 KB Output is correct
41 Correct 276 ms 3812 KB Output is correct
42 Correct 273 ms 3732 KB Output is correct
43 Correct 282 ms 3752 KB Output is correct
44 Correct 271 ms 3752 KB Output is correct
45 Correct 354 ms 3824 KB Output is correct
46 Correct 432 ms 4024 KB Output is correct
47 Correct 432 ms 3932 KB Output is correct
48 Correct 427 ms 3956 KB Output is correct
49 Correct 428 ms 3936 KB Output is correct
50 Correct 430 ms 4052 KB Output is correct
51 Correct 460 ms 3944 KB Output is correct
52 Correct 437 ms 4048 KB Output is correct
53 Correct 440 ms 3952 KB Output is correct
54 Correct 432 ms 3952 KB Output is correct
55 Correct 438 ms 4140 KB Output is correct
56 Correct 447 ms 4156 KB Output is correct
57 Correct 532 ms 4460 KB Output is correct
58 Correct 643 ms 4660 KB Output is correct
59 Correct 654 ms 4676 KB Output is correct
60 Correct 654 ms 4776 KB Output is correct
61 Correct 649 ms 4708 KB Output is correct
62 Correct 670 ms 4592 KB Output is correct
63 Correct 666 ms 4608 KB Output is correct
64 Correct 666 ms 4644 KB Output is correct
65 Correct 656 ms 4704 KB Output is correct
66 Correct 640 ms 4680 KB Output is correct
67 Correct 641 ms 4476 KB Output is correct
68 Correct 659 ms 4756 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 2744 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2796 KB Output is correct
4 Correct 8 ms 2792 KB Output is correct
5 Correct 8 ms 2728 KB Output is correct
6 Correct 8 ms 2808 KB Output is correct
7 Correct 13 ms 2828 KB Output is correct
8 Correct 18 ms 2952 KB Output is correct
9 Correct 16 ms 2860 KB Output is correct
10 Correct 17 ms 2780 KB Output is correct
11 Correct 18 ms 2844 KB Output is correct
12 Correct 19 ms 2916 KB Output is correct
13 Correct 19 ms 2972 KB Output is correct
14 Correct 32 ms 2928 KB Output is correct
15 Correct 41 ms 3092 KB Output is correct
16 Correct 41 ms 3124 KB Output is correct
17 Correct 41 ms 3104 KB Output is correct
18 Correct 41 ms 3104 KB Output is correct
19 Correct 44 ms 3180 KB Output is correct
20 Correct 40 ms 3160 KB Output is correct
21 Correct 58 ms 3128 KB Output is correct
22 Correct 85 ms 3180 KB Output is correct
23 Correct 91 ms 3244 KB Output is correct
24 Correct 81 ms 3276 KB Output is correct
25 Correct 83 ms 3260 KB Output is correct
26 Correct 83 ms 3248 KB Output is correct
27 Correct 95 ms 3260 KB Output is correct
28 Correct 89 ms 3248 KB Output is correct
29 Correct 122 ms 3388 KB Output is correct
30 Correct 167 ms 3508 KB Output is correct
31 Correct 159 ms 3452 KB Output is correct
32 Correct 164 ms 3456 KB Output is correct
33 Correct 172 ms 3572 KB Output is correct
34 Correct 158 ms 3400 KB Output is correct
35 Correct 165 ms 3488 KB Output is correct
36 Correct 171 ms 3384 KB Output is correct
37 Correct 218 ms 3764 KB Output is correct
38 Correct 284 ms 3764 KB Output is correct
39 Correct 288 ms 3752 KB Output is correct
40 Correct 283 ms 3736 KB Output is correct
41 Correct 276 ms 3812 KB Output is correct
42 Correct 273 ms 3732 KB Output is correct
43 Correct 282 ms 3752 KB Output is correct
44 Correct 271 ms 3752 KB Output is correct
45 Correct 354 ms 3824 KB Output is correct
46 Correct 432 ms 4024 KB Output is correct
47 Correct 432 ms 3932 KB Output is correct
48 Correct 427 ms 3956 KB Output is correct
49 Correct 428 ms 3936 KB Output is correct
50 Correct 430 ms 4052 KB Output is correct
51 Correct 460 ms 3944 KB Output is correct
52 Correct 437 ms 4048 KB Output is correct
53 Correct 440 ms 3952 KB Output is correct
54 Correct 432 ms 3952 KB Output is correct
55 Correct 438 ms 4140 KB Output is correct
56 Correct 447 ms 4156 KB Output is correct
57 Correct 532 ms 4460 KB Output is correct
58 Correct 643 ms 4660 KB Output is correct
59 Correct 654 ms 4676 KB Output is correct
60 Correct 654 ms 4776 KB Output is correct
61 Correct 649 ms 4708 KB Output is correct
62 Correct 670 ms 4592 KB Output is correct
63 Correct 666 ms 4608 KB Output is correct
64 Correct 666 ms 4644 KB Output is correct
65 Correct 656 ms 4704 KB Output is correct
66 Correct 640 ms 4680 KB Output is correct
67 Correct 641 ms 4476 KB Output is correct
68 Correct 659 ms 4756 KB Output is correct
69 Correct 792 ms 4636 KB Output is correct
70 Correct 917 ms 4860 KB Output is correct
71 Correct 915 ms 4780 KB Output is correct
72 Correct 932 ms 4896 KB Output is correct
73 Correct 944 ms 4808 KB Output is correct
74 Correct 912 ms 4836 KB Output is correct
75 Correct 922 ms 4736 KB Output is correct
76 Incorrect 115 ms 584 KB Incorrect
77 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 2744 KB Output is correct
2 Correct 8 ms 2772 KB Output is correct
3 Correct 8 ms 2796 KB Output is correct
4 Correct 8 ms 2792 KB Output is correct
5 Correct 8 ms 2728 KB Output is correct
6 Correct 8 ms 2808 KB Output is correct
7 Correct 13 ms 2828 KB Output is correct
8 Correct 18 ms 2952 KB Output is correct
9 Correct 16 ms 2860 KB Output is correct
10 Correct 17 ms 2780 KB Output is correct
11 Correct 18 ms 2844 KB Output is correct
12 Correct 19 ms 2916 KB Output is correct
13 Correct 19 ms 2972 KB Output is correct
14 Correct 32 ms 2928 KB Output is correct
15 Correct 41 ms 3092 KB Output is correct
16 Correct 41 ms 3124 KB Output is correct
17 Correct 41 ms 3104 KB Output is correct
18 Correct 41 ms 3104 KB Output is correct
19 Correct 44 ms 3180 KB Output is correct
20 Correct 40 ms 3160 KB Output is correct
21 Correct 58 ms 3128 KB Output is correct
22 Correct 85 ms 3180 KB Output is correct
23 Correct 91 ms 3244 KB Output is correct
24 Correct 81 ms 3276 KB Output is correct
25 Correct 83 ms 3260 KB Output is correct
26 Correct 83 ms 3248 KB Output is correct
27 Correct 95 ms 3260 KB Output is correct
28 Correct 89 ms 3248 KB Output is correct
29 Correct 122 ms 3388 KB Output is correct
30 Correct 167 ms 3508 KB Output is correct
31 Correct 159 ms 3452 KB Output is correct
32 Correct 164 ms 3456 KB Output is correct
33 Correct 172 ms 3572 KB Output is correct
34 Correct 158 ms 3400 KB Output is correct
35 Correct 165 ms 3488 KB Output is correct
36 Correct 171 ms 3384 KB Output is correct
37 Correct 218 ms 3764 KB Output is correct
38 Correct 284 ms 3764 KB Output is correct
39 Correct 288 ms 3752 KB Output is correct
40 Correct 283 ms 3736 KB Output is correct
41 Correct 276 ms 3812 KB Output is correct
42 Correct 273 ms 3732 KB Output is correct
43 Correct 282 ms 3752 KB Output is correct
44 Correct 271 ms 3752 KB Output is correct
45 Correct 354 ms 3824 KB Output is correct
46 Correct 432 ms 4024 KB Output is correct
47 Correct 432 ms 3932 KB Output is correct
48 Correct 427 ms 3956 KB Output is correct
49 Correct 428 ms 3936 KB Output is correct
50 Correct 430 ms 4052 KB Output is correct
51 Correct 460 ms 3944 KB Output is correct
52 Correct 437 ms 4048 KB Output is correct
53 Correct 440 ms 3952 KB Output is correct
54 Correct 432 ms 3952 KB Output is correct
55 Correct 438 ms 4140 KB Output is correct
56 Correct 447 ms 4156 KB Output is correct
57 Correct 532 ms 4460 KB Output is correct
58 Correct 643 ms 4660 KB Output is correct
59 Correct 654 ms 4676 KB Output is correct
60 Correct 654 ms 4776 KB Output is correct
61 Correct 649 ms 4708 KB Output is correct
62 Correct 670 ms 4592 KB Output is correct
63 Correct 666 ms 4608 KB Output is correct
64 Correct 666 ms 4644 KB Output is correct
65 Correct 656 ms 4704 KB Output is correct
66 Correct 640 ms 4680 KB Output is correct
67 Correct 641 ms 4476 KB Output is correct
68 Correct 659 ms 4756 KB Output is correct
69 Correct 792 ms 4636 KB Output is correct
70 Correct 917 ms 4860 KB Output is correct
71 Correct 915 ms 4780 KB Output is correct
72 Correct 932 ms 4896 KB Output is correct
73 Correct 944 ms 4808 KB Output is correct
74 Correct 912 ms 4836 KB Output is correct
75 Correct 922 ms 4736 KB Output is correct
76 Incorrect 115 ms 584 KB Incorrect
77 Halted 0 ms 0 KB -