QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#168318 | #6431. Oops, It's Yesterday Twice More | zlxFTH# | WA | 2ms | 3716kb | C++14 | 751b | 2023-09-08 09:26:24 | 2023-09-08 09:26:26 |
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;
swap(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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3564kb
input:
3 3 3
output:
RRDD
result:
ok n=3, x=3, y=3
Test #2:
score: 0
Accepted
time: 2ms
memory: 3648kb
input:
4 3 2
output:
LLLRUUUDD
result:
ok n=4, x=3, y=2
Test #3:
score: 0
Accepted
time: 2ms
memory: 3644kb
input:
2 1 1
output:
LU
result:
ok n=2, x=1, y=1
Test #4:
score: 0
Accepted
time: 2ms
memory: 3644kb
input:
500 250 250
output:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...
result:
ok n=500, x=250, y=250
Test #5:
score: 0
Accepted
time: 2ms
memory: 3588kb
input:
500 250 249
output:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...
result:
ok n=500, x=250, y=249
Test #6:
score: 0
Accepted
time: 2ms
memory: 3716kb
input:
500 250 251
output:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...
result:
ok n=500, x=250, y=251
Test #7:
score: -100
Wrong Answer
time: 2ms
memory: 3708kb
input:
500 251 251
output:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...
result:
wrong answer Too long.