結果
| 問題 | No.1980 [Cherry 4th Tune D] 停止距離 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-17 22:55:58 |
| 言語 | Crystal (1.14.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 597 bytes |
| コンパイル時間 | 19,638 ms |
| コンパイル使用メモリ | 345,528 KB |
| 実行使用メモリ | 10,660 KB |
| 最終ジャッジ日時 | 2024-10-09 09:17:57 |
| 合計ジャッジ時間 | 25,521 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 TLE * 1 -- * 24 |
ソースコード
# require "debug"
require "big"
alias LL = Int64
macro chmin(x, y); {{x}} = {{y}} if {{x}} > {{y}}; end
macro chmax(x, y); {{x}} = {{y}} if {{x}} < {{y}}; end
macro yn(x); {{x}} ? "Yes" : "No"; end
# ---------------------------------------------------- :)
def f(t,u,v)
return v*t + (v*v)/(u*20)
end
read_line.to_i.times do
t, u, l = read_line.split.map(&.to_big_f)
ng = 0.to_big_f
ok = 5111.to_big_f
while ok-ng > 0.0000000000000000001
mid = (ok+ng)/2
if f(t,u,mid) <= l
ng = mid
else
ok = mid
end
end
x = ((ng*360).to_i)/100
printf("%.2f\n", x)
end