Submission #1055871


Source Code Expand

Copy
#include<bits/stdc++.h>
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3f
#define MOD 1000000007
#define EPS (1e-10)
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef pair<int, int>P;

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

Submission Info

Submission Time
Task C - Back and Forth
User autumn_eel
Language C++14 (GCC 5.4.1)
Score 300
Code Size 612 Byte
Status
Exec Time 3 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt, sample_02.txt
All 300 / 300 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 3 ms 256 KB
sample_02.txt 3 ms 256 KB
subtask_1_01.txt 3 ms 256 KB
subtask_1_02.txt 3 ms 256 KB
subtask_1_03.txt 3 ms 256 KB
subtask_1_04.txt 3 ms 256 KB
subtask_1_05.txt 3 ms 256 KB
subtask_1_06.txt 2 ms 256 KB
subtask_1_07.txt 3 ms 256 KB
subtask_1_08.txt 3 ms 256 KB
subtask_1_09.txt 3 ms 256 KB
subtask_1_10.txt 3 ms 256 KB