QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#399853#8592. Toxic Gene 2Z_301100 ✓2ms4172kbC++204.9kb2024-04-26 18:34:122024-06-06 15:18:18

詳細信息

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 1ms
memory: 3868kb

input:

2 1000
TTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTRTTTTTTTTTTTTTTTTTTTTRTTRTTTTTTTTTTTTRTTTTRTTTTTTTTTTTTTTTTTRTTTTRTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #2:

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

input:

2 1000
TTTTRRRTTTTTTTTTTTTTTTTRRRRRTTTTTTTTTRTTRTRRTRRTTTTTTRTRRRTRTRTTRTTTTTRTTTRTTTTRRRTTRTRTRTTTTRRRTRTTTTTTTTTTRRRRTTTRRTTRTRTTTTTTRTTTTTRTTTRTRTTRRTRRRTTTRTRTTTTTRTTTTTRTTTTTTTRTTTTTTTTTTTTRTTTTTTTRTRTTTTTTRRRTTTTTTTTTTTRTRTRTRRTTRRTTRTTRTTTTTTTTRRTTTTRRTTTTTTTTTRTTRTTTTTRTRTTRRTRTTTRTTRRTTRTRT...

result:

ok Correct. #(queries) = 21

Test #3:

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

input:

2 1000
TTTTTTTTTTTTTTTTTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTRTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTTTTTTTTTTTTTTRTTTRTTTTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #4:

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

input:

2 1000
TTRTRTTTTTTTTTTTTTTTTTTTTTTRRTTTTTRTTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTRTTRTTRTTRRTTTRTTTTTRTRTTTRTTTTTTTTTTTTTTRTTRRTTTTTTTTTTRTTTTRTTTRTTTTTTTTTTTTTTTTTRTTTTRRTTTTRRTTTRTTTTTRTTTTTTTTTTTTRTTRTRTTTTTTRTRTRTRRRRRTRRRTTRTTTRTTTTTTRTTTTRTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTRTTTTTRTTTTTTTTTTTTTTTTR...

result:

ok Correct. #(queries) = 21

Test #5:

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

input:

2 1000
TTRTRTTTRTTRTTTTRRRTTRRTTTTRTRRTRTTTTTTTTTRTTTTTTTTTTTRRTTRTTTTTTTTTTTTTRTTTRTTTTTTTTRTTTTTTRTTTTTRTTTTTTRTRRRTTTTTRTTTTTTRRTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTRTTTTTTRTTRTRRRRTTTTRTTRTTRTTTRTTTTTRTTTRTTTRTRTRTTTTTTTTTRTTTTTTRTTTTTRTTRTTTRTTTTTTTTRTTTTTTTRTRRTTTTTRTTTTTTTTRTTRTRTRTT...

result:

ok Correct. #(queries) = 21

Test #6:

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

input:

2 1000
TTTTRRTTTTTTTRTTTTTTTTTRTTTRTTTTTTTTTRTRRTTTRTTTTTTTTTTTTRTTTTTTTTRTTTTTTTTTTTRTTTTTTTRTTTTTTTTTTTTTTTTTTRTTTTTRTTTTTRTRTRTRTRRTTTRRTRTTTTTTRTRTTTTRTRRTTRTTTTTTRTTTRTTTTTTTTTTTRTTTTTTTTTTRRTTTRTRTRRRTTTTRTTRTTTTRTTTTTTTTRTRTTTTTRRTTTTTTTTTTTTRTTTTTTRTTTRTTTTTTTTRTTTTRTTTTTTTTTTTTRRRRRTRTTTTTT...

result:

ok Correct. #(queries) = 21

Test #7:

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

input:

2 1000
TRTTTRTRRTTTTTTTTRTTTTTTTRTTTTRTTRTRTTTTTRRTTTTRRTRTTRRTTTTTTRTTRTTTTTTTTTTTTRTTTRTTTTTRRTTRRTTTTTTTTRTTTTTRTTRTTTRRTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTRTTTRTTTTTTRTTRTTRTTRTTTTTTTRTTRTRTTTRTTRRTRRRTTTTRTTTTTRTTTTTTTTTTTTRTTTTTTRTRTTTTTTTRRTRRTTTTTRTTTTTTTTTRTRTTTTTRTRTTTTTRTTRTTTRTRTRTTTTTRRTTTTT...

