QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#717581 | #6431. Oops, It's Yesterday Twice More | frogman | WA | 0ms | 3636kb | C++14 | 803b | 2024-11-06 18:23:05 | 2024-11-06 18:23:07 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
int n,a,b;
cin>>n>>a>>b;
if(a<=n/2&&b<=n/2){
for(int i=1;i<n;++i){
cout<<"UL";
}
for(int i=1;i<a;++i){
cout<<"R";
}
for(int i=1;i<b;++i){
cout<<"D";
}
}
if(a>n/2&&b<=n/2){
for(int i=1;i<n;++i){
cout<<"UR";
}
for(int i=1;i<=n-a;++i){
cout<<"L";
}
for(int i=1;i<b;++i){
cout<<"D";
}
}
if(a<=n/2&&b>n/2){
for(int i=1;i<n;++i){
cout<<"LD";
}
for(int i=1;i<a;++i){
cout<<"R";
}
for(int i=1;i<=n-b;++i){
cout<<"U";
}
}
if(a>n/2&&b>n/2){
for(int i=1;i<n;++i){
cout<<"RD";
}
for(int i=1;i<=n-a;++i){
cout<<"L";
}
for(int i=1;i<=n-b;++i){
cout<<"U";
}
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3636kb
input:
3 3 3
output:
RDRD
result:
ok n=3, x=3, y=3
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3552kb
input:
4 3 2
output:
URURURLD
result:
wrong answer Failed