結果
| 問題 | No.817 Coin donation |
| コンテスト | |
| ユーザー |
tomarint2
|
| 提出日時 | 2019-04-19 22:03:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 354 bytes |
| 記録 | |
| コンパイル時間 | 156 ms |
| コンパイル使用メモリ | 82,240 KB |
| 実行使用メモリ | 855,588 KB |
| 最終ジャッジ日時 | 2024-09-22 19:18:50 |
| 合計ジャッジ時間 | 4,470 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | MLE * 1 -- * 13 |
ソースコード
import collections
def solve():
N,K=map(int,input().split())
dn=collections.defaultdict(int)
for i in range(N):
a,b=map(int,input().split())
dn[a]+=1
dn[b+1]-=1
c=0
d=0
i=0
while True:
i+=1
d+=dn[i]
c+=d
#print(i,c)
if c>K:
return i
print(solve())
tomarint2