QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#818991#9884. Grid ConstructionXY_Eleven#AC ✓26ms5160kbC++207.3kb2024-12-18 11:30:482024-12-18 11:30:50

Judging History

This is the latest submission verdict.

  • [2024-12-18 11:30:50]
  • Judged
  • Verdict: AC
  • Time: 26ms
  • Memory: 5160kb
  • [2024-12-18 11:30:48]
  • Submitted

answer

#include <bits/stdc++.h>
// #include <windows.h>
// #include <bits/extc++.h>
// using namespace __gnu_pbds;
using namespace std;
//#pragma GCC optimize(3)
#define DB double
#define LL long long
#define ULL unsigned long long
#define in128 __int128
#define cint const int
#define cLL const LL
#define For(z,e1,e2) for(int z=(e1);z<=(e2);z++)
#define Rof(z,e1,e2) for(int z=(e2);z>=(e1);z--)
#define For_(z,e1,e2) for(int z=(e1);z<(e2);z++)
#define Rof_(z,e1,e2) for(int z=(e2);z>(e1);z--)
#define inint(e) scanf("%d",&e)
#define inll(e) scanf("%lld",&e)
#define inpr(e1,e2) scanf("%d%d",&e1,&e2)
#define in3(e1,e2,e3) scanf("%d%d%d",&e1,&e2,&e3)
#define outint(e) printf("%d\n",e)
#define outint_(e) printf("%d%c",e," \n"[i==n])
#define outint2_(e,e1,e2) printf("%d%c",e," \n"[(e1)==(e2)])
#define outll(e) printf("%lld\n",e)
#define outll_(e) printf("%lld%c",e," \n"[i==n])
#define outll2_(e,e1,e2) printf("%lld%c",e," \n"[(e1)==(e2)])
#define exc(e) if(e) continue
#define stop(e) if(e) break
#define ret(e) if(e) return
#define ll(e) (1ll*(e))
#define pb push_back
#define ft first
#define sc second
#define pii pair<int,int> 
#define pli pair<long long,int> 
#define vct vector 
#define clean(e) while(!e.empty()) e.pop()
#define all(ev) ev.begin(),ev.end()
#define sz(ev) ((int)ev.size())
#define debug(x) printf("%s=%d\n",#x,x)
#define x0 __xx00__
#define y1 __yy11__
#define ffo fflush(stdout)
cLL mod=998244353,G=404;
// cLL mod[2]={1686688681ll,1666888681ll},base[2]={166686661ll,188868881ll};
template <typename Type> void get_min(Type &w1,const Type w2) { if(w2<w1) w1=w2; } template <typename Type> void get_max(Type &w1,const Type w2) { if(w2>w1) w1=w2; }
template <typename Type> Type up_div(Type w1,Type w2) { return (w1/w2+(w1%w2?1:0)); }
template <typename Type> Type gcd(Type X_,Type Y_) { Type R_=X_%Y_; while(R_) { X_=Y_; Y_=R_; R_=X_%Y_; } return Y_; } template <typename Type> Type lcm(Type X_,Type Y_) { return (X_/gcd(X_,Y_)*Y_); }
template <typename Type> Type md(Type w1,const Type w2=mod) { w1%=w2; if(w1<0) w1+=w2; return w1; } template <typename Type> Type md_(Type w1,const Type w2=mod) { w1%=w2; if(w1<=0) w1+=w2; return w1; }
void ex_gcd(LL &X_,LL &Y_,LL A_,LL B_) { if(!B_) { X_=1ll; Y_=0ll; return ; } ex_gcd(Y_,X_,B_,A_%B_); X_=md(X_,B_); Y_=(1ll-X_*A_)/B_; } LL inv(LL A_,LL B_=mod) { LL X_=0ll,Y_=0ll; ex_gcd(X_,Y_,A_,B_); return X_; }
template <typename Type> void add(Type &w1,const Type w2,const Type M_=mod) { w1=md(w1+w2,M_); } void mul(LL &w1,cLL w2,cLL M_=mod) { w1=md(w1*md(w2,M_),M_); } template <typename Type> Type pw(Type X_,Type Y_,Type M_=mod) { Type S_=1; while(Y_) { if(Y_&1) mul(S_,X_,M_); Y_>>=1; mul(X_,X_,M_); } return S_; }
template <typename Type> Type bk(vector <Type> &V_) { auto T_=V_.back(); V_.pop_back(); return T_; } template <typename Type> Type tp(stack <Type> &V_) { auto T_=V_.top(); V_.pop(); return T_; } template <typename Type> Type frt(queue <Type> &V_) { auto T_=V_.front(); V_.pop(); return T_; }
template <typename Type> Type bg(set <Type> &V_) { auto T_=*V_.begin(); V_.erase(V_.begin()); return T_; } template <typename Type> Type bk(set <Type> &V_) { auto T_=*prev(V_.end()); V_.erase(*prev(V_.end())); return T_; }
mt19937 gen(time(NULL)); int rd() { return abs((int)gen()); }
int rnd(int l,int r) { return rd()%(r-l+1)+l; }
char gt[1<<7];
void main_init()
{
    gt['v']='>'; gt['>']='v';
    gt['^']='<'; gt['<']='^';
    gt['.']='.';
}
cint N=1200;
char s[N][N];
char d1[9][8]=
{
"<<<<<<<",
"v.v.v.v",
"v>.<v>.",
"v.^.v.^",
"v>>>.<<",
"v.v.^.v",
"v>.<^>.",
"v.^.^.^",
"v>>>>>>"
};
char d2[9][7]=
{
"<<<<<<",
".v.v.v",
"^.^.^.",
">>>>>>",
"v.v.v.",
".^.<v>",
"<^>.v.",
".^.^.^",
">>>>>>"
};
char d3[9][3]=
{
"<^",
".^",
"<^",
".^",
"<^",
".^",
"<^",
".^",
">>"
};
char e1[11][10]=
{
"<<<<<<<<<",
"v.v.v.v.v",
"v>.^.<v>.",
"v.<^>.v.^",
"v>.<v>.<<",
"v.^.v.^.v",
"v>>>.<^>.",
"v.v.^.<v>",
"v>.<^>.v.",
"v.^.^.^.^",
"v>>>>>>>>"
};
char e2[11][7]=
{
"<<<<<<",
".v.v.v",
"^.^.^.",
">>>>>>",
"v.v.v.",
".^.<v>",
"<^>.v.",
".^.<v>",
"<^>.v.",
".^.^.^",
">>>>>>"
};
char e3[11][3]=
{
"<^",
".^",
"<^",
".^",
"<^",
".^",
"<^",
".^",
"<^",
".^",
">>"
};
void solve1(int x,int y,int n,int m)
{
    if(n==9)
    {
        array <int,9> tot={y,y,y,y,y,y,y,y,y};
        For_(i,0,n) For_(k,0,7) s[x+i][tot[i]++]=d1[i][k];
        int t=(m-9)/6;
        For_(i,0,n) For(round,1,t) For_(k,0,6) s[x+i][tot[i]++]=d2[i][k];
        For_(i,0,n) For_(k,0,2) s[x+i][tot[i]++]=d3[i][k];
        return ;
    }
    For_(i,0,m-1) s[x][y+i]='<';
    For_(i,1,m) s[x+n-1][y+i]='>';
    For_(i,1,n) s[x+i][y]='v';
    For_(i,0,n-1) s[x+i][y+m-1]='^';
    for(int i=2;i<m-2;i+=2) s[x+1][y+i]='v',s[x+n-2][y+i]='^';
    for(int i=3;i<m-2;i+=2) s[x+2][y+i]='^',s[x+n-3][y+i]='v';
    for(int i=2;i<n-2;i+=2) s[x+i][y+1]='>',s[x+i][y+m-2]='<';
    for(int i=3;i<n-2;i+=2) s[x+i][y+2]='<',s[x+i][y+m-3]='>';
    solve1(x+3,y+3,n-6,m-6);
}
void solve2(int x,int y,int n,int m)
{
    if(n==11)
    {
        array <int,11> tot={y,y,y,y,y,y,y,y,y,y,y};
        For_(i,0,n) For_(k,0,9) s[x+i][tot[i]++]=e1[i][k];
        int t=(m-11)/6;
        For_(i,0,n) For(round,1,t) For_(k,0,6) s[x+i][tot[i]++]=e2[i][k];
        For_(i,0,n) For_(k,0,2) s[x+i][tot[i]++]=e3[i][k];
        return ;
    }
    For_(i,0,m-1) s[x][y+i]='<';
    For_(i,1,m) s[x+n-1][y+i]='>';
    For_(i,1,n) s[x+i][y]='v';
    For_(i,0,n-1) s[x+i][y+m-1]='^';
    for(int i=2;i<m-2;i+=2) s[x+1][y+i]='v',s[x+n-2][y+i]='^';
    for(int i=3;i<m-2;i+=2) s[x+2][y+i]='^',s[x+n-3][y+i]='v';
    for(int i=2;i<n-2;i+=2) s[x+i][y+1]='>',s[x+i][y+m-2]='<';
    for(int i=3;i<n-2;i+=2) s[x+i][y+2]='<',s[x+i][y+m-3]='>';
    solve2(x+3,y+3,n-6,m-6);
}
void main_solve()
{
    int n,m; inpr(n,m);
    bool ck=false;
    if(n>m)
    {
        swap(n,m);
        ck=true;
    }
    if(n==2&&m==2)
    {
        printf("Yes\n<^\nv>\n");
        return ;
    }
    else if(n%6==3&&m%6==3)
    {
        if(n==3)
        {
            if(m==3)
                printf("Yes\n<<^\nv.^\nv>>\n");
            else
                printf("No\n");
            return ;
        }
        else
            solve1(0,0,n,m);
    }
    else if(n%6==5&&m%6==5)
    {
        if(n==5)
        {
            if(m==5)
                printf("Yes\n<<<<^\nv.v.^\nv>.<^\nv.^.^\nv>>>>\n");
            else
                printf("No\n");
            return ;
        }
        else
            solve2(0,0,n,m);
    }
    else
    {
        printf("No\n");
        return ;
    }
    For_(i,0,n) For_(j,0,m) if(!s[i][j]) s[i][j]='.';
    if(ck)
    {
        For_(i,0,m) For_(j,i+1,m) swap(s[i][j],s[j][i]);
        swap(n,m);
        For_(i,0,n) For_(j,0,m) s[i][j]=gt[s[i][j]];
    }
    printf("Yes\n");
    For_(i,0,n)
    {
        For_(j,0,m) printf("%c",s[i][j]);
        printf("\n");
    }
}
int main()
{
    ios::sync_with_stdio(0); cin.tie(0);
    // freopen("in.txt","r",stdin);
    // freopen("out.txt","w",stdout);
    // srand(time(NULL));
    main_init();
    // int _; inint(_); For(__,1,_) // T>1 ?
        // printf("\n------------\n\n"),
        main_solve();
    return 0;
}
/*
0 0 1 -2 -3
3 3 2 -2 -3
3 -7 -6 -2 -3
3 -7 3 -1 0
3 6 -4 0 0
-1 -4 6 0 0
-1 -4 6 0 0
*/

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 3

