QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#710193#6431. Oops, It's Yesterday Twice MoreKiharaTouma#WA 1ms3844kbC++141.1kb2024-11-04 19:01:032024-11-04 19:01:04

Judging History

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

  • [2024-11-04 19:01:04]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3844kb
  • [2024-11-04 19:01:03]
  • 提交

answer

//qoj6431
#include <bits/stdc++.h>
using namespace std;

int n, a, b;

int main(){
    scanf("%d%d%d", &n, &a, &b);
    if(a + b - 2 < n){
        for(int i = 1; i < n; ++ i) putchar('U');
        for(int i = 1; i < n; ++ i) putchar('L');
        for(int i = 1; i < a; ++ i) putchar('D');
        for(int i = 1; i < b; ++ i) putchar('R');
    } else if((a-1) + (n-b) < n){
        for(int i = 1; i < n; ++ i) putchar('U');
        for(int i = 1; i < n; ++ i) putchar('R');
        for(int i = 1; i < a; ++ i) putchar('D');
        for(int i = 1; i < n-b; ++ i) putchar('L');
    } else if((n-a) + (b-1) < n){
        for(int i = 1; i < n; ++ i) putchar('D');
        for(int i = 1; i < n; ++ i) putchar('L');
        for(int i = 1; i < n-a; ++ i) putchar('U');
        for(int i = 1; i < b; ++ i) putchar('R');
    } else if((n-a) + (n-b) < n){
        for(int i = 1; i < n; ++ i) putchar('D');
        for(int i = 1; i < n; ++ i) putchar('R');
        for(int i = 1; i < n-a; ++ i) putchar('U');
        for(int i = 1; i < n-b; ++ i) putchar('L');
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 3 3

output:

UURRDD

result:

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

Test #2:

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

input:

4 3 2

output:

UUULLLDDR

result:

ok n=4, x=3, y=2

Test #3:

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

input:

2 1 1

output:

UL

result:

ok n=2, x=1, y=1

Test #4:

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

input:

500 250 250

output:

UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU...

result:

ok n=500, x=250, y=250

Test #5:

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

input:

500 250 249

output:

UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU...

result:

ok n=500, x=250, y=249

Test #6:

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

input:

500 250 251

output:

UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU...

result:

ok n=500, x=250, y=251

Test #7:

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

input:

500 251 251

output:

UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU...

result:

wrong answer Failed