結果
| 問題 |
No.139 交差点
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-12-30 21:57:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 289 bytes |
| コンパイル時間 | 244 ms |
| コンパイル使用メモリ | 82,324 KB |
| 実行使用メモリ | 53,312 KB |
| 最終ジャッジ日時 | 2024-12-30 21:57:04 |
| 合計ジャッジ時間 | 2,887 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 1 |
ソースコード
N,L = map(int,input().split())
XWT = [list(map(int,input().split())) for _ in range(N)]
nowt = 0
nowp = 0
for x,w,t in XWT:
nowt += x - nowp
nowp = x
if nowt % (2 * t) > t or (nowt + w) % (2 * t) > t:
nowt = - (-nowt // (2 * t)) * (2 * t)
nowt += L - nowp
print(nowt)
ntuda