result:

ok Correct. #(queries) = 21

Test #8:

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

input:

2 1000
TTTTTTTRTTTRTTRTRTTTTTTRTTTTTTTTTTTTTTTTRTTTTTTTRTTTTTTTTTTTTTTTTTTTRTTTTTRTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTTTTTRTTTTTTRTTTTTTTRTTTTRTTTTTTTTTTRTTRTTTTTTTTTTTRTTTTTTTTRTTTTTTTTRTTTTTTTTTTRRTTTTTTTTTTTTRTTTTTTRRTTTTRTRTTTTTTTTTTRTTTTRTTTRTTTTTTTTTTTTRTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #9:

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

input:

2 1000
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #10:

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

input:

2 1000
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #11:

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

input:

2 1000
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #12:

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

input:

2 1000
TRRRRRRRRTRRRRRRRRRTTRRRRRTTRRRRRRRRRRRRTRRTTTRRRRRRRRRRRRRRRRRRRRRRRRRRTRRTRRRRTRRRRRRRRRTRRRRRRRRTRRRRRRTTRRRRRRRRRRTRRRRRTRTRRRRTRTRRRTRRRRRTRRRRTRRRRTRRRRRTRRRRRTRRRRRTRTTRTRRRRRRRRRRTRRRRTRRRRTRTRTRRRRRRTTRRTRRRRRRRTTRRRRRRRTTRRRRTRRTRTRRRRRRRRRRRTTRTTRRTRRRRRRRRRRRRTTRRRRRRRTRRRRRRTTTRR...

result:

ok Correct. #(queries) = 21

Test #13:

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

input:

2 1000
TRRTRRRTTRTRTRTRRRRRRRRRRRTTRTTRTRRRRTRRRRRRRRRRRRRRRRRRTRRRRRRRRTRRRRRTTTRRRRRRRTRRRRRRTRTRTRRRRTRTRRTRRRTTRRRTRTRRRRRRRRTRTRRRTRRRTRRRRRRTRRRTRRRRTRRRRRRRRRRTRRRRRRTRRRTTRRRRTRRRRRRRRRRRRRRRTTRRRRRRRRRTRTRTRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRTRRRRRRTTRRRTRRRTRRRRRTRRRRRRRRRRRRRRRRRRRTRRRRTRR...

result:

ok Correct. #(queries) = 21

Test #14:

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

input:

1 1000
TRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok Correct. #(queries) = 21

Test #15:

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

input:

1 1000
TTTTRRTRTRRTTRRTRTTTTTTTTRTRTRTRTTTTTTTTRTTTTRTTTTTRTRTRTTRTTTTTTRTTTTTRTTTTTRTTTRTTTRTTTTRTTTTTTTRRTTTTTRTTRTTTTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTRTTTTTTTTTTTTTTTRTTTTTRTTRTTRTTTTRTTTTTTTTTRTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTRTTTTTTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTT...

result:

ok Correct. #(queries) = 21

Test #16:

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

input:

1 1000
TTRTTRRTTRTTTTTTTRTTRRRRRTRTTTTRTTTTTTTTRTTRTRRTRTRRRRTRTRRTRTTRRTRTRRRTRTTTTTTTTTRTRTTRRTTTTTRTTTTTRTTRTTTTTTRTTTRTRTTRRTRTRRTRRTRRTRRTTRTTTTTRTRTTTTTRRTRTTTRRTTTTRTTTTRTTRTTRTTRTRTTRRTTTTRRTTRTTTRTTRRTTRTTRRTTTTRRTRRTTTTTTTRRTTTTTRTTRTRTRRRTRTTTRTTTTRTTTTTTRTRTTTRRTRTTTTTTRRRTTTTTTTRTRTRTRT...

