結果
| 問題 | No.3297 Bake Cookies |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2025-10-14 03:38:02 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 260 ms / 2,000 ms |
| + 48µs | |
| コード長 | 461 bytes |
| 記録 | |
| コンパイル時間 | 268 ms |
| コンパイル使用メモリ | 96,104 KB |
| 実行使用メモリ | 127,956 KB |
| 最終ジャッジ日時 | 2026-07-15 16:53:38 |
| 合計ジャッジ時間 | 8,409 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
import sys
input = sys.stdin.readline
from collections import Counter
N,M,T=map(int,input().split())
A=list(map(int,input().split()))
C=Counter(A)
OK=10**9
NG=0
while OK>NG+1:
mid=(OK+NG)//2
rest=0
ko=0
for i in range(1,N+1):
x=C[i]
if x==mid:
pass
elif x>mid:
rest+=x-mid
else:
ko+=(mid-x)//T
if rest<=ko:
OK=mid
else:
NG=mid
print(OK)
titia