題目連結如下:https://tpmso.org/toi/wp-content/uploads/question/202208-OFFLINE/Fence.pdf
6 7 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 1 0 0 1 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0
8 18
5 5 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0
4 4 4 4 4