Please help me

Can you please tell me why my solution is not working for Chef and dolls problem. link of solution is given below

Just Think of cases like…
let’s say…
T=1
N=5
Type of dolls.:- 2 2 2 3 3

2 Likes