QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#820343#9884. Grid Constructionas_lyrAC ✓6ms8156kbC++143.3kb2024-12-18 21:04:122024-12-18 21:04:12

Judging History

This is the latest submission verdict.

  • [2024-12-18 21:04:12]
  • Judged
  • Verdict: AC
  • Time: 6ms
  • Memory: 8156kb
  • [2024-12-18 21:04:12]
  • Submitted

answer

#include <bits/stdc++.h>
using namespace std;
const int N=1100;
int a[N][N];
char c[5];
void worka(int x,int y){
	                            a[x+0][y+0]=0;
	              a[x+1][y-1]=3,a[x+1][y+0]=3,a[x+1][y+1]=0;
	a[x+2][y-2]=3,a[x+2][y-1]=2,a[x+2][y+0]=4,a[x+2][y+1]=0,a[x+2][y+2]=1;
	              a[x+3][y-1]=2,a[x+3][y+0]=1,a[x+3][y+1]=1;
	                            a[x+4][y+0]=2;
}
void workb(int x,int y){
	                            a[x+0][y+0]=0;
	              a[x+1][y-1]=3,a[x+1][y+0]=0,a[x+1][y+1]=1;
	a[x+2][y-2]=3,a[x+2][y-1]=2,a[x+2][y+0]=1;
	              a[x+3][y-1]=2;
}
void solve(int n,int m,int x,int y){
	if(n==0||m==0)
		return ;
	if(n==3&&m==3){
		a[x+0][y+0]=3,a[x+0][y+1]=3,a[x+0][y+2]=0;
		a[x+1][y+0]=2,a[x+1][y+1]=4,a[x+1][y+2]=0;
		a[x+2][y+0]=2,a[x+2][y+1]=1,a[x+2][y+2]=1;
		return ;
	}
	if(n==5&&m==5){
		a[x+0][y+0]=3,a[x+0][y+1]=3,a[x+0][y+2]=3,a[x+0][y+3]=3,a[x+0][y+4]=0;
		a[x+1][y+0]=2,a[x+1][y+1]=4,a[x+1][y+2]=2,a[x+1][y+3]=4,a[x+1][y+4]=0;
		a[x+2][y+0]=2,a[x+2][y+1]=1,a[x+2][y+2]=4,a[x+2][y+3]=3,a[x+2][y+4]=0;
		a[x+3][y+0]=2,a[x+3][y+1]=4,a[x+3][y+2]=0,a[x+3][y+3]=4,a[x+3][y+4]=0;
		a[x+4][y+0]=2,a[x+4][y+1]=1,a[x+4][y+2]=1,a[x+4][y+3]=1,a[x+4][y+4]=1;
		return ;
	}
	for(int i=0;i<m-1;i+=1) a[x][y+i]=3;
	for(int i=0;i<n-1;i+=1) a[x+i][y+m-1]=0;
	for(int i=1;i<m-0;i+=1) a[x+n-1][y+i]=1;
	for(int i=1;i<n-0;i+=1) a[x+i][y]=2;
	for(int i=2;i<m-2;i+=2) a[x+1][y+i]=2;
	for(int i=2;i<n-2;i+=2) a[x+i][y+m-2]=3;
	for(int i=2;i<m-2;i+=2) a[x+n-2][y+i]=0;
	for(int i=2;i<n-2;i+=2) a[x+i][y+1]=1;
	if(n==9){
		for(int i=3;i<m-4;i+=6) a[x+2][y+i+0]=3,a[x+2][y+i+1]=2,a[x+3][y+i+1]=2,a[x+2][y+i+2]=1;
		for(int i=3;i<m-4;i+=6) a[x+6][y+i+0]=3,a[x+6][y+i+1]=0,a[x+5][y+i+1]=0,a[x+6][y+i+2]=1;
		a[x+3][y+2]=0,a[x+4][y+2]=1,a[x+4][y+3]=1,a[x+5][y+2]=2;
		a[x+3][y+m-3]=0,a[x+4][y+m-3]=3,a[x+4][y+m-4]=3,a[x+5][y+m-3]=2;
		for(int i=7;i<m-7;i+=6)
			worka(x+2,y+i);
		return ;
	}
	if(n==11){
		for(int i=3;i<m-6;i+=6) a[x+2][y+i+0]=3,a[x+2][y+i+1]=2,a[x+3][y+i+1]=2,a[x+2][y+i+2]=1;
		for(int i=5;i<m-4;i+=6) a[x+8][y+i+0]=3,a[x+8][y+i+1]=0,a[x+7][y+i+1]=0,a[x+8][y+i+2]=1;
		a[x+3][y+2]=0,a[x+4][y+2]=1,a[x+4][y+3]=1,a[x+5][y+2]=2;
		a[x+5][y+m-3]=0,a[x+6][y+m-3]=3,a[x+6][y+m-4]=3,a[x+7][y+m-3]=2;
		for(int i=7;i<m-9;i+=6)
			worka(x+2,y+i);
		workb(x+2,y+m-4);
		for(int i=4;i<m-6;i+=6)
			workb(x+5,y+i);
		return ;
	}
	for(int i=3;i<m-3;i+=2) a[x+2][y+i]=0;
	for(int i=3;i<n-3;i+=2) a[x+i][y+m-3]=1;
	for(int i=3;i<m-3;i+=2) a[x+n-3][y+i]=2;
	for(int i=3;i<n-3;i+=2) a[x+i][y+2]=3;
	solve(n-6,m-6,x+3,y+3);
}
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	if(n==2&&m==2){
		puts("Yes");
		puts("<^");
		puts("v>");
		return 0;
	}
	bool ok=0;
	if(n>m){
		swap(n,m);
		ok=1;
	}
	if((n&1)==0||(m&1)==0||n%6!=m%6||n%6==1||(n==3&&m>6)||(n==5&&m>6)){
		puts("No");
		return 0;
	}
	for(int i=1;i<=n;i++)
		for(int j=1;j<=m;j++)
			a[i][j]=4;
	solve(n,m,1,1);
	puts("Yes");
	if(ok==0){
		c[0]='^',c[1]='>',c[2]='v',c[3]='<',c[4]='.';
		for(int i=1;i<=n;i++){
			for(int j=1;j<=m;j++)
				putchar(c[a[i][j]]);
			putchar('\n');
		}
	}
	else{
		c[0]='<',c[1]='v',c[2]='>',c[3]='^',c[4]='.';
		for(int i=1;i<=m;i++){
			for(int j=1;j<=n;j++)
				putchar(c[a[j][i]]);
			putchar('\n');
		}
	}
	return 0;
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3840kb

