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

16057번 - Water Testing 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB131655747.500%

문제

You just bought a large piece of agricultural land, but you noticed that – according to regulations – you have to test the ground water at specific points on your property once a year. Luckily the description of these points is rather simple. The whole country has been mapped using a Cartesian Coordinate System (where (0, 0) is the location of the Greenwich Observatory). The corners of all land properties are located at integer coordinates according to this coordinate system. Test points for ground water have to be erected on every point inside a property whose coordinates are integers.

입력

The input consists of:

  • one line with a single integer n (3 ≤ n ≤ 100 000), the number of corner points of your property;
  • n lines each containing two integers x and y (−106 ≤ x, y ≤ 106), the coordinates of each corner.

The corners are ordered as they appear on the border of your property and the polygon described by the points does not intersect itself.

출력

The number of points with integer coordinates that are strictly inside your property.

제한

예제 입력 1

4
0 0
0 10
10 10
10 0

예제 출력 1

81

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > German Collegiate Programming Contest > GCPC 2017 G번

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

출처

대학교 대회

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

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