Two test cases not passing

Hi, I cant figure out what is wrong with my code, only 2 test cases are not passing. Pls help. https://ide.codingblocks.com/s/257792

hello @Parikalp10

dont sort the board because painter can only paint contigous blocks

search space s=max in array * t
e= summation *t

oh yes my bad. Thank you