Can somebody please explain why there is a difference if we use n/2 and n/2+1 in place of floor(n/2.0) and ceil(n/2.0)? I got WA for using floor and ciel and AC for using n/2+1 logic.
Using floor and ciel (WA): https://www.codechef.com/viewsolution/33021154
Using n/2 and n/2+1 (AC): https://www.codechef.com/viewsolution/33021546
P.S.: I know the nesting could have been simplified. I just want to know why ceil and floor doesn’t work.