結果
問題 |
No.561 東京と京都
|
ユーザー |
|
提出日時 | 2017-12-23 14:39:22 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 218 bytes |
コンパイル時間 | 196 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-17 16:28:26 |
合計ジャッジ時間 | 1,568 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 2 |
other | AC * 1 WA * 13 RE * 3 |
ソースコード
n,d=map(int,input().split()) t,k=map(int,input().split()) ft=t fk=k-d for i in range(n-1): t,k=map(int,input().split()) t_i=max(ft+t,fk-d+t) k_i=max(ft-d+k,fk+k) ndt=t_i ndk=k_i print(max(ndt,ndk))