QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#82623#5572. Gridlandiamagicduck#AC ✓9ms7364kbC++14779b2023-02-28 14:36:442023-02-28 14:36:45

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-02-28 14:36:45]
  • 评测
  • 测评结果:AC
  • 用时:9ms
  • 内存:7364kb
  • [2023-02-28 14:36:44]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
char s[5] = {'.', 'L', 'R', 'U', 'D'};
const int N = 1e3 + 10;
int res[N][N];
int main() {
	int n; cin >> n;
	if(n == 1) {
		puts("U"); return 0;
	}
	if(n & 1) {
		for(int i = 2; i <= n; i++)
			res[2][i] = 2;
		for(int i = 1; i <= n; i += 2)
			res[i][1] = res[i][2] = 1;
		for(int i = 3; i <= n; i += 2)
			res[1][i] = 3;
		for(int i = 3; i <= n; i++) {
			for(int j = 3; j <= n; j += 2)
				res[i][j] = 4;
		}
	}
	else {
		for(int i = 1; i <= n; i++) res[1][i] = 2;
		for(int i = 2; i <= n; i += 2) res[i][1] = 1;
		for(int i = 2; i <= n; i++)
			for(int j = 2; j <= n; j += 2) res[i][j] = 4;
	}
	for(int i = 1; i <= n; i++, puts(""))
		for(int j = 1; j <= n; j++) putchar(s[res[i][j]]);
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3428kb

input:

1

output:

U

result:

ok answer = 1

Test #2:

score: 0
Accepted
time: 2ms
memory: 3256kb

input:

2

output:

RR
LD

result:

ok answer = 4

Test #3:

score: 0
Accepted
time: 2ms
memory: 3392kb

input:

3

output:

LLU
.RR
LLD

result:

ok answer = 8

Test #4:

score: 0
Accepted
time: 2ms
memory: 3440kb

input:

4

output:

RRRR
LD.D
.D.D
LD.D

result:

ok answer = 12

Test #5:

score: 0
Accepted
time: 2ms
memory: 3196kb

input:

5

output:

LLU.U
.RRRR
LLD.D
..D.D
LLD.D

result:

ok answer = 18

Test #6:

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

input:

6

output:

RRRRRR
LD.D.D
.D.D.D
LD.D.D
.D.D.D
LD.D.D

result:

ok answer = 24

Test #7:

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

input:

7

output:

LLU.U.U
.RRRRRR
LLD.D.D
..D.D.D
LLD.D.D
..D.D.D
LLD.D.D

result:

ok answer = 32

Test #8:

score: 0
Accepted
time: 1ms
memory: 3252kb

input:

8

output:

RRRRRRRR
LD.D.D.D
.D.D.D.D
LD.D.D.D
.D.D.D.D
LD.D.D.D
.D.D.D.D
LD.D.D.D

result:

ok answer = 40

Test #9:

score: 0
Accepted
time: 1ms
memory: 3312kb

input:

9

output:

LLU.U.U.U
.RRRRRRRR
LLD.D.D.D
..D.D.D.D
LLD.D.D.D
..D.D.D.D
LLD.D.D.D
..D.D.D.D
LLD.D.D.D

result:

ok answer = 50

Test #10:

score: 0
Accepted
time: 1ms
memory: 3348kb

input:

10

output:

RRRRRRRRRR
LD.D.D.D.D
.D.D.D.D.D
LD.D.D.D.D
.D.D.D.D.D
LD.D.D.D.D
.D.D.D.D.D
LD.D.D.D.D
.D.D.D.D.D
LD.D.D.D.D

result:

ok answer = 60

Test #11:

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

input:

11

output:

LLU.U.U.U.U
.RRRRRRRRRR
LLD.D.D.D.D
..D.D.D.D.D
LLD.D.D.D.D
..D.D.D.D.D
LLD.D.D.D.D
..D.D.D.D.D
LLD.D.D.D.D
..D.D.D.D.D
LLD.D.D.D.D

result:

ok answer = 72

Test #12:

score: 0
Accepted
time: 2ms
memory: 3296kb

input:

12

output:

RRRRRRRRRRRR
LD.D.D.D.D.D
.D.D.D.D.D.D
LD.D.D.D.D.D
.D.D.D.D.D.D
LD.D.D.D.D.D
.D.D.D.D.D.D
LD.D.D.D.D.D
.D.D.D.D.D.D
LD.D.D.D.D.D
.D.D.D.D.D.D
LD.D.D.D.D.D

result:

ok answer = 84

Test #13:

score: 0
Accepted
time: 2ms
memory: 3316kb

input:

13

output:

LLU.U.U.U.U.U
.RRRRRRRRRRRR
LLD.D.D.D.D.D
..D.D.D.D.D.D
LLD.D.D.D.D.D
..D.D.D.D.D.D
LLD.D.D.D.D.D
..D.D.D.D.D.D
LLD.D.D.D.D.D
..D.D.D.D.D.D
LLD.D.D.D.D.D
..D.D.D.D.D.D
LLD.D.D.D.D.D

result:

ok answer = 98

Test #14:

score: 0
Accepted
time: 2ms
memory: 3504kb

input:

14

output:

RRRRRRRRRRRRRR
LD.D.D.D.D.D.D
.D.D.D.D.D.D.D
LD.D.D.D.D.D.D
.D.D.D.D.D.D.D
LD.D.D.D.D.D.D
.D.D.D.D.D.D.D
LD.D.D.D.D.D.D
.D.D.D.D.D.D.D
LD.D.D.D.D.D.D
.D.D.D.D.D.D.D
LD.D.D.D.D.D.D
.D.D.D.D.D.D.D
LD.D.D.D.D.D.D

result:

ok answer = 112

Test #15:

score: 0
Accepted
time: 2ms
memory: 3316kb

input:

15

output:

LLU.U.U.U.U.U.U
.RRRRRRRRRRRRRR
LLD.D.D.D.D.D.D
..D.D.D.D.D.D.D
LLD.D.D.D.D.D.D
..D.D.D.D.D.D.D
LLD.D.D.D.D.D.D
..D.D.D.D.D.D.D
LLD.D.D.D.D.D.D
..D.D.D.D.D.D.D
LLD.D.D.D.D.D.D
..D.D.D.D.D.D.D
LLD.D.D.D.D.D.D
..D.D.D.D.D.D.D
LLD.D.D.D.D.D.D

result:

ok answer = 128

Test #16:

score: 0
Accepted
time: 2ms
memory: 3376kb

input:

16

output:

RRRRRRRRRRRRRRRR
LD.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D

result:

ok answer = 144

Test #17:

score: 0
Accepted
time: 2ms
memory: 3492kb

input:

17

output:

LLU.U.U.U.U.U.U.U
.RRRRRRRRRRRRRRRR
LLD.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D
LLD.D.D.D.D....

result:

ok answer = 162

Test #18:

score: 0
Accepted
time: 2ms
memory: 3336kb

input:

18

output:

RRRRRRRRRRRRRRRRRR
LD.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D....

result:

ok answer = 180

Test #19:

score: 0
Accepted
time: 2ms
memory: 3316kb

input:

19

output:

LLU.U.U.U.U.U.U.U.U
.RRRRRRRRRRRRRRRRRR
LLD.D.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D.D
...

result:

ok answer = 200

Test #20:

score: 0
Accepted
time: 2ms
memory: 3336kb

input:

20

output:

RRRRRRRRRRRRRRRRRRRR
LD.D.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D.D
.D.D.D...

result:

ok answer = 220

Test #21:

score: 0
Accepted
time: 4ms
memory: 7140kb

input:

980

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 481180

Test #22:

score: 0
Accepted
time: 3ms
memory: 7112kb

input:

981

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 482162

Test #23:

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

input:

982

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 483144

Test #24:

score: 0
Accepted
time: 3ms
memory: 7144kb

input:

983

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 484128

Test #25:

score: 0
Accepted
time: 4ms
memory: 7256kb

input:

984

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 485112

Test #26:

score: 0
Accepted
time: 7ms
memory: 7128kb

input:

985

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 486098

Test #27:

score: 0
Accepted
time: 4ms
memory: 7104kb

input:

986

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 487084

Test #28:

score: 0
Accepted
time: 9ms
memory: 7172kb

input:

987

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 488072

Test #29:

score: 0
Accepted
time: 9ms
memory: 7164kb

input:

988

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 489060

Test #30:

score: 0
Accepted
time: 4ms
memory: 7172kb

input:

989

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 490050

Test #31:

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

input:

990

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 491040

Test #32:

score: 0
Accepted
time: 9ms
memory: 7364kb

input:

991

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 492032

Test #33:

score: 0
Accepted
time: 2ms
memory: 7184kb

input:

992

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 493024

Test #34:

score: 0
Accepted
time: 9ms
memory: 7232kb

input:

993

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 494018

Test #35:

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

input:

994

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 495012

Test #36:

score: 0
Accepted
time: 6ms
memory: 7200kb

input:

995

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 496008

Test #37:

score: 0
Accepted
time: 9ms
memory: 7112kb

input:

996

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 497004

Test #38:

score: 0
Accepted
time: 4ms
memory: 7248kb

input:

997

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 498002

Test #39:

score: 0
Accepted
time: 6ms
memory: 7320kb

input:

998

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 499000

Test #40:

score: 0
Accepted
time: 2ms
memory: 7204kb

input:

999

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 500000

Test #41:

score: 0
Accepted
time: 7ms
memory: 7220kb

input:

1000

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 501000

Test #42:

score: 0
Accepted
time: 2ms
memory: 3628kb

input:

113

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U
.RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
LLD.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D....

result:

ok answer = 6498

Test #43:

score: 0
Accepted
time: 2ms
memory: 6596kb

input:

844

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 357012

Test #44:

score: 0
Accepted
time: 5ms
memory: 6324kb

input:

629

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 198450

Test #45:

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

input:

303

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 46208

Test #46:

score: 0
Accepted
time: 1ms
memory: 7068kb

input:

985

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 486098

Test #47:

score: 0
Accepted
time: 2ms
memory: 3712kb

input:

111

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U
.RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
LLD.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D....

result:

ok answer = 6272

Test #48:

score: 0
Accepted
time: 5ms
memory: 7164kb

input:

964

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 465612

Test #49:

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

input:

35

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U
.RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
LLD.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
LLD.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
..D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
LLD.D.D.D.D....

result:

ok answer = 648

Test #50:

score: 0
Accepted
time: 2ms
memory: 3872kb

input:

159

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U
.RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 12800

Test #51:

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

input:

515

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 133128

Test #52:

score: 0
Accepted
time: 2ms
memory: 3636kb

input:

82

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
LD.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D....

result:

ok answer = 3444

Test #53:

score: 0
Accepted
time: 1ms
memory: 7116kb

input:

779

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 304200

Test #54:

score: 0
Accepted
time: 2ms
memory: 3516kb

input:

54

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
LD.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D
LD.D.D.D.D.D.D.D.D.D.D.D....

result:

ok answer = 1512

Test #55:

score: 0
Accepted
time: 3ms
memory: 3976kb

input:

178

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
LD.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D....

result:

ok answer = 16020

Test #56:

score: 0
Accepted
time: 4ms
memory: 6144kb

input:

492

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 121524

Test #57:

score: 0
Accepted
time: 3ms
memory: 4896kb

input:

400

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 80400

Test #58:

score: 0
Accepted
time: 4ms
memory: 5660kb

input:

567

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 161312

Test #59:

score: 0
Accepted
time: 1ms
memory: 6404kb

input:

785

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 308898

Test #60:

score: 0
Accepted
time: 5ms
memory: 6192kb

input:

643

output:

LLU.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U.U....

result:

ok answer = 207368

Test #61:

score: 0
Accepted
time: 1ms
memory: 6976kb

input:

932

output:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 435244