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

31021번 - Cookie Cutting 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB211100.000%

문제

You've decided to make some cookies for your sweetheart when she comes home from a long day of work. Mom always told you that food was the way to a woman's heart. Hopefully your sweetie will enjoy these cookies while you find a way to discuss how fixing the car might set your budget back a little bit next month.

Whilst preparing the sheet of cookie dough to cut shapes from, a presence can be sensed nearby. She thinks she's being sneaky, but you can hear your daughter giggling every time you turn your back!

The oven's alarm indicates it's preheated to the right temperature, but when you go to cut out the special shapes you wanted to make, you notice there are bites of cookie dough missing!

"Argh!!" you shout as you hear your daughter laughing her cookie-filled face all the way down the street as she goes to play with her friends.

Well it's time to put that computer science education to work. You'll need to know how many cookies you can get out of the remaining cookie dough so that you can figure out how much time you'll have to discuss money with your darling.

Good thing you can rearrange the cookie dough as many times as necessary to maximize the number of cookies you can make (keeping the dough at a constant thickness). The bites your daughter took may overlap, but all are fully contained within the bounds of the dough.

입력

The first line of input will contain the number of test cases, N (1 ≤ N ≤ 50). Each test case will begin with a W and H outlining the area of the cookie dough sheet, M number of bites, X and Y coordinates and radius R for the circular bites your daughter took, and a number S (3 ≤ S ≤ 100) lines giving the points defining the shape of the cookie, with A and B for the points.

출력

Your output should show ... how many cookies you can make! Use one line per test case output.

제한

예제 입력 1

1
4.1 4.1
2
1.5 2 0.75
2.5 2 0.75
4
0 0
3 0
3 2
0 2

예제 출력 1

2

힌트

출처

ICPC > Regionals > North America > South Central USA Regional > 2016 South Central USA Regional Programming Contest D번

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

출처

대학교 대회

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

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