result:

ok Correct. #(queries) = 21

Test #17:

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

input:

1 1000
TRRTRRRRRRTRRRRTRRRTRRRRRTTTRRRTRRRTTTTRTRRRRRTRRRRTRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRTTRTRRTRRTRRTTRTRRRTTRTRRRRRTTRTRTTRRRRRTRTTRRRRRRRRRTRRRTRRRRRRTRRTTRRTRRRRRTRRRTTRRRRRRRRRRRRTRTRRRRTRTRRRRTRRRRRRRRRTRRTRTTRTRRTRRRRRRRTTRTTRRRTRRRRRRRTRRTRTTRRRRRTTTRTTRRRRTRRRRRRTRRRRTTRRTRRRRRRTRRTRRTR...

result:

ok Correct. #(queries) = 21

Test #18:

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

input:

1 1000
TTRRTTTRTTTTTTTTTTTTTTTTTTRTTRTTRTTTRTRTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTRTTTRTTTTTTTTTRRRTTTRTRRRRTTTTTTRRTRTTTRTRTTTRTTRTTTTTTTTTTTTTRTTRTTRTTTTTTRTTRTTTTTTTTTTTTTTTTTRRRTTTTTTRTRTTTTTRRTTTTTRTTRTTTTRTTTTTTRRTTTRTTRTTTTRTTTTTTTTTTTTTTRRRTRTTRTTTRTRRTTTTTRTTTTTTTTTTRTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #19:

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

input:

2 1000
TRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

ok Correct. #(queries) = 21

Test #20:

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

input:

2 1000
TTTTRRTRTRRTTRRTRTTTTTTTTRTRTRTRTTTTTTTTRTTTTRTTTTTRTRTRTTRTTTTTTRTTTTTRTTTTTRTTTRTTTRTTTTRTTTTTTTRRTTTTTRTTRTTTTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTRTTTTTTTTTTTTTTTRTTTTTRTTRTTRTTTTRTTTTTTTTTRTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTRTTTTTTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTT...

result:

ok Correct. #(queries) = 21

Test #21:

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

input:

2 1000
TTRTTRRTTRTTTTTTTRTTRRRRRTRTTTTRTTTTTTTTRTTRTRRTRTRRRRTRTRRTRTTRRTRTRRRTRTTTTTTTTTRTRTTRRTTTTTRTTTTTRTTRTTTTTTRTTTRTRTTRRTRTRRTRRTRRTRRTTRTTTTTRTRTTTTTRRTRTTTRRTTTTRTTTTRTTRTTRTTRTRTTRRTTTTRRTTRTTTRTTRRTTRTTRRTTTTRRTRRTTTTTTTRRTTTTTRTTRTRTRRRTRTTTRTTTTRTTTTTTRTRTTTRRTRTTTTTTRRRTTTTTTTRTRTRTRT...

result:

ok Correct. #(queries) = 21

Test #22:

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

input:

2 1000
TRRTRRRRRRTRRRRTRRRTRRRRRTTTRRRTRRRTTTTRTRRRRRTRRRRTRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRTTRTRRTRRTRRTTRTRRRTTRTRRRRRTTRTRTTRRRRRTRTTRRRRRRRRRTRRRTRRRRRRTRRTTRRTRRRRRTRRRTTRRRRRRRRRRRRTRTRRRRTRTRRRRTRRRRRRRRRTRRTRTTRTRRTRRRRRRRTTRTTRRRTRRRRRRRTRRTRTTRRRRRTTTRTTRRRRTRRRRRRTRRRRTTRRTRRRRRRTRRTRRTR...

result:

ok Correct. #(queries) = 21

Test #23:

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

input:

2 1000
TTRRTTTRTTTTTTTTTTTTTTTTTTRTTRTTRTTTRTRTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTRTTTRTTTTTTTTTRRRTTTRTRRRRTTTTTTRRTRTTTRTRTTTRTTRTTTTTTTTTTTTTRTTRTTRTTTTTTRTTRTTTTTTTTTTTTTTTTTRRRTTTTTTRTRTTTTTRRTTTTTRTTRTTTTRTTTTTTRRTTTRTTRTTTTRTTTTTTTTTTTTTTRRRTRTTRTTTRTRRTTTTTRTTTTTTTTTTRTTTTTTTTT...

