Universal Cup Judging System

Universal Cup

実行時間制限: 2.0 s メモリ制限: 1024 MB 満点: 100 ハック可能 ✓
統計

무한한 평면 위에 $N \approx 10^{100}$마리의 개미가 있는 개미집이 있습니다. 그 외에 평면 위에는 중심이 개미집으로부터 거리 $d$만큼 떨어져 있고 반지름이 $R$인 원형 꿀단지만 있습니다.

처음에 모든 개미는 개미집에 있습니다. 그런 다음 모든 개미는 서로 독립적으로 이동하기 시작합니다. 각 개미는 이동 방향을 무작위로 선택하고, 선택한 방향으로 $(\Delta t)^{-1/2}$의 속력으로 $\Delta t$ 단위 시간 동안 이동하여 $\sqrt{\Delta t}$ 단위 거리만큼 이동합니다. 여기서 $\Delta t \approx 10^{-100}$은 매우 작은 수입니다. 그 후 각 개미는 이 전체 과정을 계속해서 반복합니다. 개미가 꿀단지 내부에 있을 때마다, 내부에서 보낸 단위 시간당 1단위의 꿀을 모읍니다.

여러분은 시작 후 $T$ 단위 시간 동안 개미집과 꿀단지를 시뮬레이션하고 두 수를 계산해야 합니다. 즉, $T$ 단위 시간 후에 꿀단지 안에 있게 되는 개미의 비율 $f$와 각 개미가 모은 꿀의 평균량 $h$를 구하세요.

입력

입력의 첫 번째 줄에는 테스트 케이스의 수를 나타내는 정수 $k$가 주어집니다 ($1 \le k \le 1000$).

다음 $k$개의 줄에는 각각 하나의 테스트 케이스를 설명하는 세 실수 $d$, $R$, $T$가 소수점 아래 최대 네 자리까지 주어집니다 ($0 \le d \le 100$; $0.01 \le R \le 100$; $0.01 \le T \le 100$).

출력

각 테스트 케이스마다 한 줄씩 총 $k$개의 줄을 출력해야 합니다. 각 줄에는 하나 이상의 공백으로 구분된 $f$와 $h$의 값을 출력해야 합니다. 출력한 $f$의 값은 정답과의 차이가 최대 $10^{-8}$이어야 하며, 출력한 $h$의 값은 정답과의 차이가 최대 $10^{-8} \cdot T$이어야 합니다.

예제

예제 입력 1

7
0 1 1
2 1 3
1 2 0.999
1 2 1
1 2 1.001
1 1 1
0 10 10

예제 출력 1

0.6321205588285579 0.8515044932240781
0.09157635496981011 0.1733100735950181
0.8767916692090618 0.9555113318223997
0.8766185521451777 0.9563880369284812
0.8764454902564369 0.9572645689450815
0.3457458387231645 0.4012213611982974
0.9999546000702375 9.999961697595344

Editorials

IDTypeStatusTitlePosted ByLast UpdatedActions
#1212EditorialOpen题解jianglyView

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.