Link to problem statement…
How to approach this problem??
i think it can be done by backtracking…wasn’t able to implement it during the contest…but seeing the constraints i think it is quite possible…hope this helps…
i think it can be done by backtracking…wasn’t able to implement it during the contest…but seeing the constraints i think it is quite possible…hope this helps…