input:

3 3

output:

Yes
<<^
v.^
v>>

result:

ok Correct

Test #2:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

4 4

output:

No

result:

ok Correct : No

Test #3:

score: 0
Accepted
time: 0ms
memory: 3832kb

input:

4 5

output:

No

result:

ok Correct : No

Test #4:

score: 0
Accepted
time: 0ms
memory: 3868kb

input:

11 17

output:

Yes
<<<<<<<<<<<<<<<<^
v.v.v.v.v.v.v.v.^
v>.<v>.^.<v>.^.<^
v.^.v.<<^.v.<^>.^
v>>>.<v.^>.<v>.<^
v.v.^.v>>.^.v.^.^
v>.<^>.v.<^>.<<<^
v.<v>.^.<v>.^.v.^
v>.v.<^>.v.<^>.<^
v.^.^.^.^.^.^.^.^
v>>>>>>>>>>>>>>>>

result:

ok Correct

Test #5:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

1000 1000

output:

No

result:

ok Correct : No

Test #6:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

6 6

output:

No

result:

ok Correct : No

Test #7:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

7 7

output:

No

result:

ok Correct : No

Test #8:

score: 0
Accepted
time: 0ms
memory: 3828kb

input:

8 8

output:

No

result:

ok Correct : No

Test #9:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

9 9

output:

Yes
<<<<<<<<^
v.v.v.v.^
v>.<v>.<^
v.^.v.^.^
v>>>.<<<^
v.v.^.v.^
v>.<^>.<^
v.^.^.^.^
v>>>>>>>>

result:

ok Correct

Test #10:

score: 0
Accepted
time: 0ms
memory: 3760kb

input:

3 9

output:

No

result:

ok Correct : No

Test #11:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

15 3

output:

No

result:

ok Correct : No

Test #12:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

5 11

output:

No

result:

ok Correct : No

Test #13:

score: 0
Accepted
time: 0ms
memory: 3760kb

input:

605 5

output:

No

result:

ok Correct : No

Test #14:

score: 0
Accepted
time: 5ms
memory: 8104kb

input:

999 999

output:

Yes
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...

result:

ok Correct

Test #15:

score: 0
Accepted
time: 0ms
memory: 3764kb

input:

9 999

output:

Yes
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...

result:

ok Correct

Test #16:

score: 0
Accepted
time: 6ms
memory: 8044kb

input:

995 995

output:

Yes
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...

result:

ok Correct

Test #17:

score: 0
Accepted
time: 1ms
memory: 3748kb

input:

995 11

output:

Yes
^>>>>>>>>>>
^.v.v.v.v.v
^>.<v>.^.<v
^.^.v.^>>.v
^>>>.<<v.<v
^.v.^.v.^.v
^>.^>>.<<<v
^.<^.v>.v.v
^>.<<v.^.<v
^.^.v.^>>.v
^>>>.<<v.<v
^.v.^.v.^.v
^>.^>>.<<<v
^.<^.v>.v.v
^>.<<v.^.<v
^.^.v.^>>.v
^>>>.<<v.<v
^.v.^.v.^.v
^>.^>>.<<<v
^.<^.v>.v.v
^>.<<v.^.<v
^.^.v.^>>.v
^>>>.<<v.<v
^.v.^.v.^.v
^>.^>>.<...

result:

ok Correct

Test #18:

score: 0
Accepted
time: 1ms
memory: 3700kb

input:

897 27

output:

