question = https://hack.codingblocks.com/contests/c/452/716
solution= https://ide.codingblocks.com/#/s/20231
Painter’s partition problem
Heyy Aayush !!! Actually ur code will not workfor this test case
2
2
15 10
Well , you should think about the initialisation of s and e variable (s should be initialised with max(board[i]) and e should be with sum(board[i]))
Okay , check this code i have made some modification in ur code .
https://ide.codingblocks.com/#/s/20385
1 Like