Submission #1055763
Source Code Expand
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define FOR(i,k,n) for (int (i)=(k); (i)<(n); ++(i))
#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define all(v) begin(v), end(v)
#define debug(x) cerr<< #x <<": "<<x<<endl
#define debug2(x,y) cerr<< #x <<": "<< x <<", "<< #y <<": "<< y <<endl
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef vector<ll> vll;
typedef vector<vector<ll> > vvll;
template<class T> using vv=vector<vector< T > >;
int main() {
int sx, sy, tx, ty;
scanf("%d %d %d %d", &sx, &sy, &tx, &ty);
int dx = tx - sx;
int dy = ty - sy;
rep (i, dx) {
printf("R");
}
rep (i, dy) {
printf("U");
}
rep (i, dx) {
printf("L");
}
rep (i, dy) {
printf("D");
}
printf("D");
rep (i, dx+1) {
printf("R");
}
rep (i, dy+1) {
printf("U");
}
printf("LU");
rep (i, dx+1) {
printf("L");
}
rep (i, dy+1) {
printf("D");
}
printf("R\n");
return 0;
}
Submission Info
Submission Time |
|
Task |
C - Back and Forth |
User |
tspcx |
Language |
C++14 (Clang 3.8.0) |
Score |
300 |
Code Size |
1420 Byte |
Status |
AC |
Exec Time |
6 ms |
Memory |
760 KB |
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
300 / 300 |
Status |
|
|
Set Name |
Test Cases |
Sample |
sample_01.txt, sample_02.txt |
All |
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 |
6 ms |
760 KB |
sample_02.txt |
AC |
3 ms |
256 KB |
subtask_1_01.txt |
AC |
3 ms |
256 KB |
subtask_1_02.txt |
AC |
3 ms |
256 KB |
subtask_1_03.txt |
AC |
3 ms |
256 KB |
subtask_1_04.txt |
AC |
3 ms |
256 KB |
subtask_1_05.txt |
AC |
3 ms |
256 KB |
subtask_1_06.txt |
AC |
3 ms |
256 KB |
subtask_1_07.txt |
AC |
3 ms |
256 KB |
subtask_1_08.txt |
AC |
3 ms |
256 KB |
subtask_1_09.txt |
AC |
3 ms |
256 KB |
subtask_1_10.txt |
AC |
3 ms |
256 KB |