Submission #3231010


Source Code Expand

#include<bits/stdc++.h>
using namespace std;

#define rp(i,n) for(int i=0;i<n;i++)
#define rep(i,m,n) for(int i=m;i<=n;i++)
#define lrp(i,n) for(long long i=0;i<n;i++)
#define lrep(i,m,n) for(long long i=m;i<=n;i++)
#define sort(a) sort(a.begin(),a.end())
#define reverse(a) reverse(a.begin(),a.end())
#define pb push_back
#define elif else if

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<string> vs;
typedef vector<char> vc;
typedef long long ll;
typedef string S;
typedef pair<int,int> P;

int main(){
    int sx,sy,tx,ty;
    cin >> sx >> sy >> tx >> ty;
    tx-=sx;
    ty-=sy;
    sx=0;
    sy=0;
    rp(i,tx){
        cout << 'R';
    }
    rp(i,ty){
        cout << 'U';
    }
    rp(i,tx){
        cout << 'L';
    }
    rp(i,ty+1){
        cout << 'D';
    }
    rp(i,tx+1){
        cout << 'R';
    }
    rp(i,ty+1){
        cout << 'U';
    }
    cout << "LU";
    rp(i,tx+1){
        cout << 'L';
    }
    rp(i,ty+1){
        cout << 'D';
    }
    cout << 'R' << endl;
    return 0;
}

Submission Info

Submission Time
Task C - Back and Forth
User HoMn
Language C++14 (GCC 5.4.1)
Score 300
Code Size 1081 Byte
Status AC
Exec Time 2 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 12
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All sample_01.txt, sample_02.txt, subtask_1_01.txt, subtask_1_02.txt, subtask_1_03.txt, subtask_1_04.txt, subtask_1_05.txt, subtask_1_06.txt, subtask_1_07.txt, subtask_1_08.txt, subtask_1_09.txt, subtask_1_10.txt
Case Name Status Exec Time Memory
sample_01.txt AC 1 ms 256 KB
sample_02.txt AC 1 ms 256 KB
subtask_1_01.txt AC 1 ms 256 KB
subtask_1_02.txt AC 2 ms 256 KB
subtask_1_03.txt AC 1 ms 256 KB
subtask_1_04.txt AC 1 ms 256 KB
subtask_1_05.txt AC 2 ms 256 KB
subtask_1_06.txt AC 1 ms 256 KB
subtask_1_07.txt AC 1 ms 256 KB
subtask_1_08.txt AC 1 ms 256 KB
subtask_1_09.txt AC 1 ms 256 KB
subtask_1_10.txt AC 1 ms 256 KB