Logo
(追記) (追記ここまで)

32853번 - Virtual Reality Playspace 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
4 초 2048 MB31150.000%

문제

Yolanda just finished moving the furniture around her house. Her house is shaped like a rectangle of side lengths $r$ and $c$. Yolanda wants to choose a place to put her virtual reality (VR) playspace.

Yolanda has some standards for how a VR playspace should be positioned:

  • It should take the shape of a rectangle.
  • Its sides should be parallel and perpendicular to the sides of her house.
  • It must exactly cover the entirety of any unit square it occupies.
  • It should contain no obstacles.
  • It should be at least $s$ units across along one side, and at least $t$ units across along the other.
  • Each of its sides must border either the house’s outer walls, or obstacles. In other words, a VR playspace is maximally-sized.

Given a map of Yolanda’s house, Yolanda wants to know how many different places she can choose for her VR playspace.

입력

The first line of input contains four integers $r,ドル $c,ドル $s,ドル and $t$ (1ドル ≤ r, c, s, t ≤ 3,円 000$), giving the length and width of Yolanda’s house and the size of her VR playspace.

The next $r$ lines each contain a string of $c$ characters describing Yolanda’s house. Each character is either a dot (.) that denotes an empty square unit of space, or a zero (0) that denotes a square unit of obstacle.

출력

Output a single integer, the number of different places Yolanda can choose for her VR playspace.

제한

예제 입력 1

4 7 1 2
.....00
.0...0.
..00.0.
.0.0.00

예제 출력 1

6

힌트

출처

ICPC > Regionals > North America > Southeast USA Regional > 2024 Southeast USA Regional Programming Contest > Division 1 M번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /