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

33250번 - Darts 다국어

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

문제

You have joined a project called 'Flying Projectile Coding', which attempts to create a smart machine learning AI that will throw darts at a slightly modified dart board. Before the live testing of this AI, you have decided to train it in a simulation, because that is way faster and cheaper.

In this project, you are tasked with assessing the AI's performance. Since it is still in the early stages of its development, you are only interested in whether it hit the board or not. Also, for now, you just assume that gravity is negligible, so darts fly in straight lines.

The board

입력

  • One line with an integer: $ 1 \leq n \leq 10^5 $: the number of darts that have been thrown.
  • Two lines with three floating-point numbers each: $ -10 \leq h_1, h_2, h_3 \leq 10 $ and $ -10 \leq v_1, v_2, v_3 \leq 10 $. The dart board is mounted at $ (0, 0, 0) $ and is shaped like an ellipse with perpendicular axes $ (h_1, h_2, h_3) $ and $ (v_1, v_2, v_3) $.
  • $ n $ lines with six floating-point numbers each: $ -100 \leq p_1, p_2, p_3 \leq 100 $ and $ -10 \leq d_1, d_2, d_3 \leq 10 $. This line indicates that a dart is thrown from position $ (p_1, p_2, p_3) $ in direction $ (d_1, d_2, d_3) $.

출력

The number of darts that hit the board.

제한

예제 입력 1

3
2.0 0.0 0.0
0.0 1.0 0.0
0.0 0.0 2.0 2.0 1.0 4.0
0.0 0.0 -2.0 2.0 1.0 4.0
0.0 0.0 2.0 2.0 0.0 0.0

예제 출력 1

1

예제 입력 2

6
1.0 1.0 0.0
1.0 -1.0 1.0
0.0 0.0 1.0 0.0 0.0 -1.0
0.0 0.0 1.0 1.0 1.0 0.0
0.0 0.0 1.0 1.0 -1.0 1.0
1.0 -1.0 -1.0 -1.0 1.0 8.0
1.0 -1.0 -1.0 1.0 -1.0 8.0
-1.0 1.0 1.0 1.0 -1.0 -8.0

예제 출력 2

3

힌트

출처

University > Delft University of Technology > Freshmen Programming Contest 2019 D번

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

출처

대학교 대회

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

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