result:

ok Correct. #(queries) = 21

Test #24:

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

input:

2 1000
TRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRT...

result:

ok Correct. #(queries) = 21

Test #25:

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

input:

2 1000
TTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRT...

result:

ok Correct. #(queries) = 21

Test #26:

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

input:

2 1000
TTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTR...

result:

ok Correct. #(queries) = 21

Test #27:

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

input:

2 1000
TTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTT...

result:

ok Correct. #(queries) = 21

Test #28:

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

input:

2 1000
TTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTT...

result:

ok Correct. #(queries) = 21

Test #29:

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

input:

2 1000
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...

result:

ok Correct. #(queries) = 13

Subtask #2:

score: 90
Accepted

Test #30:

score: 90
Accepted
time: 1ms
memory: 3840kb

input:

2 1000
RRTTRRRRRTTRTTRRTTTTTTTTTTTTTRTTRRRRTTRRTTRTRRTRTRTTTTTRTRTTTTTTRRTTTRTTRTTTTRTTRTTRTTRTTRTRRRTRTTTTTRRTTTTTTRRRTRRTRRRRRTTTTTTTTTRTTRTRRTTTRRRTRRRTRTRTTRTTTRTRTRTRTTTRRTTTTTTTRTRRTRTTRTTTTTRTTRTTTRRTRTRTTRTRTRTTTTRTTTTTRTTTTTRRRTRTRRTRRTTTTTRTTTRTRTTTRTRTRRTRTTTRRTRRTTTRTRTTRRTTRTTTRRTTTRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #31:

score: 90
Accepted
time: 0ms
memory: 3808kb

input:

2 1000
RTRTRRTTTRTRRRRRRTTTRTTTRRRRRRTTTRRRRRTRTRRRRRRTRTTRRRRTRRTRTTRRRRRTRRRRRRRRTRTTRRRTTTRRRRRRTTRTRTRRRRTRRRRRTRRRRRRRRRRRTRTRTTTRRTTTTRRRRTRRRTRRTRTRTRRTTRRTRRRRRRRRTRRRTRRTRRRTTRTTRRRRTRTRRRRRRRTRTTTRRTRTTTTRRRRTTRRRRRTRRRTRTTTRRRTRRRRRRRRTTTRRTTRRRRRRRRTTRRRTRRRTTRRRTTTRRRRRRRRTRRRRRTRRRRTTR...

result:

points 1.0 Correct. #(queries) = 21

Test #32:

score: 90
Accepted
time: 1ms
memory: 3824kb

input:

2 1000
RTTTRTRTRTTRRRTTRTRTRRTTTTRRRRTRRTTRRRRRTRRRTRRRTRTTRTTRTTTTRTTRRRRTRRTRRRTRTRTRTTTTRRTTRTTRRRTTRTTRRTTRTTRTRRTRTRRRRTTTTTRTRRTTTRRRRTRRTRTTRRRRTRRRRTTTRRTTRRTRTTRTRRTRTTRRRTRTTTTRTTRRTRTRTTRTTRTRRRTTTTTTTTTTTTRRRTRTTRRRTTTTTTTTTRRRTRTRTRTTTRTRRRRRTRTRRTTTTRRRRTRRRTRTTTRRRRTRTTTRTRTTRRRTRTRTT...

result:

points 1.0 Correct. #(queries) = 21

Test #33:

score: 90
Accepted
time: 1ms
memory: 4168kb

input:

2 1000
RRRRRRRRRRTRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRTRRRRRRRRRRRRRRRRRRRRRRRRTRTRRRTRRRRTRTRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #34:

score: 90
Accepted
time: 1ms
memory: 3824kb

input:

