QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#576434#8687. Toy Train TracksJWRuixiAC ✓2ms3708kbC++202.3kb2024-09-19 20:19:222024-09-19 20:19:22

Judging History

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

  • [2024-09-19 20:19:22]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3708kb
  • [2024-09-19 20:19:22]
  • 提交

answer

#include <bits/stdc++.h>
#define IL inline
#define LL long long
#define eb emplace_back
#define L(i, j, k) for (int i = (j); i <= (k); ++i)
#define R(i, j, k) for (int i = (j); i >= (k); --i)
using namespace std;

using vi = vector<int>;

int main () {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  // constexpr int n = 16;
  // array<array<bool, 2 * n + 1>, 2 * n + 1> vis;
  // L (i, 0, (1 << n) - 1) {
  //   L (j, 0, 2 * n) {
  //     vis[j].fill(false);
  //   }
  //   bool f = 1;
  //   int x = n, y = n, dx = 1, dy = 0;
  //   L (j, 0, n - 1) {
  //     if (i >> j & 1) {
  //       swap(dx, dy);
  //       dx = -dx;
  //     } else {
  //       dx = -dx;
  //       swap(dx, dy);
  //     }
  //     x += dx, y += dy;
  //     if (vis[x][y]) {
  //       f = 0;
  //     }
  //     vis[x][y] = 1;
  //   }
  //   if (x != n || y != n || dx != 1 || dy != 0) {
  //     f = 0;
  //   }
  //   if (f) {
  //     L (j, 0, n - 1) {
  //       cout << (i >> j & 1 ? 'L' : 'R');
  //     }
  //     cout << '\n';
  //   }
  // }
  int A, B;
  cin >> A >> B;
  int a = A / 2;
  int b = B / 4;
  if (b == 2) {
    if (!a) {
      --b;
    } else {
      bool f = a && (B - b * 4 >= 2);
      if (f) {
        a -= f;
        L (i, 1, a) {
          cout << 'S';
        }  
        cout << "LSL";
        L (i, 1, a) {
          cout << 'S';
        }
        cout << "LRSLLRLLR";
        return 0;
      }
      --a;
      L (i, 1, a) {
        cout << 'S';
      }
      cout << "RR";
      L (i, 1, a) {
        cout << 'S';
      }
      cout << "LRRSSRRL";
      return 0;
    }
  }
  bool f = a && (B - b * 4 >= 2);
  a -= f;
  if (b >= 2) {
    if (f) {
      cout << "RL";
    }
    L (i, 1, a) {
      cout << 'S';
    }
    cout << "RR";
    L (i, 1, a + f) {
      cout << 'S';
    }
    L (i, 1, b - 2) {
      cout << "LR";
    }
    cout << "RLR";
    if (f) {
      cout << 'S';
    }
    cout << 'R';
    L (i, 1, b - 2) {
      cout << "LR";
    }
    cout << "RL";
  } else {
    L (i, 1, a + f) {
      cout << 'S';
    }
    cout << "RR";
    if (f) {
      cout << "LR";
    }
    L (i, 1, a) {
      cout << 'S';
    }
    cout << 'R';
    if (f) {
      cout << 'S';
    }
    cout << 'R';
  }
}
// I love WHQ!

详细

Test #1:

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

input:

0 4

output:

RRRR

result:

ok correct, length = 4

Test #2:

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

input:

1 4

output:

RRRR

result:

ok correct, length = 4

Test #3:

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

input:

2 4

output:

SRRSRR

result:

ok correct, length = 6

Test #4:

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

input:

3 4

output:

SRRSRR

result:

ok correct, length = 6

Test #5:

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

input:

4 4

output:

SSRRSSRR

result:

ok correct, length = 8

Test #6:

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

input:

0 5

output:

RRRR

result:

ok correct, length = 4

Test #7:

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

input:

0 6

output:

RRRR

result:

ok correct, length = 4

Test #8:

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

input:

0 7

output:

RRRR

result:

ok correct, length = 4

Test #9:

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

input:

0 8

output:

RRRR

result:

ok correct, length = 4

Test #10:

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

input:

0 9

output:

RRRR

result:

