QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#262484#5563. K.O. KidsMaMengQiAC ✓0ms3816kbC++11860b2023-11-23 19:49:222023-11-23 19:49:23

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 5
LRL

output:

5

result:

ok single line: '5'

Test #2:

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

input:

3 2
RRR

output:

0

result:

ok single line: '0'

Test #3:

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

input:

3 5
LLL

output:

3

result:

ok single line: '3'

Test #4:

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

input:

8 7
LLRLLLRR

output:

3

result:

ok single line: '3'

Test #5:

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

input:

5 1
LRLRL

output:

1

result:

ok single line: '1'

Test #6:

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

input:

5 1
LRLRR

output:

0

result:

ok single line: '0'

Test #7:

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

input:

5 5
LLRLL

output:

3

result:

ok single line: '3'

Test #8:

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

input:

10 10
LLRRLLRRRR

output:

4

result:

ok single line: '4'

Test #9:

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

input:

10 1
LLLLRRLRRL

output:

0

result:

ok single line: '0'

Test #10:

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

input:

10 20
LLRRLLLRLR

output:

16

result:

ok single line: '16'

Test #11:

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

input:

10 30
RRRLLLLRRL

output:

23

result:

ok single line: '23'

Test #12:

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

input:

10 5
LRRLLRLLRL

output:

2

result:

ok single line: '2'

Test #13:

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

input:

30 30
LRRLRLLLLRRRRRLLRLLLRLLRRLLLLR

output:

14

result:

ok single line: '14'

Test #14:

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

input:

30 50
RLRRRRRLRLLLRRRRRLLLRLLRRLLLLR

output:

32

result:

ok single line: '32'

Test #15:

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

input:

30 10
LLRRRRLLLRLRRRLRLLRLLLRRRLLRRR

output:

0

result:

ok single line: '0'

Test #16:

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

input:

30 500
RLLLRRRRRRLRRLRLRRLLRRLRLRRLLL

output:

485

result:

ok single line: '485'

Test #17:

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

input:

30 1000
RRLRLRRRLLLLLLRLRRRLLLLLRLLRLL

output:

983

result:

ok single line: '983'

Test #18:

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

input:

100 500
LRRRRLRRRRRRLLRRLLRLRLRLRLLRLRRRLRLLRLLRLLRLRLRLLRRRLRLRLRRRLLLRRRLLLLRRLRLLLRLLRLLRLRLRLRRLRLLLRLLL

output:

461

result:

ok single line: '461'

Test #19:

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

input:

100 1000
RLLLLRRRRRRLLRLLLLRLRLRLRRRLRLLRLLLLLLLLRRRLRRLRLRLLRRLRRLLRLLLLLRRRRLRRRRLLLRLLRRRRLLLRLLRLLRRLLRLR

output:

948

result:

ok single line: '948'

Test #20:

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

input:

100 10
LLLLRLLRLRLRLRLLRRRRLLRLRLRRRRRRLRRRRRRRLRRLRRLRRLLRLLRRLRRRRLLRLLLRLLRLRLRLLRLLLLLLRRLLLRRLLLRLLLRR

output:

0

result:

ok single line: '0'

Test #21:

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

input:

100 50
LLLLRRRLRRRLLLRLLLLRRRLLLLRRLRLRLRRRLLRLRLLRRRRLRRRRRRRLLLLRLRLRLLLLRLRRRRLRLRRRLLLLLLRLRRRRRLLLLLLL

output:

0

result:

ok single line: '0'

Test #22:

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

input:

100 200
LRLLLLLRRLRLRRLRLRRLLRLRLRLLRLLRRRLRRRRLLRLRLRLLRRRLLRRLLRLLLRRLLRLRLLRLRLLRRLLRLLRLRRRLLLRLRRRRRLLR

output:

160

result:

ok single line: '160'

Test #23:

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

input:

100 400
LRLRRLLLLRLLLLRLLRLLLLRRLLRLRLRLLRRRRRRRRLLRLRRRRLLLLRRLLLRRLRLRRLLLLLLLRRRRRRLLRLLRRRRRLRRRRRRLLRRL

output:

343

result:

ok single line: '343'

Test #24:

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

input:

100 150
LLLLRRRLRRLRRLLRRRLLRLRLLLRRLLLRLRLRRLRLLLLLLLRLLLLRRRLLLRLRLLLLRRRLLRLRLLRRRLLRLLLRLRLRLLRLRLRRRRRR

output:

102

result:

ok single line: '102'

Test #25:

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

input:

100 300
RLLRRLLLLRLRLRRRRRLLLRLLLLRLLRRRRLLLRLLLRLLLLLLRRLRLRLRLRLLLRLRLRRRRLLRRRRRLRLLRRRRLLLRRRRLLRRRLRRRL

output:

247

result:

ok single line: '247'

Test #26:

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

input:

