Ticket 631
Problem 1644 -e
View hacks & all small testcases

Unable to dry run this testcase?
Try making a new request with small values of n_high, t_high, *_high, etc.


Retry
Input
2
7
DDDRDDD
7
RRRDRDR
Expected Output
28
27
Generator Parameters
--choose_path_len_dynamically 0 --n_cap 100000000 --n_high 7 --n_low 2 --path_len_high 9 --path_len_low 1 --t_cap 10000 --t_high 2 --t_low 1