Submission #1441229


Source Code Expand

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cstdlib>
#include <cmath>
#define MAX 1000000000000000000LL

using namespace std;
int main(){
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    int x=c-a;
    int y=d-b;
    for(int i=0; i<y; i++){
        cout<<"U";
    }
    for(int i=0; i<x; i++){
        cout<<"R";
    }
    for(int i=0; i<y; i++){
        cout<<"D";
    }
    for(int i=0; i<x+1; i++){
        cout<<"L";
    }
    for(int i=0; i<y+1; i++){
        cout<<"U";
    }
    for(int i=0; i<x+1; i++){
        cout<<"R";
    }
    cout<<"DR";
    for(int i=0; i<y+1; i++){
        cout<<"D";
    }
    for(int i=0; i<x+1; i++){
        cout<<"L";
    }
    cout<<"U"<<endl;
    return 0;
}

Submission Info

Submission Time
Task C - Back and Forth
User birdway
Language C++14 (GCC 5.4.1)
Score 300
Code Size 771 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 1 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