QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#81743#5572. Gridlandiafeecle6418AC ✓5ms4512kbC++14744b2023-02-26 10:43:052023-02-26 10:43:08

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-26 10:43:08]
  • 评测
  • 测评结果:AC
  • 用时:5ms
  • 内存:4512kb
  • [2023-02-26 10:43:05]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int N=1005;
char s[N][N];
int n;
void solve(int l,int r){
	if(l>r)return;
	if(l==r){
		s[l][l]='U';
		s[l+1][l]='U';
		return;
	}
	for(int i=l;i<r;++i)s[l][i]='L';
	for(int i=l;i<r;++i)s[i][r]='U';
	for(int i=l+1;i<=r;++i)s[r][i]='R';
	for(int i=l+1;i<=r;++i)s[i][l]='D';
	solve(l+2,r-2);
}
int main(){
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	cin>>n;
	if(n==1){
		cout<<"L\n";
		return 0; 
	}
	for(int i=1;i<=n;++i)
	for(int j=1;j<=n;++j)s[i][j]='.';
	solve(1,n);
	for(int i=1;i<=n;++i)
	cout<<(s[i]+1)<<'\n';
//	int ct=0;
//	for(int i=1;i<=n;++i)
//	for(int j=1;j<=n;++j)if(s[i][j]!='.')++ct;
//	cerr<<ct<<' '<<(n+1)*(n+1)/2<<endl; 
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1

output:

L

result:

ok answer = 1

Test #2:

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

input:

2

output:

LU
DR

result:

ok answer = 4

Test #3:

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

input:

3

output:

LLU
D.U
DRR

result:

ok answer = 8

Test #4:

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

input:

4

output:

LLLU
D..U
D..U
DRRR

result:

ok answer = 12

Test #5:

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

input:

5

output:

LLLLU
D...U
D.U.U
D.U.U
DRRRR

result:

ok answer = 18

Test #6:

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

input:

6

output:

LLLLLU
D....U
D.LU.U
D.DR.U
D....U
DRRRRR

result:

ok answer = 24

Test #7:

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

input:

7

output:

LLLLLLU
D.....U
D.LLU.U
D.D.U.U
D.DRR.U
D.....U
DRRRRRR

result:

ok answer = 32

Test #8:

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

input:

8

output:

LLLLLLLU
D......U
D.LLLU.U
D.D..U.U
D.D..U.U
D.DRRR.U
D......U
DRRRRRRR

result:

ok answer = 40

Test #9:

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

input:

9

output:

LLLLLLLLU
D.......U
D.LLLLU.U
D.D...U.U
D.D.U.U.U
D.D.U.U.U
D.DRRRR.U
D.......U
DRRRRRRRR

result:

ok answer = 50

Test #10:

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

input:

10

output:

LLLLLLLLLU
D........U
D.LLLLLU.U
D.D....U.U
D.D.LU.U.U
D.D.DR.U.U
D.D....U.U
D.DRRRRR.U
D........U
DRRRRRRRRR

result:

ok answer = 60

Test #11:

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

input:

11

output:

LLLLLLLLLLU
D.........U
D.LLLLLLU.U
D.D.....U.U
D.D.LLU.U.U
D.D.D.U.U.U
D.D.DRR.U.U
D.D.....U.U
D.DRRRRRR.U
D.........U
DRRRRRRRRRR

result:

ok answer = 72

Test #12:

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

input:

12

output:

LLLLLLLLLLLU
D..........U
D.LLLLLLLU.U
D.D......U.U
D.D.LLLU.U.U
D.D.D..U.U.U
D.D.D..U.U.U
D.D.DRRR.U.U
D.D......U.U
D.DRRRRRRR.U
D..........U
DRRRRRRRRRRR

result:

ok answer = 84

Test #13:

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

input:

13

output:

LLLLLLLLLLLLU
D...........U
D.LLLLLLLLU.U
D.D.......U.U
D.D.LLLLU.U.U
D.D.D...U.U.U
D.D.D.U.U.U.U
D.D.D.U.U.U.U
D.D.DRRRR.U.U
D.D.......U.U
D.DRRRRRRRR.U
D...........U
DRRRRRRRRRRRR

result:

ok answer = 98

Test #14:

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

input:

14

output:

LLLLLLLLLLLLLU
D............U
D.LLLLLLLLLU.U
D.D........U.U
D.D.LLLLLU.U.U
D.D.D....U.U.U
D.D.D.LU.U.U.U
D.D.D.DR.U.U.U
D.D.D....U.U.U
D.D.DRRRRR.U.U
D.D........U.U
D.DRRRRRRRRR.U
D............U
DRRRRRRRRRRRRR

result:

ok answer = 112

Test #15:

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

input:

15

output:

LLLLLLLLLLLLLLU
D.............U
D.LLLLLLLLLLU.U
D.D.........U.U
D.D.LLLLLLU.U.U
D.D.D.....U.U.U
D.D.D.LLU.U.U.U
D.D.D.D.U.U.U.U
D.D.D.DRR.U.U.U
D.D.D.....U.U.U
D.D.DRRRRRR.U.U
D.D.........U.U
D.DRRRRRRRRRR.U
D.............U
DRRRRRRRRRRRRRR

result:

ok answer = 128

Test #16:

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

input:

16

output:

LLLLLLLLLLLLLLLU
D..............U
D.LLLLLLLLLLLU.U
D.D..........U.U
D.D.LLLLLLLU.U.U
D.D.D......U.U.U
D.D.D.LLLU.U.U.U
D.D.D.D..U.U.U.U
D.D.D.D..U.U.U.U
D.D.D.DRRR.U.U.U
D.D.D......U.U.U
D.D.DRRRRRRR.U.U
D.D..........U.U
D.DRRRRRRRRRRR.U
D..............U
DRRRRRRRRRRRRRRR

result:

ok answer = 144

Test #17:

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

input:

17

output:

LLLLLLLLLLLLLLLLU
D...............U
D.LLLLLLLLLLLLU.U
D.D...........U.U
D.D.LLLLLLLLU.U.U
D.D.D.......U.U.U
D.D.D.LLLLU.U.U.U
D.D.D.D...U.U.U.U
D.D.D.D.U.U.U.U.U
D.D.D.D.U.U.U.U.U
D.D.D.DRRRR.U.U.U
D.D.D.......U.U.U
D.D.DRRRRRRRR.U.U
D.D...........U.U
D.DRRRRRRRRRRRR.U
D...............U
DRRRRRRRRRRR...

result:

ok answer = 162

Test #18:

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

input:

18

output:

LLLLLLLLLLLLLLLLLU
D................U
D.LLLLLLLLLLLLLU.U
D.D............U.U
D.D.LLLLLLLLLU.U.U
D.D.D........U.U.U
D.D.D.LLLLLU.U.U.U
D.D.D.D....U.U.U.U
D.D.D.D.LU.U.U.U.U
D.D.D.D.DR.U.U.U.U
D.D.D.D....U.U.U.U
D.D.D.DRRRRR.U.U.U
D.D.D........U.U.U
D.D.DRRRRRRRRR.U.U
D.D............U.U
D.DRRRRRRRRRRRR...

result:

ok answer = 180

Test #19:

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

input:

19

output:

LLLLLLLLLLLLLLLLLLU
D.................U
D.LLLLLLLLLLLLLLU.U
D.D.............U.U
D.D.LLLLLLLLLLU.U.U
D.D.D.........U.U.U
D.D.D.LLLLLLU.U.U.U
D.D.D.D.....U.U.U.U
D.D.D.D.LLU.U.U.U.U
D.D.D.D.D.U.U.U.U.U
D.D.D.D.DRR.U.U.U.U
D.D.D.D.....U.U.U.U
D.D.D.DRRRRRR.U.U.U
D.D.D.........U.U.U
D.D.DRRRRRRRRRR.U.U
...

result:

ok answer = 200

Test #20:

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

input:

20

output:

LLLLLLLLLLLLLLLLLLLU
D..................U
D.LLLLLLLLLLLLLLLU.U
D.D..............U.U
D.D.LLLLLLLLLLLU.U.U
D.D.D..........U.U.U
D.D.D.LLLLLLLU.U.U.U
D.D.D.D......U.U.U.U
D.D.D.D.LLLU.U.U.U.U
D.D.D.D.D..U.U.U.U.U
D.D.D.D.D..U.U.U.U.U
D.D.D.D.DRRR.U.U.U.U
D.D.D.D......U.U.U.U
D.D.D.DRRRRRRR.U.U.U
D.D.D....

result:

ok answer = 220

Test #21:

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

input:

980

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 481180

Test #22:

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

input:

981

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 482162

Test #23:

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

input:

982

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 483144

Test #24:

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

input:

983

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 484128

Test #25:

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

input:

984

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 485112

Test #26:

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

input:

985

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 486098

Test #27:

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

input:

986

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 487084

Test #28:

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

input:

987

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 488072

Test #29:

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

input:

988

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 489060

Test #30:

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

input:

989

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 490050

Test #31:

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

input:

990

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 491040

Test #32:

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

input:

991

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 492032

Test #33:

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

input:

992

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 493024

Test #34:

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

input:

993

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 494018

Test #35:

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

input:

994

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 495012

Test #36:

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

input:

995

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 496008

Test #37:

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

input:

996

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 497004

Test #38:

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

input:

997

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 498002

Test #39:

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

input:

998

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 499000

Test #40:

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

input:

999

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 500000

Test #41:

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

input:

1000

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 501000

Test #42:

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

input:

113

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLU
D...............................................................................................................U
D.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 6498

Test #43:

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

input:

844

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 357012

Test #44:

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

input:

629

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 198450

Test #45:

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

input:

303

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 46208

Test #46:

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

input:

985

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 486098

Test #47:

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

input:

111

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLU
D.............................................................................................................U
D.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 6272

Test #48:

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

input:

964

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 465612

Test #49:

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

input:

35

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLU
D.................................U
D.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLU.U
D.D.............................U.U
D.D.LLLLLLLLLLLLLLLLLLLLLLLLLLU.U.U
D.D.D.........................U.U.U
D.D.D.LLLLLLLLLLLLLLLLLLLLLLU.U.U.U
D.D.D.D.....................U.U.U.U
D.D.D.D.LLLL...

result:

ok answer = 648

Test #50:

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

input:

159

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLU
D..............................................................................................................................................

result:

ok answer = 12800

Test #51:

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

input:

515

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 133128

Test #52:

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

input:

82

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLU
D................................................................................U
D.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLU.U
D.D...................................................

result:

ok answer = 3444

Test #53:

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

input:

779

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 304200

Test #54:

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

input:

54

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLU
D....................................................U
D.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLU.U
D.D................................................U.U
D.D.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLU.U.U
D.D.D.......................

result:

ok answer = 1512

Test #55:

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

input:

178

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLU
D...........................................................................................................................

result:

ok answer = 16020

Test #56:

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

input:

492

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 121524

Test #57:

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

input:

400

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 80400

Test #58:

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

input:

567

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 161312

Test #59:

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

input:

785

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 308898

Test #60:

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

input:

643

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 207368

Test #61:

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

input:

932

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok answer = 435244