4 3 6
0 3
2 3
2 1
0 1
3 2
1 2
1 7 2 3 1
友情提示:共有(4 + 1) * (3 + 1) – 6 = 14个点, (4, 0)没有neighbour, (3, 1), (3, 3)有两个neighbours, (0, 2), (1, 1), (1, 3)有三个neighbours, (2, 2)有四个neighours, 其余点均为1个neighbour.
100%的测试数据, N <= 500000, w, h <= 1000000000.