結果
| 問題 | No.156 キャンディー・ボックス |
| コンテスト | |
| ユーザー |
a_ten
|
| 提出日時 | 2016-03-23 19:21:31 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 234 bytes |
| 記録 | |
| コンパイル時間 | 146 ms |
| コンパイル使用メモリ | 77,404 KB |
| 最終ジャッジ日時 | 2025-12-03 19:54:07 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 28 TLE * 2 |
ソースコード
#coding:utf-8 from heapq import heapify,heappop,heappush N,M=map(int,raw_input().split()) C=map(int,raw_input().split()) C1=C heapify(C) cnt=0 while M: s=heappop(C) s-=1 M-=1 if s!=0: heappush(C,s) else: cnt+=1 print cnt
a_ten