Can u pls see whats wrong in the code


for test case say3 5 5 6 it is giving wrong o/p

Hi Sneha, can you share the question as code doesn’t seems to be of painter’s partition!

SORRY HERE IS THE CODE

DID U FIND ANYTHING??

HEY???did u find any mistake there??

Sorry for delay Sneha,
Here are mistakes:

  1. Incorrect input-> input is N,K,T (T is time)
    so there are no test cases, also you have taken time as 5 which is wrong.
  2. Don’t sort array, boards need to be painted in given order!
  3. to avoid overflow, use long long.