Ticket 7509
Problem 1679 -e
Submission 158364156
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
4
?d?b
14
dcab
a
d
a
abcd
dc
bac
dac
ba
a
adcb
dcba
d
bd
Expected Output
81
5
7
5
81
22
42
45
20
5
81
81
7
25
Your Output
80
5
7
5
80
22
42
45
20
5
80
80
7
25
Difference
Generator Parameters
--alpha_size_high 5 --alpha_size_low 1 --n_high 5 --n_low 1 --q_high 15 --q_low 1