Ticket 2711
Problem 1658 -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
7 4
29 19 33 42 6 27 5 
13 32 12 45 16 14 37 
23 22 21 48 40 43 8 
35 31 4 41 25 34 46 
44 49 1 30 20 15 28 
7 36 3 24 10 47 18 
39 11 38 2 17 26 9 
Expected Output
GGGGGGG
GMMGGGG
MMMMGGG
MMMMGGG
GMMGGGG
GGGGGGG
GGGGGGG
Generator Parameters
--n_cap 2000 --n_high 8 --n_low 5