結果
問題 |
No.1715 Dinner 2
|
ユーザー |
|
提出日時 | 2021-10-22 22:44:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 261 bytes |
コンパイル時間 | 204 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-09-23 06:28:27 |
合計ジャッジ時間 | 2,522 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 3 WA * 35 |
ソースコード
N,D = map(int,input().split()) pq = [list(map(int,input().split()))for _ in range(N)] pq.sort(key=lambda x:(x[0],-x[1])) l = [0]+sorted(list(map(lambda x:x[1]-x[0],pq)),reverse=True) ans = 0 for i,x in enumerate(l[:-1]): ans = min(ans,x-pq[i][0]) print(ans)