QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#684656#6431. Oops, It's Yesterday Twice Morecatch-up-from-behind#WA 0ms3724kbC++171.3kb2024-10-28 15:04:052024-10-28 15:04:05

Judging History

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

  • [2024-10-28 15:04:05]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3724kb
  • [2024-10-28 15:04:05]
  • 提交

answer

// sis puella oier
#include <bits/stdc++.h>
using namespace std;
// #define int long long
typedef long long ll;
ll read(){
    ll xx = 0, f = 1; char ch = getchar();
    for (;!isdigit(ch); ch = getchar())f = (ch == '-' ? -1 : 1);
    for (; isdigit(ch); ch = getchar())xx = (xx << 3) + (xx << 1) + ch - '0';
    return xx * f;
}
signed main(){
    int n = read(), a = read(), b = read();
    if (a - 1 + b - 1 <= n - 1){
    for (int i = 1; i < n; ++i)printf("L");
    for (int i = 1; i < n; ++i)printf("U");
    for (int i = 1; i < a; ++i)printf("R");
    for (int i = 1; i < b; ++i)printf("D");
    }
    else if (n - a + n - b <= n - 1){
    for (int i = 1; i < n; ++i)printf("R");
    for (int i = 1; i < n; ++i)printf("D");
    for (int i = a; i < n; ++i)printf("L");
    for (int i = b; i < n; ++i)printf("U");
    }
    else if (n - a + b - 1 <= n - 1){
    for (int i = 1; i < n; ++i)printf("R");
    for (int i = 1; i < n; ++i)printf("U");
    for (int i = a; i < n; ++i)printf("L");
    for (int i = 1; i < b; ++i)printf("D");
    }
    else if (a - 1 + n - b <= n - 1){
    for (int i = 1; i < n; ++i)printf("L");
    for (int i = 1; i < n; ++i)printf("D");
    for (int i = 1; i < a; ++i)printf("R");
    for (int i = b; i < n; ++i)printf("U");
    }
    else assert(0);
    return 0;
}


詳細信息

Test #1:

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

input:

3 3 3

output:

RRDD

result:

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

Test #2:

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

input:

4 3 2

output:

LLLUUURRD

result:

wrong answer Failed