Unable to dry run this testcase?
Try making a new request with small values of n_high, t_high, *_high, etc.
2 5 2 9 3
6 54
dp[n][x][y] : (0, 0) : 3 dp[n][x][y] : (0, 1) : 3 dp[n][x][y] : (1, 0) : 1 7 dp[n][x][y] : (0, 0) : 28 dp[n][x][y] : (0, 1) : 28 dp[n][x][y] : (0, 2) : 28 dp[n][x][y] : (1, 0) : 13 dp[n][x][y] : (1, 1) : 7 dp[n][x][y] : (2, 0) : 6 110