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

10505번 - Wheels 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB117706566.327%

문제

A very important and complicated machine consists of n wheels, numbered 1, 2, . . . , n. They are actually cogwheels, but the cogs are so small that we can model them as circles on the plane. Every wheel can spin around its center.

Two wheels cannot overlap (they do not have common interior points), but they can touch. If two wheels touch each other and one of them rotates, the other one spins as well, as their micro-cogs are locked together.

A force is put to wheel 1 (and to no other wheel), making it rotate at the rate of exactly one turn per minute, clockwise. Compute the rates of other wheels’ movement. You may assume that the machine is not jammed (the movement is physically possible).

입력

The first line of input contains the number of test cases T. The descriptions of the test cases follow:

Each test case consists of one line containing the number of wheels n (1 ≤ n ≤ 1000) . Each of the following lines contain three integers x, y and r (−10 000 ≤ x, y ≤ 10 000; 1 ≤ r ≤ 10 000) where (x, y) denote the Cartesian coordinates of the wheel’s center and r is its radius.

출력

For each test case, output n lines, each describing the movement of one wheel, in the same order as in the input. For every wheel, output either p/q clockwise or p/q counterclockwise, where the irreducible fraction p/q is the number of wheel turns per minute. If q is 1, output just p as an integer. If a wheel is standing still, output not moving

제한

예제 입력 1

1
5
0 0 6
6 8 4
-9 0 3
6 16 4
0 -11 4

예제 출력 1

1 clockwise
3/2 counterclockwise
2 counterclockwise
3/2 clockwise
not moving

힌트

출처

ICPC > Regionals > Europe > Central European Regional Contest > CERC 2014 D번

Contest > Open Cup > 2014/2015 Season > Stage 4: Grand Prix of Europe F번

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

출처

대학교 대회

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

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