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

6174번 - The Loathesome Hay Baler 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB191534430.769%

문제

Farmer John has purchased the world's most loathesome hay baler. Instead of having a drive-roller that drives maybe an idler roller that drives the power take-off for the baler, it has N rollers (2 <= N <= 1050) which drive and are driven by various rollers.

FJ has meticulously cataloged data for each roller i: X_i,Y_i are the center of the roller (-5000 <= X_i <= 5000; -5000 <= Y_i <= 5000); R_i is the roller's radius (3 <= R_i <= 800). The drive-roller is located at 0,0; the baler power take-off is located at X_t,Y_t (numbers supplied in the input).

The drive-roller turns clockwise at 10,000 revolutions per hour. Your job is to determine the speeds of all the rollers that are in the power-train: from the drive-roller through the power take-off roller. Rollers that do not transfer power to the take-off roller are to be ignored. A roller of radius Rd that is turning at S rph and driving another roller of radius Rx will cause the second roller to turn at the speed -S*Rd/Rx (where the sign denotes whether the roller is turning clockwise or counterclockwise (anticlockwise for our British friends)).

Determine the power-train path and report the sum of the absolute values of all those rollers' speeds. All the rollers in the input set except the driver-roller are driven by some other roller; power is never transferred to a roller from more than one other roller.

Report your answer as an integer that is the truncated value after summing all the speeds.

입력

  • Line 1: Three space-separated integers: N, X_t, and Y_t
  • Lines 2..N+1: Line i+1 describes roller i's properties: X_i, Y_i, and R_i

출력

  • Line 1: A single integer that is the truncated version of the sum of the absolute value of the speeds of the rollers in the power-train including the drive-roller, all the driven rollers, and the power take-off roller.

제한

예제 입력 1

4 32 54
0 0 10
0 30 20
32 54 20
-40 30 20

예제 출력 1

20000

힌트

 Roller Radius Speed
1 (0,0) 10 10,000
2 (0,30) 20 -5,000
3 (32,54) 20 5,000
 ------
Sum of abs values: 20,000

출처

Olympiad > USA Computing Olympiad > 2007-2008 Season > USACO March 2008 Contest > Silver 1번

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

출처

대학교 대회

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

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