ok correct, length = 4

Test #11:

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

input:

0 10

output:

RRRR

result:

ok correct, length = 4

Test #12:

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

input:

0 11

output:

RRRR

result:

ok correct, length = 4

Test #13:

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

input:

0 12

output:

RRLRRLRRLRRL

result:

ok correct, length = 12

Test #14:

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

input:

0 13

output:

RRLRRLRRLRRL

result:

ok correct, length = 12

Test #15:

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

input:

0 14

output:

RRLRRLRRLRRL

result:

ok correct, length = 12

Test #16:

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

input:

0 15

output:

RRLRRLRRLRRL

result:

ok correct, length = 12

Test #17:

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

input:

0 16

output:

RRLRLRRLRRLRLRRL

result:

ok correct, length = 16

Test #18:

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

input:

0 17

output:

RRLRLRRLRRLRLRRL

result:

ok correct, length = 16

Test #19:

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

input:

0 18

output:

RRLRLRRLRRLRLRRL

result:

ok correct, length = 16

Test #20:

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

input:

0 19

output:

RRLRLRRLRRLRLRRL

result:

ok correct, length = 16

Test #21:

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

input:

0 20

output:

RRLRLRLRRLRRLRLRLRRL

result:

ok correct, length = 20

Test #22:

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

input:

0 21

output:

RRLRLRLRRLRRLRLRLRRL

result:

ok correct, length = 20

Test #23:

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

input:

0 22

output:

RRLRLRLRRLRRLRLRLRRL

result:

ok correct, length = 20

Test #24:

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

input:

0 23

output:

RRLRLRLRRLRRLRLRLRRL

result:

ok correct, length = 20

Test #25:

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

input:

0 24

output:

RRLRLRLRLRRLRRLRLRLRLRRL

result:

ok correct, length = 24

Test #26:

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

input:

0 25

output:

RRLRLRLRLRRLRRLRLRLRLRRL

result:

ok correct, length = 24

Test #27:

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

input:

0 26

output:

RRLRLRLRLRRLRRLRLRLRLRRL

result:

ok correct, length = 24

Test #28:

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

input:

0 27

output:

RRLRLRLRLRRLRRLRLRLRLRRL

result:

ok correct, length = 24

Test #29:

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

input:

0 28

output:

RRLRLRLRLRLRRLRRLRLRLRLRLRRL

result:

ok correct, length = 28

Test #30:

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

input:

0 29

output:

RRLRLRLRLRLRRLRRLRLRLRLRLRRL

result:

ok correct, length = 28

Test #31:

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

input:

0 30

output:

RRLRLRLRLRLRRLRRLRLRLRLRLRRL

result:

ok correct, length = 28

Test #32:

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

input:

5 5

output:

SSRRSSRR

result:

ok correct, length = 8

Test #33:

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

input:

6 6

output:

SSSRRLRSSRSR

result:

ok correct, length = 12

Test #34:

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

input:

7 7

output:

SSSRRLRSSRSR

result:

ok correct, length = 12

Test #35:

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

input:

8 8

output:

SSSRRSSSLRRSSRRL

result:

ok correct, length = 16

Test #36:

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

input:

9 9

output:

SSSRRSSSLRRSSRRL

result:

ok correct, length = 16

Test #37:

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

input:

10 10

output:

SSSSLSLSSSSLRSLLRLLR

result:

ok correct, length = 20

Test #38:

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

input:

11 11

output:

SSSSLSLSSSSLRSLLRLLR

result:

ok correct, length = 20

Test #39:

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

input:

12 12

output:

SSSSSSRRSSSSSSLRRLRRLRRL

result:

ok correct, length = 24

Test #40:

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

input:

13 13

output:

SSSSSSRRSSSSSSLRRLRRLRRL

result:

ok correct, length = 24

Test #41:

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

input:

14 14

output:

RLSSSSSSRRSSSSSSSLRRLRSRLRRL

result:

ok correct, length = 28

Test #42:

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

input:

15 15

output:

RLSSSSSSRRSSSSSSSLRRLRSRLRRL

result:

ok correct, length = 28

Test #43:

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

input:

16 16

output:

