QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#464618 | #6431. Oops, It's Yesterday Twice More | younger# | WA | 0ms | 3624kb | C++20 | 1.6kb | 2024-07-06 13:05:34 | 2024-07-06 13:05:35 |
Judging History
answer
#include<iostream>
#include<cstring>
#include<cmath>
#include<cstdio>
#include<vector>
#include<map>
#include<algorithm>
#include<queue>
#include <iomanip>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4.1,sse4.2,avx,avx2,popcnt,tune=native")
using namespace std;
typedef long long LL;
typedef __int128 i128;
typedef unsigned long long ULL;
typedef double db;
void Asuka()
{
int n , a , b;
cin >> n >> a >> b;
if(a <= n / 2 && b <= n / 2){
for(int i = 1 ; i < n ; i ++)
cout << 'L';
for(int i = 1 ; i < n ; i ++)
cout << 'U';
for(int i = 1 ; i < a ; i ++)
cout << 'D';
for(int i = 1 ; i < b ; i ++)
cout << 'R';
}else if(a >= n / 2 && b >= n / 2){
for(int i = 1 ; i < n ; i ++)
cout << 'R';
for(int i = 1 ; i < n ; i ++)
cout << 'D';
for(int i = 1 ; i < n - a ; i ++)
cout << 'U';
for(int i = 1 ; i < n - b ; i ++)
cout << 'L';
}else if(a >= n / 2 && b <= n / 2){
for(int i = 1 ; i < n ; i ++)
cout << 'L';
for(int i = 1 ; i < n ; i ++)
cout << 'D';
for(int i = 1 ; i < n - a ; i ++)
cout << 'U';
for(int i = 1 ; i < b ; i ++)
cout << 'R';
}else if(a <= n / 2 && b >= n / 2){
for(int i = 1 ; i < n ; i ++)
cout << 'R';
for(int i = 1 ; i < n ; i ++)
cout << 'U';
for(int i = 1 ; i < a ; i ++)
cout << 'D';
for(int i = 1 ; i < n - b ; i ++)
cout << 'L';
}
return;
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t = 1;
// cin >> t;
while(t --){
Asuka();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3552kb
input:
3 3 3
output:
RRDD
result:
ok n=3, x=3, y=3
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3624kb
input:
4 3 2
output:
RRRDDDL
result:
wrong answer Failed