Ticket 7253
Problem 1679 -e
Submission 157353868
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
5
?e???
13
c
c
d
cbe
b
dc
cedba
cab
bc
ab
a
ebacd
acbe
Expected Output
9
9
9
621
9
112
4075
513
112
112
9
4075
1776
Your Output
11
11
11
621
11
120
4075
531
120
120
11
4075
1776
Difference
Generator Parameters
--alpha_size_high 5 --alpha_size_low 1 --n_high 9 --n_low 1 --q_high 15 --q_low 1