結果
問題 | No.561 東京と京都 |
ユーザー | takakin |
提出日時 | 2020-04-10 23:03:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 206 bytes |
コンパイル時間 | 250 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-15 23:40:25 |
合計ジャッジ時間 | 1,770 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 17 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() n,d=map(int,input().split()) A=[0,-d] for _ in range(n): t,k=map(int,input().split()) a1,a2=A A=[max(a1+t,a2+t-d),max(a1+k-d,a2+k)] print(max(A))