QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#218117#6431. Oops, It's Yesterday Twice MoreHurrikale#WA 0ms1464kbC++14519b2023-10-17 18:44:492023-10-17 18:44:50

Judging History

你现在查看的是最新测评结果

  • [2023-10-17 18:44:50]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:1464kb
  • [2023-10-17 18:44:49]
  • 提交

answer

#include<cstdio>
using namespace std;
int N,A,B;
int Tara,Tarb;
int main()
{
    scanf("%d%d%d",&N,&A,&B);
    Tara=(A>(N>>1));
    Tarb=(B>(N>>1));
        for(int i=1;i<N;++i)
        putchar(Tara?'R':'L');
        for(int i=1;i<N;++i)
        putchar(Tarb?'D':'U');
    for(int i=(Tara?N:1);i>A;--i)
    putchar('L');
    for(int i=(Tara?N:1);i<A;++i)
    putchar('R');
    for(int i=(Tarb?N:1);i>B;--i)
    putchar('U');
    for(int i=(Tarb?N:1);i<B;++i)
    putchar('D');
    putchar('\n');
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 3 3

output:

RRDD

result:

ok n=3, x=3, y=3

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 1464kb

input:

4 3 2

output:

RRRUUULD

result:

wrong answer Failed