시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
10 초 512 MB 84 25 21 36.842%

문제

역사학자인 JOI 교수는 이전에 존재했던 IOI 왕국에 대해 연구하고 있다.

과거의 조사에 따르면, IOI 왕국은 세로 H 크기에 가로 W 크기이며, IOI 왕국의 수도는 방어를 위해 성벽으로 둘러싸여 있었다.

IOI 왕국의 수도를 둘러싸는 성벽은 다음과 같은 형태를 하고 있다:

  • 성벽의 크기 s(s ≥ 3)가 있다.
  • 크기 s의 성벽은 s × s의 정사각형 영역에서 안의 (s-2) × (s-2) 정사각형 영역을 제외한 테두리 모양을 하고 있다.

또 다른 조사에 의하면, 수도를 둘러싼 성벽의 크기는 L 이상이었다. 그리고 어떤 칸들에는 오래된 나무가 있는데, 나무가 있는 위치에는 성벽이 존재하지 않았음을 알고 있다.

JOI 교수는 이러한 사실들을 바탕으로 있을 수 있는 성벽의 가지 수를 알고 싶어한다. 이때, 성벽의 크기가 같더라도 위치가 다르면 서로 다른 성벽으로 간주한다.

IOI 왕국의 크기와, 성벽의 최소 크기, 그리고 나무의 위치들이 주어졌을 때 가능한 성벽의 가지 수를 구하는 프로그램을 작성하시오.

입력

입력의 첫 줄에는 정수 H, W, L, P가 공백으로 구분되어 주어진다. 이는 IOI 왕국의 크기가 세로 H, 가로 W이며 성벽의 최소 크기는 L, 나무의 개수가 P라는 뜻이다.

다음 P 개의 줄에 나무의 위치가 Ai, Bi가 공백으로 구분되어 주어진다. 이는 나무가 Ai번째 줄, Bi번째 칸에 있음을 의미한다.

그리고 다음 제약 사항을 만족한다:

  • 1 ≦ H, W ≦ 4 000
  • 3 ≦ L ≦ min(H, W)
  • 0 ≦ P ≦ 100 000
  • 1 ≦ Ai ≦ H (1 ≦ i ≦ P)
  • 1 ≦ Bi ≦ W (1 ≦i ≦ P)
  • (Ai, Bi) ≠ (Aj, Bj) (1 ≦ i < j ≦ P)

출력

첫 줄에 가능한 성벽의 가지 수를 출력한다.

예제 입력 1

5 5 3 2
2 2
4 3

예제 출력 1

4

예제 입력 2

7 8 4 3
2 2
3 7
6 5

예제 출력 2

13

예제 입력 3

4000 4000 1234 4
1161 3028
596 1892
3731 2606
702 1530

예제 출력 3

7050792912

힌트

1번 예제에서 가능한 성벽은 아래 4가지이다. 나무는 x로 표시되어있다.

W3sicHJvYmxlbV9pZCI6IjEwNzE3IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVjMTMxXHViY2JkIiwiZGVzY3JpcHRpb24iOiI8cD5cdWM1ZWRcdWMwYWNcdWQ1NTlcdWM3OTBcdWM3NzggSk9JIFx1YWQ1MFx1YzIxOFx1YjI5NCBcdWM3NzRcdWM4MDRcdWM1ZDAgXHVjODc0XHVjN2FjXHVkNTg4XHViMzU4IElPSSBcdWM2NTVcdWFkNmRcdWM1ZDAgXHViMzAwXHVkNTc0IFx1YzVmMFx1YWQ2Y1x1ZDU1OFx1YWNlMCBcdWM3ODhcdWIyZTQuPFwvcD5cclxuXHJcbjxwPlx1YWNmY1x1YWM3MFx1Yzc1OCBcdWM4NzBcdWMwYWNcdWM1ZDAgXHViNTMwXHViOTc0XHViYTc0LCBJT0kgXHVjNjU1XHVhZDZkXHVjNzQwIFx1YzEzOFx1Yjg1YyBIIFx1ZDA2Y1x1YWUzMFx1YzVkMCBcdWFjMDBcdWI4NWMgVyBcdWQwNmNcdWFlMzBcdWM3NzRcdWJhNzAsIElPSSBcdWM2NTVcdWFkNmRcdWM3NTggXHVjMjE4XHViM2M0XHViMjk0IFx1YmMyOVx1YzViNFx1Yjk3YyBcdWM3MDRcdWQ1NzQgXHVjMTMxXHViY2JkXHVjNzNjXHViODVjIFx1YjQ1OFx1YjdlY1x1YzJmOFx1YzVlYyBcdWM3ODhcdWM1YzhcdWIyZTQuPFwvcD5cclxuXHJcbjxwPklPSSBcdWM2NTVcdWFkNmRcdWM3NTggXHVjMjE4XHViM2M0XHViOTdjIFx1YjQ1OFx1YjdlY1x1YzJmOFx1YjI5NCBcdWMxMzFcdWJjYm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