QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#688730 | #6431. Oops, It's Yesterday Twice More | tsai | TL | 0ms | 3772kb | C++14 | 593b | 2024-10-30 13:12:40 | 2024-10-30 13:12:41 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
int x,y;
scanf("%d",&n);
scanf("%d %d",&x,&y);
int jd=1;
if(x+y<=n+1){//上半区
jd=1;
}else{
jd=2;
}
if(jd==1){
for(int i=1;i<n;i++){
cout<<"L";
}
for(int i=1;i<n;i++){
cout<<"U";
}
for(int i=1;i<x;i++){
cout<<"D";
}
for(int i=1;i<y;i++){
cout<<"R";
}
}else{
for(int i=1;i<n;i++){
cout<<"R";
}
for(int i=1;i<n;i++){
cout<<"D";
}
for(int i=n;i>x;i++){
cout<<"U";
}
for(int i=n;i>y;i++){
cout<<"L";
}
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3716kb
input:
3 3 3
output:
RRDD
result:
ok n=3, x=3, y=3
Test #2:
score: 0
Accepted
time: 0ms
memory: 3772kb
input:
4 3 2
output:
LLLUUUDDR
result:
ok n=4, x=3, y=2
Test #3:
score: 0
Accepted
time: 0ms
memory: 3768kb
input:
2 1 1
output:
LU
result:
ok n=2, x=1, y=1
Test #4:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
500 250 250
output:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...
result:
ok n=500, x=250, y=250
Test #5:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
500 250 249
output:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...
result:
ok n=500, x=250, y=249
Test #6:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
500 250 251
output:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...
result:
ok n=500, x=250, y=251
Test #7:
score: -100
Time Limit Exceeded
input:
500 251 251
output:
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...