結果
| 問題 | No.817 Coin donation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-28 13:33:22 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 218 ms / 2,000 ms |
| コード長 | 260 bytes |
| 記録 | |
| コンパイル時間 | 137 ms |
| コンパイル使用メモリ | 77,496 KB |
| 最終ジャッジ日時 | 2025-12-04 01:37:42 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 |
ソースコード
#yuki817 n,k=map(int,raw_input().split()) ab=[] for i in xrange(n): ab.append(map(int,raw_input().split())) l=0 r=10**9 while r-l>1: mid=(l+r)/2 cnt=0 for a,b in ab: if a>mid: continue cnt+=min(b,mid)-a+1 if cnt>=k: r=mid else: l=mid print r