QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#168317 | #6431. Oops, It's Yesterday Twice More | zlxFTH# | WA | 1ms | 3660kb | C++14 | 736b | 2023-09-08 09:24:39 | 2023-09-08 09:24:39 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0)->sync_with_stdio(0);
int n, a, b;
cin >> n >> a >> b;
if (2 * (a - 1) <= n) {
for (int i = 1; i < n; i++) {
cout << "L";
}
for (int i = 1; i < a; i++) {
cout << "R";
}
} else {
for (int i = 1; i < n; i++) {
cout << "R";
}
for (int i = n; i > a; i--) {
cout << "L";
}
}
if (2 * (b - 1) <= n) {
for (int i = 1; i < n; i++) {
cout << "U";
}
for (int i = 1; i < b; i++) {
cout << "D";
}
} else {
for (int i = 1; i < n; i++) {
cout << "D";
}
for (int i = n; i > b; i--) {
cout << "U";
}
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3660kb
input:
3 3 3
output:
RRDD
result:
ok n=3, x=3, y=3
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3636kb
input:
4 3 2
output:
LLLRRUUUD
result:
wrong answer Failed