output:

Yes
<<^
v.^
v>>

result:

ok Correct

Test #2:

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

input:

4 4

output:

No

result:

ok Correct : No

Test #3:

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

input:

4 5

output:

No

result:

ok Correct : No

Test #4:

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

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: 3980kb

input:

1000 1000

output:

No

result:

ok Correct : No

Test #6:

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

input:

6 6

output:

No

result:

ok Correct : No

Test #7:

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

input:

7 7

output:

No

result:

ok Correct : No

Test #8:

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

input:

8 8

output:

No

result:

ok Correct : No

Test #9:

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

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: 3768kb

input:

3 9

output:

No

result:

ok Correct : No

Test #11:

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

input:

15 3

output:

No

result:

ok Correct : No

Test #12:

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

input:

5 11

output:

No

result:

ok Correct : No

Test #13:

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

input:

605 5

output:

No

result:

ok Correct : No

Test #14:

score: 0
Accepted
time: 26ms
memory: 5160kb

input:

999 999

output:

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

result:

ok Correct

Test #15:

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

input:

9 999

output:

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

result:

ok Correct

Test #16:

score: 0
Accepted
time: 26ms
memory: 5152kb

input:

995 995

output:

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

result:

ok Correct

Test #17:

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

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>.^.^.v
^>.v.<<<<<v
^.<v>.v.v.v
^>.v.^.^...