2 1000
RRTRRTRTRRRRRRTRRRRRRRRRTRRTTTRTRRRRRRTRRRRRRRTRRRTRTTRRTRRRRRRRRRTRTTRRRRTTTRRRRRRRRRRRRRRTRRRRRTRRRRRTRRRTRRRTTTRRTRRRRRTRRRTRRRRRRRRTRRTTRRRRRRTRRTRRRTTRRRRRRTRRTRRRRRTRRRRTRRRRRRRRTRRRRRRRTTRRRRTRTTRTRRRRRRRTTRRRRTRTRRTTRRRRRRRTRRRRTRRRRRRRRRRRRRRRRRRRRRRTTRRRTRRRTRRRRTRRRRRRTTTTRRRRTRRTR...

result:

points 1.0 Correct. #(queries) = 21

Test #35:

score: 90
Accepted
time: 1ms
memory: 4172kb

input:

2 1000
RTRRTRRTRRRRRTRTTRRRTRTTRRRRRRTTRRTRTTTRTTRRRRRRRRRRTRRTTTRRTTRRRRTRRTTTRRRRTRRTRRTRTTRRRRRTRRRRTRTTRRRRRTRRRRTTRRRRRRRRTTTTRTRTTRRRRTTRRTRTTTRRTRRTRRTRTTRTRTTRRRRTRTTTTRTRRTRRRRRRRTTRRRTRTTTRTTRTTRRRTRTTTTTTRRRRRTRTRRRTTRRRTRRTTRRRRRTTTRTTRRTTRRRTRTRRRRTTRRRTTTTRTTTRRTTTRRRTTRRRRRRRTTTRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #36:

score: 90
Accepted
time: 1ms
memory: 4096kb

input:

2 1000
RRRRRRTRRRRRRRRRRRRRRTRTRRRRRRRRRTTRRRRRTTRRRTRRRRRRRRRTRRTRRRRTRTRRRTTRRRRRRRRTRRTTRTRTRTRRTRRRTRRTRRRRRTRRRRTRRRTRTRRTRRTRRRRRRRRRRTRRRRTRTRRRTTRRRRRTRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRTRRRRRRRTRRTRRRTRRTTRRRRRRRRRRRTRRRRRRRRRTTRRRRTRRTTRRTRRRRTRRRRTRTRRRRRRTRRRRRRRRRRRRRRTRRRRRTRRRTRRRRTRTRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #37:

score: 90
Accepted
time: 0ms
memory: 3820kb

input:

2 1000
RRRTTTTTRTTTTTRTTTTTTRTTTTTTTRTTRTTTTTRTRTTTTRRTTTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTRTTTTRTTRTRTTTRTTTTTTTRTTTRTTTTTTTTTTTTTTTTRTTTTTRTTTTRTTTTTTRTRTRTTTTRTTTTTTTRRTRRTRTTRTTTTTTTTTRTTTTTTTTTTTRTRTTTTTTTTTTRRTTTTTTTTTTTTRTRTRTRTRTTTTRRRTTTTTTTTTRTTRTTTRTTTTRTTTTRTTTTTRTTTTTTTTTTTTRTRTTRTTTTTTRTTTR...

result:

points 1.0 Correct. #(queries) = 21

Test #38:

score: 90
Accepted
time: 1ms
memory: 3840kb

input:

2 1000
RTTTTRTTTTTTTTTTTTRTTTRTTRTRTTTRTTTTTTRTTTTTTTTTRTTTTTRRTTTTTTTTRRTRTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTRTTTRTTTTTTTTTTTTTTTTTRTTTTTTTRRTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTTTTTTTTTTTTTTRTTTTTTRTTTTTTTTTTRTTTRTTRTRTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTT...

result:

points 1.0 Correct. #(queries) = 21

Test #39:

score: 90
Accepted
time: 1ms
memory: 3756kb

input:

