A: I got 1 WA
B:The luckiest case is when the partition [1,k-1],[k],[k+1,n] becomes an eligible solution, which happens if both [1,k-1] and [k+1,n] contain even number of integers. This observation leads to the case work on the parity of the size of [1,k-1] and [k+1,n].
A: I got 1 WA
B:The luckiest case is when the partition [1,k-1],[k],[k+1,n] becomes an eligible solution, which happens if both [1,k-1] and [k+1,n] contain even number of integers. This observation leads to the case work on the parity of the size of [1,k-1] and [k+1,n].