QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#249654 | #6431. Oops, It's Yesterday Twice More | shenxinge | WA | 0ms | 3708kb | C++14 | 550b | 2023-11-12 13:46:33 | 2023-11-12 13:46:33 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std; int n,a,b;
signed main(){
// ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
cin >> n >> a >> b;
if(a>=n-a+1){
for(int i=1;i<n;i++) printf("R");
for(int i=1;i<n-a+1;i++) printf("L");
}
else{
for(int i=1;i<n;i++) printf("L");
for(int i=1;i<a;i++) printf("R");
}
if(b>=n-b+1){
for(int i=1;i<n;i++) printf("D");
for(int i=1;i<n-b+1;i++) printf("U");
}
else{
for(int i=1;i<n;i++) printf("U");
for(int i=1;i<b;i++) printf("D");
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3680kb
input:
3 3 3
output:
RRDD
result:
ok n=3, x=3, y=3
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3708kb
input:
4 3 2
output:
RRRLUUUD
result:
wrong answer Failed