2 1000
RRRRRRRTTTTRRRRRTRRRTRRRRRRTRRRTRRRRRRRRRRRRRRRRRRTRRRRRRRTRTRRRRRRRRRRTRRRTRRRRRRTRRRRRRRRRTRRRRRRTRRRRTRRRTRRRRRTTRRRTRRRTTTRRRRRRRRRTRTRRRRRRRRRRRRRRRRRTRRRRRRTTRRRTRRRRRRRRTRTRTRRRRRRTRRRTRTRRRTRRRRRRTRRTRRRTRTRRRRRRRRTRRRTRTRRRRRTRRRRRRRRTRTRTRRRRTRRRTRRRRRTRRRRTTRRRRRRRRRRRRTRRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #40:

score: 90
Accepted
time: 1ms
memory: 3804kb

input:

2 1000
RRRRTRTRRRRRTRRRRRRRRTRTRRRRTRTRRRRRTRTRRRRRRRRTRRRRRRRRTRRRTRRRRTRRRRRRRRRRRRRTRRRRTRTRRRTRRRRRRRRRRRTRRRRRRTTRTTRTTRTRRRTTRTRRRRRRTRRRRRTRRRRRRTTRRTRRRRRRRRRTRRRRTRRRRTTRRRTRRRRRTRRRRRTRTRRRRRRTRRRRTRRRRRRRTRRRRRTRRTRTRTRRRRTTTRTRRRRRRTRRRTTRRRRRRRTRRRTRTRRRRRRRTRRRRTRRRRRRRRTRRRRRTRRRRTRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #41:

score: 90
Accepted
time: 1ms
memory: 3856kb

input:

2 1000
RRRRRRRRRRRRRTRRRTRTRRRRRRTRRRRRRRTRRRRRRRRRRRTRRRRRTRRTRTRRRRRRTRRRTRRRRRRRRRRRRRRTRRRRRTRTRRRRTRRRRRTTRRRTRRRRRRRRRTRRRTRTRRRRRRTRRTRRRTRRRTRRRRRRTRRRRRRRTRRRTTRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRRRRRRRRRRTRRTRRRTTRTRRRRRRRRRRTRRRTTRRRRRTTTTRRRTRRRRTTRRTTRRRRRRTTTTRTRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #42:

score: 90
Accepted
time: 1ms
memory: 3868kb

input:

2 1000
RRTRRRRRRTRRTRRRTRRRRRTRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRTRTRRRRRRRRRTRRRRRRTRRRTRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRTTRRRRRRRTTRRRRRRRRTTRRRRTRTRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRTTRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRT...

result:

points 1.0 Correct. #(queries) = 21

Test #43:

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

input:

2 1000
RRRRRTRRRRRRRRRTRTRRRRRRRRRRRRRRRRRRRTRRRTRRTRRRRRRRRRRRTRRRTTRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRTTTRTTRTRRTTRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRTRRRTRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRTRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTRTR...

result:

points 1.0 Correct. #(queries) = 21

Test #44:

score: 90
Accepted
time: 1ms
memory: 3848kb

input:

2 1000
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #45:

score: 90
Accepted
time: 1ms
memory: 3904kb

input:

2 1000
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #46:

score: 90
Accepted
time: 2ms
memory: 3888kb

input:

2 1000
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 13

Test #47:

score: 90
Accepted
time: 1ms
memory: 3864kb

input:

2 1000
RTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTR...

result:

points 1.0 Correct. #(queries) = 21

Test #48:

score: 90
Accepted
time: 0ms
memory: 3748kb

input:

2 1000
RRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTR...

result:

points 1.0 Correct. #(queries) = 21

Test #49:

score: 90
Accepted
time: 1ms
memory: 3876kb

input:

2 1000
RRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRT...

result:

points 1.0 Correct. #(queries) = 21

Test #50:

score: 90
Accepted
time: 1ms
memory: 3820kb

input:

2 1000
RRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #51:

score: 90
Accepted
time: 1ms
memory: 3872kb

input:

2 1000
RRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRR...

result:

points 1.0 Correct. #(queries) = 21

Test #52:

score: 90
Accepted
time: 1ms
memory: 4108kb

input:

2 1000
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

result:

points 1.0 Correct. #(queries) = 13