Not able to pass test cases

here is my code please help

https://ide.codingblocks.com/s/221156

check out this code

u are taking s as wrong
not always the board is sorted and since u cant sort it, s needs to be max of the boardarray