QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#758248 | #6431. Oops, It's Yesterday Twice More | surenjamts# | WA | 0ms | 3724kb | C++20 | 942b | 2024-11-17 17:06:30 | 2024-11-17 17:06:32 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mk make_pair
#define S second
#define F first
int main(){
int n, a, b;
cin >> n >> a >> b;
if(a < n/2 && b < n/2){
for(int i = 0; i < n - 1; i++) cout << "UL";
for(int i = 0; i < a - 1; i++) cout << 'D';
for(int i = 0; i < b - 1; i++) cout << 'R';
} else if(a >= n/2 && b < n/2){
for(int i = 0; i < n - 1; i++) cout << "DL";
for(int i = 0; i < n - a; i++) cout << 'U';
for(int i = 0; i < b - 1; i++) cout << 'R';
} else if(a < n/2 && b >= n/2){
for(int i = 0; i < n - 1; i++) cout << "UR";
for(int i = 0; i < a - 1; i++) cout << 'D';
for(int i = 0; i < n - b; i++) cout << 'L';
} else{
for(int i = 0; i < n - 1; i++) cout << "DR";
for(int i = 0; i < n - a; i++) cout << 'U';
for(int i = 0; i < n - b; i++) cout << 'L';
}
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3724kb
input:
3 3 3
output:
DRDR
result:
ok n=3, x=3, y=3
Test #2:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
4 3 2
output:
DRDRDRULL
result:
ok n=4, x=3, y=2
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3648kb
input:
2 1 1
output:
DRUL
result:
wrong answer Too long.