choclate bar, M row, N coloum, each time only break one piece, ask for
the least number to break into MN small pieces.
floor(MN/2)
Here I assume that the bar can be broken from inside not just starting from
the edges.
Then, thinking about the international chess board, one only needs to break
all the balck ones, and the white ones will fall apart as a result.
So the smaller number between the black ones or the white ones will be the
least number to break.
阅读(781) | 评论(0) | 转发(0) |