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

17571번 - Garden Variety Vampire 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 512 MB1035440.000%

문제

Count Dracula is a voracious (as well as carnivorous) gardener. He keeps a small garden within easy walking distance of his eponymous mansion, and naturally also near to his eponymous potting shed.

Recently, the Count has had to cut back his gardening time sharply on account of adversely excellent weather conditions. His prize Deadly Nightshades are starting to feel neglected.

He would like to pave a shaded path between the garden, the mansion, and the shed using an ensemble of variously-sized trees he’s obtained from Harker Nurseries at suspiciously low prices. Each tree casts a circle-shaped shadow that Dracula can walk across.

Figure G.1: Illustration of a solution to the second sample input. Dots mark the garden, mansion and shed.

Is it possible for him to re-plant his trees in such a way that they cast a continuous shadow on the ground connecting the three given locations? You may assume shadows are directly beneath the trees and do not move throughout the day.

입력

The input consists of:

  • three lines each containing the integer co-ordinates of xi and yi, each the planar coordinates of one gardening location where (−106 ≤ xi, yi ≤ 106 for each i).
  • one line with an integer n, (1 ≤ n ≤ 12): the number of trees the Count has acquired.
  • one line containing n integers s1 . . . sn (1 ≤ si ≤ 106 for each i), the individual radii of the shadows cast by the Count’s tree collection.

출력

If the Count can place the trees in such a way as to connect all of the sites, output “possible”. Otherwise, output “impossible”.

제한

예제 입력 1

-6 0
6 0
0 6
4
1 3 1 1

예제 출력 1

impossible

예제 입력 2

-6 0
6 0
0 6
4
2 3 2 1

예제 출력 2

possible

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > The UK & Ireland Programming Contest > UKIEPC 2018 G번

  • 문제를 만든 사람: Jim Grimmett
(追記) (追記ここまで)

출처

대학교 대회

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

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