QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#662763 | #4567. Admissible Map | IllusionaryDominance | AC ✓ | 5ms | 5832kb | C++20 | 4.1kb | 2024-10-21 10:09:36 | 2024-10-21 10:09:37 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 20000 + 5;
const int P = 1000000000 + 9;
const int Base = 7;
char str[MAX_N];
int N, f[MAX_N], pw[MAX_N], a[MAX_N], len[MAX_N], ru[MAX_N], rl[MAX_N], tot;
vector <int> qry1[MAX_N], qry2[MAX_N];
struct Hash{
int ha[MAX_N];
void init(int *a) {
for (int i = N; i > 0; i --) {
ha[i] = (7ll * ha[i + 1] + a[i]) % P;
}
// for (int i = 1; i <= N; i ++) {
// ha[i] = (7ll * ha[i - 1] + a[i]) % P;
// }
}
int query(int l, int r) {
return (ha[l] - 1ll * pw[r - l + 1] * ha[r + 1] + 1ll * P * P) % P;
// return (ha[r] - 1ll * pw[r - l + 1] * ha[l - 1] + 1ll * P * P) % P;
}
}hal, har, hau, had, pat;
int power(int a, int n) {
int ans = 1;
while (n) {
if (n & 1) ans = 1ll * ans * a % P;
a = 1ll * a * a % P; n >>= 1;
}
return ans;
}
void init_hash() {
pw[0] = 1;
const int inv7 = power(7, P - 2);
for (int i = 1; i <= N; i ++) {
pw[i] = 7ll * pw[i - 1] % P;
a[i] = str[i] == 'L' ? inv7 : 0;
}
hal.init(a);
for (int i = 1; i <= N; i ++) {
a[i] = str[i] == 'R' ? 7 : 0;
}
har.init(a);
for (int i = 1; i <= N; i ++) {
a[i] = str[i] == 'U';
}
hau.init(a);
for (int i = 1; i <= N; i ++) {
a[i] = str[i] == 'D';
}
had.init(a);
for (int i = 1; i <= N; i ++) {
a[i] = 1;
}
pat.init(a);
}
inline int add(int a, int b) {return a + b < P ? a + b : a + b - P;}
bool check_top(int l, int r) {
int m = r - l + 1;
return str[l] != 'L' && str[r] != 'R' && !hau.query(l, r) &&
add(add(har.query(l, r), hal.query(l, r)), hau.query(r + 1, r + m)) == pat.query(l, r);
}
bool check_mid(int l, int r) {
int m = r - l + 1;
return str[l] != 'L' && str[r] != 'R' &&
add(add(had.query(l - m, l - 1), hau.query(r + 1, r + m)), add(hal.query(l, r), har.query(l, r))) == pat.query(l, r);
}
bool check_bottom(int l, int r) {
int m = r - l + 1;
return str[l] != 'L' && str[r] != 'R' && !had.query(l, r) &&
add(had.query(l - m, l - 1), add(hal.query(l, r), har.query(l, r))) == pat.query(l, r);
}
int main() {
scanf("%s", str + 1);
N = strlen(str + 1);
int ans = 0;
for (int i = N; i > 0; i --) {
if (str[i] == 'R' && str[i + 1] == 'L') {
f[i] = f[i + 2] + 1;
}
ru[i] = str[i] == 'U' ? i : ru[i + 1];
rl[i] = str[i] == 'L' ? rl[i + 1] + 1 : 0;
ans += f[i];
int p = i + (f[i] << 1);
if (str[p] == 'R') {
int q = ru[p];
if (q) len[i] = q - p;
}else if (str[p] == 'D') {
int q = p + rl[p + 1];
assert(q <= N);
int r = ru[q];
if (r) {
assert(r > q);
len[i] = r - q;
}
}
if (len[i]) {
if ((~ len[i] & 1) || ((f[i] << 1) < len[i])) qry1[len[i]].push_back(i);
if ((~ len[i] & 1) && ((f[i] << 1) >= len[i])) ans -= (f[i] << 1) / len[i] - 1;
}
}
init_hash();
for (int i = 1; i <= N / 2; i ++) {
if (qry1[i].empty()) continue;
map <int, int> idx;
int j = tot; idx.clear();
for (auto pos : qry1[i]) {
if (idx.find(pos % i) == idx.end()) idx[pos % i] = ++ tot;
if (check_top(pos, pos + i - 1)) {
qry2[idx[pos % i]].push_back(pos);
}
}
int ori_ans = ans;
for (j ++; j <= tot; j ++) {
if (qry2[j].empty()) continue;
sort(qry2[j].begin(), qry2[j].end());
for (int k = qry2[j][0], l = 0, r = 0, lst = 0; k + i - 1 <= N && l < (int)qry2[j].size(); k += i) {
while (l < r && qry2[j][l] < lst) l ++;
if (check_bottom(k, k + i - 1)) ans += r - l;
while (r < (int)qry2[j].size() && qry2[j][r] == k) r ++;
if (!check_mid(k, k + i - 1)) lst = k;
}
}
}
printf("%d\n", ans);
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3956kb
input:
RDUL
output:
2
result:
ok 1 number(s): "2"
Test #2:
score: 0
Accepted
time: 1ms
memory: 3936kb
input:
RDRU
output:
0
result:
ok 1 number(s): "0"
Test #3:
score: 0
Accepted
time: 1ms
memory: 3904kb
input:
RLRLRL
output:
6
result:
ok 1 number(s): "6"
Test #4:
score: 0
Accepted
time: 1ms
memory: 3856kb
input:
D
output:
0
result:
ok 1 number(s): "0"
Test #5:
score: 0
Accepted
time: 1ms
memory: 4160kb
input:
DL
output:
0
result:
ok 1 number(s): "0"
Test #6:
score: 0
Accepted
time: 1ms
memory: 3860kb
input:
RL
output:
1
result:
ok 1 number(s): "1"
Test #7:
score: 0
Accepted
time: 1ms
memory: 3888kb
input:
DU
output:
1
result:
ok 1 number(s): "1"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3908kb
input:
RDULU
output:
2
result:
ok 1 number(s): "2"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
RDDUULRDDD
output:
2
result:
ok 1 number(s): "2"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
RLRLRLRLRL
output:
15
result:
ok 1 number(s): "15"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3868kb
input:
DUDUDUDUDU
output:
15
result:
ok 1 number(s): "15"
Test #12:
score: 0
Accepted
time: 0ms
memory: 3880kb
input:
RDRDULULRR
output:
3
result:
ok 1 number(s): "3"
Test #13:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
UUURDRDRDLRULLRLULUDRURDRULLRU
output:
2
result:
ok 1 number(s): "2"
Test #14:
score: 0
Accepted
time: 1ms
memory: 3872kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRL
output:
120
result:
ok 1 number(s): "120"
Test #15:
score: 0
Accepted
time: 1ms
memory: 3824kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDU
output:
120
result:
ok 1 number(s): "120"
Test #16:
score: 0
Accepted
time: 1ms
memory: 3960kb
input:
RDRDRDRDRDRDRDULULULULULULULDL
output:
8
result:
ok 1 number(s): "8"
Test #17:
score: 0
Accepted
time: 1ms
memory: 3940kb
input:
DLURRURRLDDUUDRDURDDLRLULLULDUULDDRDUURLLDDLRRLUDURLLRRRLLRLUDULDULUUDLLDLRLULDDURDDDLLUURRDRRDDRULU
output:
18
result:
ok 1 number(s): "18"
Test #18:
score: 0
Accepted
time: 1ms
memory: 4132kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL
output:
1275
result:
ok 1 number(s): "1275"
Test #19:
score: 0
Accepted
time: 1ms
memory: 3884kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU
output:
1275
result:
ok 1 number(s): "1275"
Test #20:
score: 0
Accepted
time: 1ms
memory: 4108kb
input:
RDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDULULULULULULULULULULULULULULULULULULULULULULULULUL
output:
26
result:
ok 1 number(s): "26"
Test #21:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
LRULLRUURRDUULDRULLLRLUDLDRUUURRDDRDLLDDRLUDLRLRRLRRUDUUULDDLUDUDRURUDLLRLDRLLDULRRURLDLDDDLUUUDRRUDRDURRRDLLDRDRRDULULRLLULULDLDLUURRRLRRUUUUDUUUULLURLUUDLURDUDDUDDURDDURRRLURDLUDDDDLRLDULRRRULLDDDDLLLDDLUDURDURLDDUDDRDLLULRRUDRRDRRRLUUULRLDDDDDDURRDULUDDDLDLLUDDUUDDDLLRDDRLRRLRDLDUDUDRULURRRULRLRD
output:
43
result:
ok 1 number(s): "43"
Test #22:
score: 0
Accepted
time: 1ms
memory: 3892kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL
output:
11325
result:
ok 1 number(s): "11325"
Test #23:
score: 0
Accepted
time: 1ms
memory: 4140kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU
output:
11325
result:
ok 1 number(s): "11325"
Test #24:
score: 0
Accepted
time: 1ms
memory: 4192kb
input:
RDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULUL
output:
76
result:
ok 1 number(s): "76"
Test #25:
score: 0
Accepted
time: 1ms
memory: 4236kb
input:
LRRDDUUDLRLDLLRRDRLRDRLUDURURLLDURDLUDDRDLRLUULRLLDLRRRLDRRULRRULURRUDURRDLULLLDDRURLLURURLRRRRLURLURUUDRURDLLRUDDLULDLLRULRURDLRDUULURDULLLRLRDLRRUDUUUDUDLLRULRRRDRLLRRURRRRRLRDULDURRDLDULLURLLLURLRLDDRURULLDULULDRLDRLUUDDULLDRRDRURURDUUDDRDULRRUUDULULDDLRDURUUUURULLURRUDRURLUDLLUURRULRURDDRDRLUDUU...
output:
168
result:
ok 1 number(s): "168"
Test #26:
score: 0
Accepted
time: 1ms
memory: 3948kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
125250
result:
ok 1 number(s): "125250"
Test #27:
score: 0
Accepted
time: 1ms
memory: 3968kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU...
output:
125250
result:
ok 1 number(s): "125250"
Test #28:
score: 0
Accepted
time: 1ms
memory: 3924kb
input:
RDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRD...
output:
251
result:
ok 1 number(s): "251"
Test #29:
score: 0
Accepted
time: 1ms
memory: 4248kb
input:
RDLRLLLLDDLDUUURUDUDUDUURURLRURLURLRLUULLRUDUURLDDRRDRUULDUURUDUUDLRLDUUUDRLLDRRDLLULDULRDURLLRLUDDRRLUDURRUUDULDLDLLDDUDURDLULRLLDRDRURUDLRDUDULLDUDDLRRRUDLLLRDLLRDDLDRDLRUUUUDRRDLDUUURDUUDUDDURUDRLDRRUURDUDDRRDDDULDRURDUURDUUDDRRDLRURRDUUDLDLRDULLLDDRLDRRLURLUUDRDDUDLDULDLRDDUUURRURURDUUDULULDDDRL...
output:
491
result:
ok 1 number(s): "491"
Test #30:
score: 0
Accepted
time: 0ms
memory: 4052kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
1125750
result:
ok 1 number(s): "1125750"
Test #31:
score: 0
Accepted
time: 1ms
memory: 4280kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU...
output:
1125750
result:
ok 1 number(s): "1125750"
Test #32:
score: 0
Accepted
time: 1ms
memory: 4384kb
input:
RDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRD...
output:
751
result:
ok 1 number(s): "751"
Test #33:
score: 0
Accepted
time: 1ms
memory: 4388kb
input:
LULDRUDLRRRRDRLRUUURDUUDLLUURDLRDRDDDURLUUDLRLRLUDRURDRRUDLRRLRURDDURURDRLULUULRDDLDLDLRLLLRLRRRLUDDLUDLDLURLUUDDDLLDUDLDRUULRLRUUDRDUUDLDLLDDLRUULRLUUDRRDLLLDLDUULLDDDLDRRRDDDDUUUULLLULRLLLLLDDDLLRDLDULDDDLRULRRDUULRLULRRDULDUULDURLRLDDLLLLRLLULDLRLDRRDLRULDRDDLDLUUUULUUDUDRDULUDRUDLUULRLRULULLUDRU...
output:
936
result:
ok 1 number(s): "936"
Test #34:
score: 0
Accepted
time: 1ms
memory: 4176kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
4501500
result:
ok 1 number(s): "4501500"
Test #35:
score: 0
Accepted
time: 1ms
memory: 4236kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU...
output:
4501500
result:
ok 1 number(s): "4501500"
Test #36:
score: 0
Accepted
time: 1ms
memory: 4332kb
input:
RDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRD...
output:
1501
result:
ok 1 number(s): "1501"
Test #37:
score: 0
Accepted
time: 0ms
memory: 4336kb
input:
RDDUDLRDLDURULULDLDUDRDLDUDLUDLRUDLDDLLLDRRLLUURDLLRURLDRDDLLDDRDLLRULRLLUUDDULUDLLDLURRULDDRUDDURLDUURDUUULRRRULUDLRDUDLULDRUDUDLDDRRUURRDDRLRLRULURRRLRRRRURDRRLLURUDDDDDRDRDLRDLRRRLRURRRDRUDDLLUDULRULDDRLLUUUUDDULDRLDRRDULLDLDDRRLDLDRRRRDRRLDRURUDLDDDLLLURDDUDRURUUDRRRUDRRLRRLRDLDUDRRDDLLURRLRDDLR...
output:
1482
result:
ok 1 number(s): "1482"
Test #38:
score: 0
Accepted
time: 1ms
memory: 4260kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
12502500
result:
ok 1 number(s): "12502500"
Test #39:
score: 0
Accepted
time: 1ms
memory: 4348kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU...
output:
12502500
result:
ok 1 number(s): "12502500"
Test #40:
score: 0
Accepted
time: 2ms
memory: 4720kb
input:
RDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRD...
output:
2501
result:
ok 1 number(s): "2501"
Test #41:
score: 0
Accepted
time: 4ms
memory: 4836kb
input:
LRRDULLRRUULUDUULRLLLUUDRDRLDRRLURUDRDUULRUULLRRRRDUDLLDURUUURDDRURDLRRRURRUURRULULDRUURURDLDUURRLDURDLUUDRDRLRURLLLLDLULRUUUURRRUDULRLULRLUDDULULLDRLRULRDRLRRLDDDUDUUUUDDDRUDDRDDUURDUUULLURULUDRUURDULLUDLRLDDRRUUULRLDLLULLDURLDUUDDRLLRUDDLDULRRDDDURLRRRDLDRDRDDLDULURUDRLURRUUDRDDRLDDDRDDDUDLDRUDURU...
output:
2967
result:
ok 1 number(s): "2967"
Test #42:
score: 0
Accepted
time: 1ms
memory: 4664kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
50005000
result:
ok 1 number(s): "50005000"
Test #43:
score: 0
Accepted
time: 0ms
memory: 4808kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU...
output:
50005000
result:
ok 1 number(s): "50005000"
Test #44:
score: 0
Accepted
time: 0ms
memory: 5832kb
input:
RDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRD...
output:
5001
result:
ok 1 number(s): "5001"
Test #45:
score: 0
Accepted
time: 2ms
memory: 5620kb
input:
DLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDL...
output:
5000
result:
ok 1 number(s): "5000"
Test #46:
score: 0
Accepted
time: 3ms
memory: 5704kb
input:
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
output:
10000
result:
ok 1 number(s): "10000"
Test #47:
score: 0
Accepted
time: 0ms
memory: 4724kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
22451078
result:
ok 1 number(s): "22451078"
Test #48:
score: 0
Accepted
time: 2ms
memory: 4816kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU...
output:
25067340
result:
ok 1 number(s): "25067340"
Test #49:
score: 0
Accepted
time: 2ms
memory: 5288kb
input:
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...
output:
3396
result:
ok 1 number(s): "3396"
Test #50:
score: 0
Accepted
time: 2ms
memory: 4812kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
9794803
result:
ok 1 number(s): "9794803"
Test #51:
score: 0
Accepted
time: 2ms
memory: 4808kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU...
output:
21598956
result:
ok 1 number(s): "21598956"
Test #52:
score: 0
Accepted
time: 2ms
memory: 5144kb
input:
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...
output:
902
result:
ok 1 number(s): "902"
Test #53:
score: 0
Accepted
time: 2ms
memory: 4756kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
9778381
result:
ok 1 number(s): "9778381"
Test #54:
score: 0
Accepted
time: 2ms
memory: 4824kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU...
output:
7721638
result:
ok 1 number(s): "7721638"
Test #55:
score: 0
Accepted
time: 2ms
memory: 4996kb
input:
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDRDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...
output:
262
result:
ok 1 number(s): "262"
Test #56:
score: 0
Accepted
time: 0ms
memory: 4852kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLDLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
1516789
result:
ok 1 number(s): "1516789"
Test #57:
score: 0
Accepted
time: 2ms
memory: 4760kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDDDUDUDU...
output:
2048554
result:
ok 1 number(s): "2048554"
Test #58:
score: 0
Accepted
time: 2ms
memory: 4812kb
input:
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDDUDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...
output:
202
result:
ok 1 number(s): "202"
Test #59:
score: 0
Accepted
time: 2ms
memory: 5112kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLLLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLDLRLRLRLRLRLRLRL...
output:
578497
result:
ok 1 number(s): "578497"
Test #60:
score: 0
Accepted
time: 2ms
memory: 4804kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDURUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDRDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDLDUDUDUDUDUDUDUDURURUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU...
output:
654888
result:
ok 1 number(s): "654888"
Test #61:
score: 0
Accepted
time: 2ms
memory: 4740kb
input:
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...
output:
52
result:
ok 1 number(s): "52"
Test #62:
score: 0
Accepted
time: 0ms
memory: 4804kb
input:
RLRLRURLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLLLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLDLRLRLRLRLRDRLRLRLRLDLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
229896
result:
ok 1 number(s): "229896"
Test #63:
score: 0
Accepted
time: 2ms
memory: 4868kb
input:
DUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDURUDUDUDLDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDDDUDUDUDUDUDDDUDUDLDUDUDUDUDUDUDUDUUUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU...
output:
214994
result:
ok 1 number(s): "214994"
Test #64:
score: 0
Accepted
time: 3ms
memory: 4748kb
input:
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDDDDDDDDDDDDDDDDDDDDDDDDDLDDDDDDDDDDDDDDDDDDDDDDLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDDDDDDDDDDDDDDDDDDDDDDDDRDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLDDDDDDDDDDDDDDDDDDDDDD...
output:
160
result:
ok 1 number(s): "160"
Test #65:
score: 0
Accepted
time: 4ms
memory: 4788kb
input:
RRRLRLRLRLRLRLRLRLRLRRRLRLRLRRRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRRRLRLRLRLRLRDLLRLDLRLDLRLRLRLRDRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLLLRLRLRLRLRURLRLRLRLRLRLRLRLRLRLRLRURLRLRLRDRLRLRLRLRLRDRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLULRLRLRLRLRLDLRLDLRLRLRLRLRLRLRLRLRLRRRLRLRURLRLRLRLRLDLRLRLRLRLRL...
output:
62233
result:
ok 1 number(s): "62233"
Test #66:
score: 0
Accepted
time: 3ms
memory: 4852kb
input:
DULUDUDUUUDUDUDURUDUDRDUDUDUDUDLDUDUDUDUDUDUDUDUDUDULUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUUUDUDUDUDULUDUDUDLDUDUDUDUDUDUDUDUDUDURUDUDUDUDUDUDUDUDUDLDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDLDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDDDUDUDLDRDLDUDURUDUDUDUDUDU...
output:
60931
result:
ok 1 number(s): "60931"
Test #67:
score: 0
Accepted
time: 3ms
memory: 4756kb
input:
DDDDDDDDLDDDDDDUDDDDRDDDLDDDDDDDDDDDDDDDDDRDDDDUDDDURDDDDDDRDDDDDDDDDDDDDDDDDDDDDDDLDDDDDDDDDDDLDRDDDDDDDDDDDDDRDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDRDDLRDDDDDDDDDDUDDDDDDDDDDDDDDDDDDDDDDDDDDDUDDDDDDDDDDDDDDDDDDDDDLDDDDDDDDDUDDDDDDDDDDDDDDDDDLDDDDDDDDDDDDDRDDULDDDRDDDDDDDDDDDDUDDDDDDDDDDDDDUDDD...
output:
475
result:
ok 1 number(s): "475"
Test #68:
score: 0
Accepted
time: 4ms
memory: 4816kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDRLURLDDDDUUUULRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLDLLLDRRURURLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRRLRDRLDRLDURLUDLRURLRLURLRLRLRLRLRLRLRLRLRLRLRLRLRLRDUDUDUDUDURLDDDDU...
output:
199751
result:
ok 1 number(s): "199751"
Test #69:
score: 0
Accepted
time: 4ms
memory: 5048kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDDLDURUULRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDRLDULRLURLRLRLRRLRLDRLRLULRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDRLURRLRLRLRLRLRLRLRLRLRLRDLDRLDLRUURLRUDRLRLURLRLLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDDLLDUDUDUDULRLRLRL...
output:
77569
result:
ok 1 number(s): "77569"
Test #70:
score: 0
Accepted
time: 4ms
memory: 5076kb
input:
RRLDRLULRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDDUUDDUUDDUUUDDUURLRLRLRLRLRLRLRLRLRLDDDDUUUUUDUDUDUDUDUDURLRLLRLRLDRLRRDURDUDUDUDUDURLRLRLRLRLRLRLRLRLRLRLRLDLLLRRRURLRLRLRLRLRLRLRLRLRLDRLURLDRLURLRLDDRLRLUULLRLRLRLRLDUDUDUDURLRLRRLRRDUDULRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLDDRLRLDRLDURLURLRLRL...
output:
42209
result:
ok 1 number(s): "42209"
Test #71:
score: 0
Accepted
time: 4ms
memory: 5108kb
input:
RLRLRLRDRLRLDRLDURLURLDUDURLRLRLRLRLRLRLDUDLRLDLDRLDDDDRLDUUUURLUUDUDUDUDUDUDURLRRLRDUDUDUDURDUDULRDRLRDULDDUURLRLRLRLRRLRLRLRLRLRLRDRLRLURLRLUDUDULRLRLRLRDUDUDULDDLUURUURRLRLRLRLRLUDURLRLDUDUDULDURUDUDUDUDUDUDUDURLLDDUURDULDUDUDUDUDUDURLRLRLRLRLRLRLRLRRDRDDUDUDUULLRRLRLRLRLRDDUURLRLDDUURLRDRLRDULLD...
output:
26422
result:
ok 1 number(s): "26422"
Test #72:
score: 0
Accepted
time: 4ms
memory: 4872kb
input:
RRDDLLLLDDUURLUDURDUDUDULRLRLRDRLDURLURLRLRLRLRLRLRDDUUDDUULRRDDULUDUDURLDDUUUDRLRLDRLDURRDUDULRLLLDDRRRUUURRDUULLRLRDURDDULUDDLURULDRLDUUUURLULRLRLRLRLRRRDULLUDUDDLLLRLRRRURLDRUULRLRLRLRLRDDUDUDUDRLRLRLRLRLLRLRLDUDUDUDUDRRLRDUDUDUDUDUDURLRLLLLRDRDRDDLULULRURLRLRRLRLRLRLRLRDDLRLDLRURLRURLRLRLRLRLRLR...
output:
19773
result:
ok 1 number(s): "19773"
Test #73:
score: 0
Accepted
time: 4ms
memory: 5096kb
input:
RLRLRLRLRLRLRDUDUDUDUDUDUDUDUDUDUDUDULRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLDLDUDURUDDUUDLRURDULRDULRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
480441
result:
ok 1 number(s): "480441"
Test #74:
score: 0
Accepted
time: 5ms
memory: 4824kb
input:
RLRLRLDDRLRLRLUUDRLDRLRLURLURLRLRLRLRLRLRLRLRLRLDDRLUURLRLDDRLUUDDDDUUUURLRLRLRRLRLDRLDRLDDRLRLURLURLUURLRLRLRLRLRLLRLRLRLRLRLRLRLRLRLRLRLRLRLRDLLLLRLDDLLLDRDRURLUDRRURURURLRLRURLLRLRLDLLDLDRDDDRDRDRDDLRRURUUULUUULULULRURLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLDDRLRLRLRLUURLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
201041
result:
ok 1 number(s): "201041"
Test #75:
score: 0
Accepted
time: 5ms
memory: 5088kb
input:
RLRLRLRLRDDLLLDRDRRDRRRDRLRDURRRUUULULLULLLRLULDRLUDDDUUUDDDUUUDDDUUUDDDUUURLDRLURLLRLRLRLRLRLRLRLRLDDRLUUDRLDURLURDRLDRLURLUDDRLDDUUDDUURLUURLRLUDDUUDLRUDDRLDLLLLRLDDRRUDDLUURDURRRUULLRLRLRLRLRLRLRLRLRLRLRLRLRLLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDUDUDUDUDUDUDUDURLRLRLRLRLRLRLRLRLRLDRLDRRLRLRLRL...
output:
95069
result:
ok 1 number(s): "95069"
Test #76:
score: 0
Accepted
time: 4ms
memory: 4788kb
input:
RLRLRLRLRLRLRDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDURLRLRLRLRLRLRLRLDUDUDUDDDUUDDUUDDUUDDUUDDUURLDDUUDDUUDDUURLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRRRDUDDUUDULDRUDUDDUUDULLRDDLDLLRDRDURRUURLULRLULRURDUDUDUDUDUDUDUDUDUDUDUDUDURLRLRLRLRLRLDRLDRLDLLDRLRLDRLDRRLRLRLRLRLRLRLRLR...
output:
58534
result:
ok 1 number(s): "58534"
Test #77:
score: 0
Accepted
time: 5ms
memory: 4808kb
input:
RLRLRLDRDDDDDDUULDUDUDUDUDUDUDDRLDDRLRLRLRLDDRLRLURLUURLRLRLRLUURLRLLRDRLDDDDRDDDLUULUDURLRLRURLRLUURLUUURLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLLDULLLDULDUUDLDLLRLUUDRURRRRRRUURDUDUDUDRLRLRLRLRLRDUDUDUDUDUDUDUDUDULRLRLRLRLUUDUDDDDRLDDDDDDDDDDDDUUURLUUUDLLLLDDLLUDRRUDDDLLRLRDDDLDRRURLULURUUUURRDURLDLURL...
output:
38006
result:
ok 1 number(s): "38006"
Test #78:
score: 0
Accepted
time: 3ms
memory: 5120kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDURLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
1662401
result:
ok 1 number(s): "1662401"
Test #79:
score: 0
Accepted
time: 3ms
memory: 4788kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRRRRRRRRDRLRLDLRLRRDDRLDLRLRDULLLLDLRRRRDRUDLUDLURDDULRUDRLRLUDULLDLRRDRUULRLULRDUULDRRRDUDDLULURLDDDLRLDLLDLULUDULLLULRURLULLLURURLRRURRRUU...
output:
574655
result:
ok 1 number(s): "574655"
Test #80:
score: 0
Accepted
time: 4ms
memory: 4892kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLDDUUDDUURLDDUUDDUUDDUUDDUUDDUUDDURLRLRLRLRDUDUDUDUDULDDUUDLDURURDULDLDURUDLRURDUDULDLRULDDUURLDDUURLDDUURLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLDUDUDUDUDUDUDUDU...
output:
234220
result:
ok 1 number(s): "234220"
Test #81:
score: 0
Accepted
time: 2ms
memory: 4892kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRRLRLRLRLRLRLRLDDRLRLRLRLRLDDDDUURLRLRLRLRLUUUURLRLRLRLRLRLRLRLDDRLRLRLRLRLRLRLUURLRLRLRLRLRLDDRLDRLRLRLDDRLDUURLURLRDDDDDRLDDDUUUUURLUUURLRLRLRLRLDDRLRLRLRLUUDRLRLDRLRLURLRLURLUURLDDUURLDDUUDDUURLDDUUDDUUDDUUDDUUDDUURLDDUURLDDDUUDDUUDLDURUDLRUDL...
output:
242898
result:
ok 1 number(s): "242898"
Test #82:
score: 0
Accepted
time: 4ms
memory: 4892kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDDUURLRLDDUURLRLRLDDUURLRLDDUUDDUUDDUUDDUUDDUURLRLDDUUDDUURLRLDDUURLDDUURLRLDDUURLDDUUDDUUDDUUDDDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDRDRLRLDDDDDUUUUUDDDDDUUUUUDDDDDUUUUUDDDDDUUUUUDDDDDUUUUUDDDDDUUUUUDDDDDUUUUUDDDDDUUUUUDDDDDUUUUUDDDDDUUUUURLDDDDDUUUUUDDDRLUUUDDDDDUUUUU...
output:
86486
result:
ok 1 number(s): "86486"
Test #83:
score: 0
Accepted
time: 3ms
memory: 4876kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
2906578
result:
ok 1 number(s): "2906578"
Test #84:
score: 0
Accepted
time: 0ms
memory: 4864kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDDRLDDDDDDDDDDDDDDDDDUUDDUUUUUUUUUUUUUUUUUDDUUDDDDRLRLDDDRLDRLDUUDDUUUURLDDUUUDDUDDUDDUUDRLDRLUUDDDUUDUUDUUDDUDDUDRLDUUURLUDDUDDUUDUUDURLUDDDDDDUUDUUDDUDDUDDRLUUUUUUDDURLUUDUUDUURLRLDDDDUUDRLDDURLURLDDDDUUUUDDUDDUURLD...
output:
1159322
result:
ok 1 number(s): "1159322"
Test #85:
score: 0
Accepted
time: 0ms
memory: 4840kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR...
output:
634941
result:
ok 1 number(s): "634941"
Test #86:
score: 0
Accepted
time: 4ms
memory: 5080kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
344909
result:
ok 1 number(s): "344909"
Test #87:
score: 0
Accepted
time: 2ms
memory: 4852kb
input:
RLRLRLRLRLRLRLRRRRDDRRDRDDRRDDRDRLRLDLLLLLRLDRLRRDRLDDLDLLRDRLDLLDLRLDLDDRRRDDRLDLLRLRDDDRLDDURLDDUULLULUULDUUDDDRLRRDRRURLURLUDDDLURURRUUDDDDRURURLRUUUUDLLURLRDUDDUDUURLUUUDLURDRLRDDDDUDRUDUURDDDRURDRRDDRUUDDULLDRRDUDUUDUDRDDLRRRRURDRLDDLLUUUURRDDDDDULULLLRLULUUUULULLRLULUURLULULLUULLLRRRUUULLULRLR...
output:
146753
result:
ok 1 number(s): "146753"
Test #88:
score: 0
Accepted
time: 3ms
memory: 5152kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
6058637
result:
ok 1 number(s): "6058637"
Test #89:
score: 0
Accepted
time: 2ms
memory: 4816kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
1757370
result:
ok 1 number(s): "1757370"
Test #90:
score: 0
Accepted
time: 0ms
memory: 4816kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDRLDRLRLURDURLDLRUDRLDLUULLDLRRUR...
output:
937521
result:
ok 1 number(s): "937521"
Test #91:
score: 0
Accepted
time: 4ms
memory: 5144kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUD...
output:
785845
result:
ok 1 number(s): "785845"
Test #92:
score: 0
Accepted
time: 2ms
memory: 4852kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDUDU...
output:
406330
result:
ok 1 number(s): "406330"
Test #93:
score: 0
Accepted
time: 2ms
memory: 5080kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
8830668
result:
ok 1 number(s): "8830668"
Test #94:
score: 0
Accepted
time: 0ms
memory: 4848kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
6518064
result:
ok 1 number(s): "6518064"
Test #95:
score: 0
Accepted
time: 0ms
memory: 4828kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
1619843
result:
ok 1 number(s): "1619843"
Test #96:
score: 0
Accepted
time: 3ms
memory: 5052kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
1693549
result:
ok 1 number(s): "1693549"
Test #97:
score: 0
Accepted
time: 3ms
memory: 4852kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRRLRLRLRLDDRLRLRLRLUURLRLRLRLDDDDRLDDRLUUUURLUURLRLRLRLRLRLRLRLDDRLRLRLRLUURLDDRLRLRLRLUURLRLDRLRLDDDRLURLRLUUURLRLRLR...
output:
1054491
result:
ok 1 number(s): "1054491"
Test #98:
score: 0
Accepted
time: 2ms
memory: 4760kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
17183179
result:
ok 1 number(s): "17183179"
Test #99:
score: 0
Accepted
time: 3ms
memory: 5084kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
6406597
result:
ok 1 number(s): "6406597"
Test #100:
score: 0
Accepted
time: 2ms
memory: 4792kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
9854266
result:
ok 1 number(s): "9854266"
Test #101:
score: 0
Accepted
time: 3ms
memory: 4816kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
1376694
result:
ok 1 number(s): "1376694"
Test #102:
score: 0
Accepted
time: 2ms
memory: 5064kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
4362554
result:
ok 1 number(s): "4362554"
Test #103:
score: 0
Accepted
time: 2ms
memory: 4796kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
19605093
result:
ok 1 number(s): "19605093"
Test #104:
score: 0
Accepted
time: 2ms
memory: 4720kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
15138268
result:
ok 1 number(s): "15138268"
Test #105:
score: 0
Accepted
time: 3ms
memory: 4888kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
2443591
result:
ok 1 number(s): "2443591"
Test #106:
score: 0
Accepted
time: 0ms
memory: 4848kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
7808933
result:
ok 1 number(s): "7808933"
Test #107:
score: 0
Accepted
time: 0ms
memory: 5132kb
input:
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...
output:
1307201
result:
ok 1 number(s): "1307201"