QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#95095#5572. GridlandiaSEM_PRESSAO_pedroteosousa#AC ✓23ms4104kbC++231.2kb2023-04-09 03:43:212023-04-09 03:43:23

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-09 03:43:23]
  • 评测
  • 测评结果:AC
  • 用时:23ms
  • 内存:4104kb
  • [2023-04-09 03:43:21]
  • 提交

answer

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

#define IOS ios_base::sync_with_stdio (0); cin.tie (0);

int n;

void solve () {
    cin >> n;

    if (n == 1) {
        cout << "L\n";
        return;
    }
    if (n == 2) {
        cout << "LU\nDR\n";
        return;
    }

    if (n & 1) {
        vector a (n, vector<char> (n, '.'));
        a[0][0] = 'U';
        for (int j = 1; j < n; j++) a[0][j] = 'R';
        for (int i = 1; i < n; i++) {
            for (int j = 0; j < n; j += 2) a[i][j] = 'D';
        }
        a[1][0] = a[1][1] = 'L';
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) cout << a[i][j];
            cout << "\n";
        }
    }
    else {
        vector a (n, vector<char> (n, '.'));
        a[0][0] = 'L';
        a[0][1] = 'U';
        for (int j = 2; j < n; j++) a[0][j] = 'R';

        for (int i = 1; i < n; i++)
            for (int j = 1; j < n; j += 2) a[i][j] = 'D';

        a[1][0] = a[1][1] = 'R';
        
        for (int i = 3; i < n; i += 2) a[i][0] = 'L';

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) cout << a[i][j];
            cout << "\n";
        }
    }
}

signed main () {
    IOS;
    solve ();
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1

output:

L

result:

ok answer = 1

Test #2:

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

input:

2

output:

LU
DR

result:

ok answer = 4

Test #3:

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

input:

3

output:

URR
LLD
D.D

result:

ok answer = 8

Test #4:

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

input:

4

output:

LURR
RR.D
.D.D
LD.D

result:

ok answer = 12

Test #5:

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

input:

5

output:

URRRR
LLD.D
D.D.D
D.D.D
D.D.D

result:

ok answer = 18

Test #6:

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

input:

6

output:

LURRRR
RR.D.D
.D.D.D
LD.D.D
.D.D.D
LD.D.D

result:

ok answer = 24

Test #7:

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

input:

7

output:

URRRRRR
LLD.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 = 32

Test #8:

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

input:

8

output:

LURRRRRR
RR.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: 2ms
memory: 3464kb

input:

9

output:

URRRRRRRR
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.D.D

result:

ok answer = 50

Test #10:

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

input:

10

output:

LURRRRRRRR
RR.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: 2ms
memory: 3396kb

input:

11

output:

URRRRRRRRRR
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.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 = 72

Test #12:

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

input:

12

output:

LURRRRRRRRRR
RR.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: 1ms
memory: 3400kb

input:

13

output:

URRRRRRRRRRRR
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.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 = 98

Test #14:

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

input:

14

output:

LURRRRRRRRRRRR
RR.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: 3468kb

input:

15

output:

URRRRRRRRRRRRRR
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.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

result:

ok answer = 128

Test #16:

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

input:

16

output:

LURRRRRRRRRRRRRR
RR.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: 3424kb

input:

17

output:

URRRRRRRRRRRRRRRR
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.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.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 = 162

Test #18:

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

input:

18

output:

LURRRRRRRRRRRRRRRR
RR.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: 0ms
memory: 3420kb

input:

19

output:

URRRRRRRRRRRRRRRRRR
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.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.D
D.D.D.D.D.D.D.D.D.D
D.D.D.D.D.D.D.D.D.D
...

result:

ok answer = 200

Test #20:

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

input:

20

output:

LURRRRRRRRRRRRRRRRRR
RR.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: 11ms
memory: 4036kb

input:

980

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 481180

Test #22:

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

input:

981

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 482162

Test #23:

score: 0
Accepted
time: 21ms
memory: 3904kb

input:

982

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 483144

Test #24:

score: 0
Accepted
time: 11ms
memory: 3948kb

input:

983

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 484128

Test #25:

score: 0
Accepted
time: 18ms
memory: 4104kb

input:

984

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 485112

Test #26:

score: 0
Accepted
time: 22ms
memory: 3944kb

input:

985

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 486098

Test #27:

score: 0
Accepted
time: 15ms
memory: 4096kb

input:

986

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 487084

Test #28:

score: 0
Accepted
time: 21ms
memory: 3968kb

input:

987

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 488072

Test #29:

score: 0
Accepted
time: 12ms
memory: 3944kb

input:

988

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 489060

Test #30:

score: 0
Accepted
time: 11ms
memory: 3992kb

input:

989

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 490050

Test #31:

score: 0
Accepted
time: 18ms
memory: 4100kb

input:

990

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 491040

Test #32:

score: 0
Accepted
time: 18ms
memory: 3988kb

input:

991

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 492032

Test #33:

score: 0
Accepted
time: 20ms
memory: 4036kb

input:

992

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 493024

Test #34:

score: 0
Accepted
time: 16ms
memory: 4032kb

input:

993

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 494018

Test #35:

score: 0
Accepted
time: 23ms
memory: 3968kb

input:

994

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 495012

Test #36:

score: 0
Accepted
time: 22ms
memory: 4032kb

input:

995

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 496008

Test #37:

score: 0
Accepted
time: 23ms
memory: 3952kb

input:

996

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 497004

Test #38:

score: 0
Accepted
time: 10ms
memory: 3968kb

input:

997

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 498002

Test #39:

score: 0
Accepted
time: 12ms
memory: 4100kb

input:

998

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 499000

Test #40:

score: 0
Accepted
time: 22ms
memory: 4024kb

input:

999

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 500000

Test #41:

score: 0
Accepted
time: 23ms
memory: 3944kb

input:

1000

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 501000

Test #42:

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

input:

113

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
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.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 = 6498

Test #43:

score: 0
Accepted
time: 16ms
memory: 3728kb

input:

844

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 357012

Test #44:

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

input:

629

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 198450

Test #45:

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

input:

303

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 46208

Test #46:

score: 0
Accepted
time: 14ms
memory: 3904kb

input:

985

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 486098

Test #47:

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

input:

111

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
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.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 = 6272

Test #48:

score: 0
Accepted
time: 15ms
memory: 4020kb

input:

964

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 465612

Test #49:

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

input:

35

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
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.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.D.D.D.D.D.D.D
D.D.D.D.D.D....

result:

ok answer = 648

Test #50:

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

input:

159

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
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.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 = 12800

Test #51:

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

input:

515

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 133128

Test #52:

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

input:

82

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RR.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: 8ms
memory: 3724kb

input:

779

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 304200

Test #54:

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

input:

54

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RR.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: 0ms
memory: 3520kb

input:

178

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RR.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: 7ms
memory: 3532kb

input:

492

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 121524

Test #57:

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

input:

400

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 80400

Test #58:

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

input:

567

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 161312

Test #59:

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

input:

785

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 308898

Test #60:

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

input:

643

output:

URRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 207368

Test #61:

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

input:

932

output:

LURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok answer = 435244