result:

ok Correct

Test #18:

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

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: 11ms
memory: 4628kb

input:

663 597

output:

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

result:

ok Correct

Test #20:

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

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: 13ms
memory: 4592kb

input:

587 827

output:

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

result:

ok Correct

Test #22:

score: 0
Accepted
time: 19ms
memory: 4924kb

input:

863 815

output:

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

result:

ok Correct

Test #23:

score: 0
Accepted
time: 16ms
memory: 4940kb

input:

893 671

output:

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

result:

ok Correct

Test #24:

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

input:

1000 996

output:

No

result:

ok Correct : No

Test #25:

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

input:

997 990

output:

No

result:

ok Correct : No

Test #26:

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

input:

991 996

output:

No

result:

ok Correct : No

Test #27:

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

input:

995 999

output:

No

result:

ok Correct : No

Test #28:

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

input:

658 868

output:

No

result:

ok Correct : No

Test #29:

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

input:

155 773

output:

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

result:

ok Correct

Test #30:

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

input:

365 605

output:

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

result:

ok Correct

Test #31:

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

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: 3908kb

input:

748 562

output:

No

result:

ok Correct : No

Test #33:

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

input:

54 252

output:

No

result:

ok Correct : No

Test #34:

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

input:

889 799

output:

No

result:

