QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#249654#6431. Oops, It's Yesterday Twice MoreshenxingeWA 0ms3708kbC++14550b2023-11-12 13:46:332023-11-12 13:46:33

Judging History

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

  • [2023-11-12 13:46:33]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3708kb
  • [2023-11-12 13:46:33]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std; int n,a,b;
signed main(){
//	ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
	cin >> n >> a >> b;
	if(a>=n-a+1){
		for(int i=1;i<n;i++) printf("R");
		for(int i=1;i<n-a+1;i++) printf("L");	
	}
	else{
		for(int i=1;i<n;i++) printf("L");
		for(int i=1;i<a;i++) printf("R");	
	}
	if(b>=n-b+1){
		for(int i=1;i<n;i++) printf("D");
		for(int i=1;i<n-b+1;i++) printf("U");	
	}
	else{
		for(int i=1;i<n;i++) printf("U");
		for(int i=1;i<b;i++) printf("D");	
	}
	return 0;	
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 3 3

output:

RRDD

result:

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

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3708kb

input:

4 3 2

output:

RRRLUUUD

result:

wrong answer Failed