QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#758248#6431. Oops, It's Yesterday Twice Moresurenjamts#WA 0ms3724kbC++20942b2024-11-17 17:06:302024-11-17 17:06:32

Judging History

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

  • [2024-11-17 17:06:32]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3724kb
  • [2024-11-17 17:06:30]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mk make_pair
#define S second
#define F first
int main(){
	int n, a, b;
	cin >> n >> a >> b;
	if(a < n/2 && b < n/2){
        for(int i = 0; i < n - 1; i++) cout << "UL";
        for(int i = 0; i < a - 1; i++) cout << 'D';
        for(int i = 0; i < b - 1; i++) cout << 'R';
	} else if(a >= n/2 && b < n/2){
	    for(int i = 0; i < n - 1; i++) cout << "DL";
        for(int i = 0; i < n - a; i++) cout << 'U';
        for(int i = 0; i < b - 1; i++) cout << 'R';
	} else if(a < n/2 && b >= n/2){
	    for(int i = 0; i < n - 1; i++) cout << "UR";
        for(int i = 0; i < a - 1; i++) cout << 'D';
        for(int i = 0; i < n - b; i++) cout << 'L';
	} else{
	    for(int i = 0; i < n - 1; i++) cout << "DR";
        for(int i = 0; i < n - a; i++) cout << 'U';
        for(int i = 0; i < n - b; i++) cout << 'L';
	}

}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 3 3

output:

DRDR

result:

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

Test #2:

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

input:

4 3 2

output:

DRDRDRULL

result:

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

Test #3:

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

input:

2 1 1

output:

DRUL

result:

wrong answer Too long.