SSSSSSSSRRSSSSSSSSLRLRRLRRLRLRRL

result:

ok correct, length = 32

Test #44:

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

input:

17 17

output:

SSSSSSSSRRSSSSSSSSLRLRRLRRLRLRRL

result:

ok correct, length = 32

Test #45:

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

input:

18 18

output:

RLSSSSSSSSRRSSSSSSSSSLRLRRLRSRLRLRRL

result:

ok correct, length = 36

Test #46:

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

input:

19 19

output:

RLSSSSSSSSRRSSSSSSSSSLRLRRLRSRLRLRRL

result:

ok correct, length = 36

Test #47:

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

input:

20 20

output:

SSSSSSSSSSRRSSSSSSSSSSLRLRLRRLRRLRLRLRRL

result:

ok correct, length = 40

Test #48:

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

input:

21 21

output:

SSSSSSSSSSRRSSSSSSSSSSLRLRLRRLRRLRLRLRRL

result:

ok correct, length = 40

Test #49:

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

input:

22 22

output:

RLSSSSSSSSSSRRSSSSSSSSSSSLRLRLRRLRSRLRLRLRRL

result:

ok correct, length = 44

Test #50:

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

input:

23 23

output:

RLSSSSSSSSSSRRSSSSSSSSSSSLRLRLRRLRSRLRLRLRRL

result:

ok correct, length = 44

Test #51:

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

input:

24 24

output:

SSSSSSSSSSSSRRSSSSSSSSSSSSLRLRLRLRRLRRLRLRLRLRRL

result:

ok correct, length = 48

Test #52:

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

input:

25 25

output:

SSSSSSSSSSSSRRSSSSSSSSSSSSLRLRLRLRRLRRLRLRLRLRRL

result:

ok correct, length = 48

Test #53:

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

input:

26 26

output:

RLSSSSSSSSSSSSRRSSSSSSSSSSSSSLRLRLRLRRLRSRLRLRLRLRRL

result:

ok correct, length = 52

Test #54:

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

input:

27 27

output:

RLSSSSSSSSSSSSRRSSSSSSSSSSSSSLRLRLRLRRLRSRLRLRLRLRRL

result:

ok correct, length = 52

Test #55:

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

input:

28 28

output:

SSSSSSSSSSSSSSRRSSSSSSSSSSSSSSLRLRLRLRLRRLRRLRLRLRLRLRRL

result:

ok correct, length = 56

Test #56:

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

input:

29 29

output:

SSSSSSSSSSSSSSRRSSSSSSSSSSSSSSLRLRLRLRLRRLRRLRLRLRLRLRRL

result:

ok correct, length = 56

Test #57:

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

input:

30 30

output:

RLSSSSSSSSSSSSSSRRSSSSSSSSSSSSSSSLRLRLRLRLRRLRSRLRLRLRLRLRRL

result:

ok correct, length = 60

Test #58:

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

input:

100 100

output:

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSRRSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRRLRRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRRL

result:

ok correct, length = 200

Test #59:

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

input:

1000 1000

output:

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 2000

Test #60:

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

input:

10000 10000

output:

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 20000

Test #61:

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

input:

100000 100000

output:

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 200000

Test #62:

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

input:

91457 90232

output:

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 181688

Test #63:

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

input:

60881 94085

output:

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 154964

Test #64:

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

input:

699 59775

output:

RLSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 60472

Test #65:

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

input:

44185 9850

output:

RLSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 54034

Test #66:

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

input:

71274 9113

output:

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 80386

Test #67:

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

input:

75200 46503

output:

RLSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 121702

Test #68:

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

input:

64785 60434

output:

RLSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 125218

Test #69:

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

input:

56295 49335

output:

RLSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 105628

Test #70:

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

input:

71249 6102

output:

RLSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 77350

Test #71:

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

input:

96197 92978

output:

RLSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

result:

ok correct, length = 189174

Test #72:

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

input:

2 10

output:

LSLLRSLLRLLR

result:

ok correct, length = 12

Test #73:

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

input:

2 6

output:

SRRLRRSR

result:

ok correct, length = 8

Extra Test:

score: 0
Extra Test Passed