Submission #1057222


Source Code Expand

Copy
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<limits.h>

int main(){
	int sx,sy,tx,ty;
	scanf("%d %d %d %d",&sx,&sy,&tx,&ty);
	int i;
	for(i=0;i<tx-sx;i++){
		putchar('R');
	}
	for(i=0;i<ty-sy;i++){
		putchar('U');
	}
	for(i=0;i<tx-sx;i++){
		putchar('L');
	}
	for(i=0;i<ty-sy;i++){
		putchar('D');
	}
	putchar('D');
	for(i=0;i<tx-sx+1;i++){
		putchar('R');
	}
	for(i=0;i<ty-sy+1;i++){
		putchar('U');
	}
	putchar('L');
	putchar('U');
	for(i=0;i<tx-sx+1;i++){
		putchar('L');
	}
	for(i=0;i<ty-sy+1;i++){
		putchar('D');
	}
	putchar('R');
	putchar('\n');
	
	return 0;
}

Submission Info

Submission Time
Task C - Back and Forth
User mono1977
Language C (GCC 5.4.1)
Score 300
Code Size 625 Byte
Status
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:8:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d %d %d",&sx,&sy,&tx,&ty);
  ^

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 1 ms 128 KB
sample_02.txt 1 ms 128 KB
subtask_1_01.txt 1 ms 128 KB
subtask_1_02.txt 1 ms 128 KB
subtask_1_03.txt 1 ms 128 KB
subtask_1_04.txt 1 ms 128 KB
subtask_1_05.txt 1 ms 128 KB
subtask_1_06.txt 1 ms 128 KB
subtask_1_07.txt 1 ms 128 KB
subtask_1_08.txt 1 ms 128 KB
subtask_1_09.txt 1 ms 128 KB
subtask_1_10.txt 1 ms 128 KB