100 700
LRLLLRLRRLRRLLLRRRRRRLRRRRLRLLLLLRLLRRLRRRLLLRLRLLLRRRLLRRRLLRRRRRLLLRRRRLRLLLLRRRRRLRLLLRRRRLRLLLRL

output:

645

result:

ok single line: '645'

Test #27:

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

input:

100 80
RLRLRLLLLRRLRRLLRRRRLRRRRRRLRLRRRRRRRLRRLLLRLLRRLRLRLRLLLRRRLRRRRLLLLRRLRRLRLRLLRLRLLRLLRLLRRLLRRLRR

output:

34

result:

ok single line: '34'

Test #28:

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

input:

500 500
LLLLRLLLRLLRRLLLLRRLLRLRLLRRRLRLRLRLLRRRRLRLRLRLLRLRLLRLLLLLLRLLRLRLLRLRRLRLRRRRRRLLRRLLLLLLRRRLRRRRLLRRRRLLLRLLLRLLLLLLRRLRRRLRLRRLLRRLRLLRLLRRRRRRRRRLRRLRLRLLRRLLRRRRLLRLLRLLLLLRRRLLRRLRRLLLRRRRLLRLLLRLLRRRLLRLRRRRLLLRLLRLLRLRLRLRLRLRRLLLLRLRRLRLRRLRRRLLRLLRLLLLRRLLLRRLRLRLRLLLLRLLRLLRLRRL...

output:

269

result:

ok single line: '269'

Test #29:

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

input:

500 100
LRRLLLLLRLRRRLLRRLLRLRLLLRRLLRRLLLRLLRLLRRRLRRRRRRRRLLLRLRRLRRLLRRRLRLRLLRLLLLLLRRLLLLRRLRLLLRRLLLRRRLLRLRRRRLRLLRRRRLRRLLRRLRLRLLRLRLRRLRLRRLRRRLLLLLRLRLLLLRLLLRRLLRRRLRLLLRLLLLLRRRLLLLRLLLRRLRRLRRRLRRRLLRLRRLRRLLLRLLLRLRRRRLLLLLRLRRLRRLLLRLLRLRLRLLLRRRRRRRLLLLRRRRLLLLRLRRLLLLRRRRRLRRRRRRLL...

output:

0

result:

ok single line: '0'

Test #30:

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

input:

500 1000
LLLLRRRLRRLRRRRRRLRRRLLLLLRRLRRLLRRRLLLRRLLRRRRRLLLRLRLLLRRRLRLRRRRRRRRLLRRRRRLLRLRRLRRRLLRRRLLLLLRRRLRLRLRLLLRRLLRLRRRLRLLLLLRRLRLRLLRRRLRLLRRRRLRLRLRLLRRRRRRRLLLLRRRRLRLLRLLRRLRLLLRRLRLLRRLLRRRRLLRRLLRLRLLRRRRLLLRRRRLLRRLLRRLLLLRLRLLLLRRLRRRRRLLLLLRLLRLRRLRLRLLRLRRRRRLLRRLLRRRLRLRRLRLRRLL...

output:

744

result:

ok single line: '744'

Test #31:

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

input:

500 800
LLRLRRRLRRLRLRRRLLRRLRLLRLRRRRRRLLRLLRRRRRRLRLRRRRLRRRLRLLLRRLRRRLRRLLLLRLRRLLLLLRRLRRRLRLLLLLRRLRRLLRRLRLRLLRRLLLLLRLLRLLRLRRLLLLLLRRRRLLRLRLRLRRRRRRLLRLLRLRRLLLRRLRRLLRRLLLLLRLLLLRRLRRRRLRRLLRLRRLLRLLRLRLLRLLRRLLRRLLLRRRLRRRRRRRRRRRRLLRRRRLLLLLLRRRRLLRRLRRLLLRLRRRRLLRLRLRRLLRRLRRLLLLLLRLRL...

output:

540

result:

ok single line: '540'

Test #32:

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

input:

500 200
LLLLRRRRLLRRLLRRRLRLLRLLRLRRLLRRRLRRRLLRLRLLLRRRLRRLLRLLLRRLRLLLLRLRLLLLLRLRRRRRLLLLLLLLLRRLLRRRLLRLLLRRLRRLRLRLLLRRRLRLLLRLLRRRLLLRLRLRRRRLLRLRLRRRLRLLRLLRRRRRLLLRLRRRRLRRLRLLRRLLRLRLRLRRRRRRLLLLLRLRLLRRRLLLRRLRLRLLRRLRRLRRLRRRLLLRLRLRLLRRRLRLLLLRRRLLRLRRLRLLLRLRRRRRLLRLLRRLRRLRRRRLLRRLLLRL...

output:

0

result:

ok single line: '0'

Test #33:

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

input:

