I tried to cover all corner cases but still getting WA in testcase 4 and 5. Please help me with this problem.
My code -
Getting WA in testcase 4 and 5
hello @ansh0811
a) dont sort the array because painters r allowed to paint only continguous blocks (sorting will change the ordr)
b) search space .
s= max in array * t
e=summation * t
do these changes and then it should work