QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#688730#6431. Oops, It's Yesterday Twice MoretsaiTL 0ms3772kbC++14593b2024-10-30 13:12:402024-10-30 13:12:41

Judging History

你现在查看的是最新测评结果

  • [2024-10-30 13:12:41]
  • 评测
  • 测评结果:TL
  • 用时:0ms
  • 内存:3772kb
  • [2024-10-30 13:12:40]
  • 提交

answer

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

int main(){
	int n;
	int x,y;
	scanf("%d",&n);
	scanf("%d %d",&x,&y);
	int jd=1;
	if(x+y<=n+1){//上半区
		jd=1;
	}else{
		jd=2;
	}
	if(jd==1){
		for(int i=1;i<n;i++){
			cout<<"L";
		}
		for(int i=1;i<n;i++){
			cout<<"U";
		}
		for(int i=1;i<x;i++){
			cout<<"D";
		}
		for(int i=1;i<y;i++){
			cout<<"R";
		}
	}else{
		for(int i=1;i<n;i++){
			cout<<"R";
		}
		for(int i=1;i<n;i++){
			cout<<"D";
		}
		for(int i=n;i>x;i++){
			cout<<"U";
		}
		for(int i=n;i>y;i++){
			cout<<"L";
		}
	}
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3716kb

input:

3 3 3

output:

RRDD

result:

ok n=3, x=3, y=3

Test #2:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

4 3 2

output:

LLLUUUDDR

result:

ok n=4, x=3, y=2

Test #3:

score: 0
Accepted
time: 0ms
memory: 3768kb

input:

2 1 1

output:

LU

result:

ok n=2, x=1, y=1

Test #4:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

500 250 250

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok n=500, x=250, y=250

Test #5:

score: 0
Accepted
time: 0ms
memory: 3764kb

input:

500 250 249

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok n=500, x=250, y=249

Test #6:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

500 250 251

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok n=500, x=250, y=251

Test #7:

score: -100
Time Limit Exceeded

input:

500 251 251

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result: