QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#622101#6431. Oops, It's Yesterday Twice MoreKXDdesuWA 0ms3708kbC++231.2kb2024-10-08 19:52:452024-10-08 19:52:47

Judging History

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

  • [2024-10-08 19:52:47]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3708kb
  • [2024-10-08 19:52:45]
  • 提交

answer

#include<bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define lowbit(x) ((x) & (-x))
using i64 = long long;
using pii = std::pair<int, int>;
void solve()
{
    int n, a, b;
    std::cin >> n >> a >> b;
    if (a < n - a) {
        for (int i = 0; i < n - 1; i ++) {
            std::cout << "L";
        }
        for (int i = 0; i < a; i ++) {
            std::cout << "R";
        }
    }
    else {
        for (int i = 0; i < n - 1; i ++) {
            std::cout << "R";
        }
        for (int i = 0; i < n - a - 1; i ++) {
            std::cout << "L";
        }
    }
    if (b < n - b) {
        for (int i = 0; i < n - 1; i ++) {
            std::cout << "U";
        }
        for (int i = 0; i < b; i ++) {
            std::cout << "D";
        }
    }
    else {
        for (int i = 0; i < n - 1; i ++) {
            std::cout << "D";
        }
        for (int i = 0; i < n - 1 - b; i ++) {
            std::cout << "U";
        }
    }
    std::cout << "\n";
}
int main()
{
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    std::ios::sync_with_stdio(false);
    int T = 1;
    //std::cin >> T;
    while (T --) solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 3 3

output:

RRDD

result:

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

Test #2:

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

input:

4 3 2

output:

RRRDDDU

result:

wrong answer Failed