結果
| 問題 |
No.1980 [Cherry 4th Tune D] 停止距離
|
| コンテスト | |
| ユーザー |
terasa
|
| 提出日時 | 2022-06-17 21:57:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,185 bytes |
| コンパイル時間 | 414 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 110,848 KB |
| 最終ジャッジ日時 | 2024-10-09 07:50:47 |
| 合計ジャッジ時間 | 56,894 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 24 |
ソースコード
import sys
import pypyjit
import itertools
import heapq
import math
from collections import deque, defaultdict
import bisect
from decimal import Decimal, ROUND_DOWN
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
pypyjit.set_param('max_unroll_recursion=-1')
def index_lt(a, x):
'return largest index s.t. A[i] < x or -1 if it does not exist'
return bisect.bisect_left(a, x) - 1
def index_le(a, x):
'return largest index s.t. A[i] <= x or -1 if it does not exist'
return bisect.bisect_right(a, x) - 1
def index_gt(a, x):
'return smallest index s.t. A[i] > x or len(a) if it does not exist'
return bisect.bisect_right(a, x)
def index_ge(a, x):
'return smallest index s.t. A[i] >= x or len(a) if it does not exist'
return bisect.bisect_left(a, x)
def S(v, t, m):
v = v * 1000 / 3600
return v * t + (v * v) / (20 * m)
N = int(input())
for _ in range(N):
T, m, L = map(float, input().split())
l = 0
r = 5100
while r - l > 10 ** (-6):
c = (l + r) / 2
if S(c, T, m) <= L:
l = c
else:
r = c
print(Decimal(str(r)).quantize(Decimal('0.01'), rounding=ROUND_DOWN))
terasa