1000 1000
LRLLRLLRLLRRRRRRRRRLLRRLRLRLRRLRRRLLLLLRLLRLRLRLLRLRRRRLLRRRLLLRRRLLRLRRLLLRLLLLRLLLRLRRLLRLRLLRLLRRLLRLRLRLLLRLLRLRRRLRRLRLLLRLLLRRRRLLRLLRLRLRRRRRLRRRLRRLRRLRLLLRRLLLRRRRRLLLRLRRLRRLLRRRLLLLLLLLRRRRLRRLRLRLRLLLLLRLLRRRRRRRRLRLLRRLRRRRRLRRLRRLRLRLRLLLLRLRRRLRRLRRLRRRLLLRLLLRLRRLRRLLLLLRRL...

output:

495

result:

ok single line: '495'

Test #34:

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

input:

1000 500
LLRRLLLLRRRLRRLRRLRLRLRRLLLLRRRRLLRLRLLLRRRRRRLRRLRRLLLLLLLLLRRRLRRRLLRLRRLRRRRLLLRLRRRRRRLRLRRRLLLRLRRLRRLRLRRRRLLRLRLRRRRRLRRLLLLRRRRLLRRRLLRRRRLRLRLRLRLRLLLRLRRLLLLLLRLLLLRRRLRRRLLRLLRRLRLRLLLLLRLRLLRRRLRLRLRLRLLRRLRLLLRRRRRRRLRRRRLLRLLLLRLRLLRRRRRRLLRLRLLRLLRLLLLRRLRLLLRLRRRLRLLRLRRRRLL...

output:

0

result:

ok single line: '0'

Test #35:

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

input:

1000 300
LLLLLLLLLLLLRLLLLLRRRRLRLLRRLLRLLLRLRLRRRRRRLLLLRLLLLLRLRLRRLRLLRRLLRRLRLRRRRRRRLRLRLLLLLRRLLRRRLLLLLRLLRRLLRLRLRRLRLLLLRLLLLLLRLRLLLLLLLLLRLRLLLRLLLLRRLRLRRLRRRRRRRLLLLLLLRRRLRRLRLRLLLLRLLLRLRRRLLLRRRRRRLRRLRLRLLLRRLLRRRLLRLLRLLLLLRLRRLLRLRLLRRLLRRRLLLLRLLLRRRLLLLLLRLLRLLLRRRRLRLLLLLLLRRLL...

output:

0

result:

ok single line: '0'

Test #36:

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

input:

1000 100
RRLRRLLLRRLRLRLLRRRRRRRLLRLRRLLLLLLRLRLRLLRLLLRRLRLLRRRRRRLLRLRRLLRRLLRLRLRRLRLLRLRRRRRLRLRRRRLLLLRRLLRRLLRLLLRRRRRRLLRLRLRRRLLLRRRLRRRLLRRRRLRRRLRRLLRLRLRLRRRRRLRLLLRLRRLLLRLLRRLRRRRLRRLLLLRLLLRLLRRRRLLRRRLLRRRLRRLRRRLLLLRRRLLLLLLRRLLLRRRRRLRRLLRLRRRLRRLLLRRRRLRLRLLLLRRRLLRRLRLRLLRRRRLRLLL...

output:

0

result:

ok single line: '0'

Test #37:

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

input:

1000 10
LLLRRRLLRRRLRLLLLRLLRRLLLRRLLRLLRRRRRLLRRLLLLRLLLLRLLRRLLRRRLLRRRRLLLRLLRLLLRRRRLLLRLRRRLLLRRLRRLLRLRLLLLLLLLLLRLRRRLLLLLRLRLLLLRLLLRRLLRLRRLLRRRRLRLRLRRRLLRLRLRRRRLLRRLRLRRRLRLLLLLLRRRLLLLRLRLLLRRLLLRLLLLRRRLRRLRRLLRRRRLRRLLRLLRRRRRRLRRRLRLLRLRLRLLLRLRLRLRLRLLRLLRRLRLRLLLLRRRRLRLLLLLRLRLLRL...

output:

0

result:

ok single line: '0'

Test #38:

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

input:

1000 1000
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...

output:

999

result:

ok single line: '999'

Test #39:

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

input:

1000 1000
LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR...

output:

1000

result:

ok single line: '1000'

Test #40:

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

input:

1000 250
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR...

output:

249

result:

ok single line: '249'

Test #41:

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

input:

1000 250
LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...

output:

250

result:

ok single line: '250'

Test #42:

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

input:

1000 50
RLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRL...

output:

49

result:

ok single line: '49'

Test #43:

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

input:

1000 50
LRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLRLR...

output:

50

result:

ok single line: '50'

Test #44:

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

input:

1000 250
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

output:

0

result:

ok single line: '0'

Test #45:

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

input:

1000 50
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

output:

0

result:

ok single line: '0'

Test #46:

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

input:

1000 50
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

output:

0

result:

ok single line: '0'