In solution for f, shouldn't the condition
$if (dp[i][val][fl].cnt > 0)$
instead be $if(dp[i][val][fl].cnt >= 0)$??
As we are modding and that may cause cnt to be zero.
Edit : Now they fixed it
In solution for f, shouldn't the condition
$if (dp[i][val][fl].cnt > 0)$
instead be $if(dp[i][val][fl].cnt >= 0)$??
As we are modding and that may cause cnt to be zero.
Edit : Now they fixed it