ok Correct : No

Test #35:

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

input:

504 600

output:

No

result:

ok Correct : No

Test #36:

score: 0
Accepted
time: 10ms
memory: 4596kb

input:

527 701

output:

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

result:

ok Correct

Test #37:

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

input:

195 813

output:

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

result:

ok Correct

Test #38:

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

input:

232 402

output:

No

result:

ok Correct : No

Test #39:

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

input:

326 313

output:

No

result:

ok Correct : No

Test #40:

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

input:

594 628

output:

No

result:

ok Correct : No

Test #41:

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

input:

846 977

output:

No

result:

ok Correct : No

Test #42:

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

input:

795 894

output:

No

result:

ok Correct : No

Test #43:

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

input:

763 660

output:

No

result:

ok Correct : No

Test #44:

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

input:

707 116

output:

No

result:

ok Correct : No

Test #45:

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

input:

555 290

output:

No

result:

ok Correct : No

Test #46:

score: 0
Accepted
time: 15ms
memory: 4964kb

input:

891 597

output:

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

result:

ok Correct

Test #47:

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

input:

580 807

output:

No

result:

ok Correct : No

Test #48:

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

input:

1 1

output:

No

result:

ok Correct : No

Test #49:

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

input:

2 1

output:

No

result:

ok Correct : No

Test #50:

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

input:

1 3

output:

No

result:

ok Correct : No

Test #51:

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

input:

1 4

output:

No

result:

ok Correct : No

Test #52:

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

input:

5 1

output:

No

result:

ok Correct : No

Test #53:

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

input:

2 2

output:

Yes
<^
v>

result:

ok Correct

Test #54:

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

input:

2 3

output:

No

result:

ok Correct : No

Test #55:

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

input:

2 4

output:

No

result:

ok Correct : No

Test #56:

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

input:

2 5

output:

No

result:

ok Correct : No

Test #57:

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

input:

3 4

output:

No

result:

ok Correct : No

Test #58:

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

input:

5 3

output:

No

result:

ok Correct : No

Test #59:

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

input:

5 4

output:

No

result:

ok Correct : No

Test #60:

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

input:

5 5

output:

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

result:

ok Correct

Extra Test:

score: 0
Extra Test Passed