Universal Cup Judging System

Universal Cup

Time Limit: 2.0 s Memory Limit: 1024 MB Total points: 100 Hackable ✓
Statistics

קן נמלים ובו $N \approx 10^{100}$ נמלים ממוקם במישור אינסופי. מלבד זאת, המישור מכיל רק צנצנת דבש מעגלית ברדיוס $R$ שמרכזה נמצא במרחק $d$ מקן הנמלים.

בתחילה כל הנמלים נמצאות בקן הנמלים. לאחר מכן כולן מתחילות לנוע באופן בלתי תלוי זו בזו. כל נמלה בוחרת באקראי את כיוון תנועתה ונעה בכיוון שנבחר במהירות $(\Delta t)^{-1/2}$ במשך $\Delta t$ יחידות זמן, וכך עוברת מרחק של $\sqrt{\Delta t}$ יחידות, כאשר $\Delta t \approx 10^{-100}$ הוא מספר קטן מאוד. לאחר מכן כל נמלה חוזרת על התהליך כולו שוב ושוב. בכל עת שנמלה נמצאת בתוך צנצנת הדבש, היא אוספת יחידת דבש אחת עבור כל יחידת זמן שהיא שוהה בפנים.

משימתכם היא לבצע סימולציה של קן הנמלים וצנצנת הדבש במשך $T$ יחידות זמן מההתחלה ולחשב שני מספרים: שיעור הנמלים $f$ שמסיימות בתוך צנצנת הדבש לאחר $T$ יחידות זמן, והכמות הממוצעת $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.