Ticket 13966
Problem 1690 -f
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
13
9
cfefafgcf
1 2 6 3 8 7 4 5 9 
9
dafeghdgf
3 6 4 8 9 7 5 2 1 
1
i
1 
2
gd
2 1 
7
fgbdcbd
7 4 3 2 5 6 1 
1
e
1 
5
aaaaa
2 4 1 3 5 
4
gbha
2 4 1 3 
3
ffe
3 2 1 
6
aefebe
1 4 2 6 5 3 
1
c
1 
6
hgggda
3 2 6 5 4 1 
3
dgd
3 2 1 
Expected Output
4
9
1
2
2
1
1
4
2
4
1
6
1
Generator Parameters
--alpha_size_high 9 --alpha_size_low 1 --n_high 9 --n_low 1 --t_high 30 --t_low 1