Yes
^>>>>>>>>>>>>>>>>>>>>>>>>>>
^.v.v.v.v.v.v.v.v.v.v.v.v.v
^>.^.^.^.^.^.^.^.^.^.^.^.<v
^.<^>>>>>>>>>>>>>>>>>>>>>.v
^>.^.v.v.v.v.v.v.v.v.v.v.<v
^.<^>.^.^.^.^.^.^.^.^.<v>.v
^>.^.<^>>>>>>>>>>>>>>>.v.<v
^.<^>.^.v.v.v.v.v.v.v.<v>.v
^>.^.<^>.^.^.^.^.^.<v>.v.<v
^.<^>.^.<^>>>>>>>>>.v.<v>.v
^>.^.<^>.^.v.v.v...

result:

ok Correct

Test #19:

score: 0
Accepted
time: 0ms
memory: 6716kb

input:

663 597

output:

Yes
^>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>...

result:

ok Correct

Test #20:

score: 0
Accepted
time: 1ms
memory: 4044kb

input:

879 45

output:

Yes
^>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
^.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v
^>.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.<v
^.<^>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.v
^>.^.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.<v
^.<^>.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.<v>.v
^>.^.<^>>>>>>>>>>>>>...

result:

ok Correct

Test #21:

score: 0
Accepted
time: 3ms
memory: 6664kb

input:

587 827

output:

Yes
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...

result:

ok Correct

Test #22:

score: 0
Accepted
time: 4ms
memory: 7324kb

input:

863 815

output:

Yes
^>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>...

result:

ok Correct

Test #23:

score: 0
Accepted
time: 0ms
memory: 6792kb

input:

893 671

output:

Yes
^>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>...

result:

ok Correct

Test #24:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

1000 996

output:

No

result:

ok Correct : No

Test #25:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

997 990

output:

No

result:

ok Correct : No

Test #26:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

991 996

output:

No

result:

ok Correct : No

Test #27:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

995 999

output:

No

result:

ok Correct : No

Test #28:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

658 868

output:

No

result:

ok Correct : No

Test #29:

score: 0
Accepted
time: 1ms
memory: 6148kb

input:

155 773

output:

Yes
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...

result:

ok Correct

Test #30:

score: 0
Accepted
time: 2ms
memory: 5396kb

input:

365 605

output:

Yes
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...

result:

ok Correct

Test #31:

score: 0
Accepted
time: 1ms
memory: 4496kb

input:

491 185

output:

Yes
^>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
^.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v....

result:

ok Correct

Test #32:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

748 562

output:

No

result:

ok Correct : No

Test #33:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

54 252

output:

No

result:

ok Correct : No

Test #34:

score: 0
Accepted
time: 0ms
memory: 3764kb

input:

889 799

output:

No

result:

ok Correct : No

Test #35:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

504 600

output:

No

result:

ok Correct : No

Test #36:

score: 0
Accepted
time: 3ms
memory: 7084kb

input:

527 701

output:

Yes
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...

result:

ok Correct

Test #37:

score: 0
Accepted
time: 1ms
memory: 4564kb

input:

195 813

output:

Yes
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...

result:

ok Correct

Test #38:

score: 0
Accepted
time: 0ms
memory: 3780kb

input:

232 402

output:

No

result:

ok Correct : No

Test #39:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

326 313

output:

No

result:

ok Correct : No

Test #40:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

594 628

output:

No

result:

ok Correct : No

Test #41:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

846 977

output:

No

result:

ok Correct : No

Test #42:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

795 894

output:

No

result:

ok Correct : No

Test #43:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

763 660

output:

No

result:

ok Correct : No

Test #44:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

707 116

output:

No

result:

ok Correct : No

Test #45:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

555 290

output:

No

result:

ok Correct : No

Test #46:

score: 0
Accepted
time: 3ms
memory: 8156kb

input:

891 597

output:

Yes
^>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>...

result:

ok Correct

Test #47:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

580 807

output:

No

result:

ok Correct : No

Test #48:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

1 1

output:

No

result:

ok Correct : No

Test #49:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

2 1

output:

No

result:

ok Correct : No

Test #50:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

1 3

output:

No

result:

ok Correct : No

Test #51:

score: 0
Accepted
time: 0ms
memory: 3764kb

input:

1 4

output:

No

result:

ok Correct : No

Test #52:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

5 1

output:

No

result:

ok Correct : No

Test #53:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

2 2

output:

Yes
<^
v>

result:

ok Correct

Test #54:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

2 3

output:

No

result:

ok Correct : No

Test #55:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

2 4

output:

No

result:

ok Correct : No

Test #56:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

2 5

output:

No

result:

ok Correct : No

Test #57:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

3 4

output:

No

result:

ok Correct : No

Test #58:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

5 3

output:

No

result:

ok Correct : No

Test #59:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

5 4

output:

No

result:

ok Correct : No

Test #60:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

5 5

output:

Yes
<<<<^
v.v.^
v>.<^
v.^.^
v>>>>

result:

ok Correct

Extra Test:

score: 0
Extra Test Passed