結果
| 問題 | No.3297 Bake Cookies |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2025-10-14 03:38:02 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 215 ms / 2,000 ms |
| + 528µs | |
| コード長 | 461 bytes |
| 記録 | |
| コンパイル時間 | 93 ms |
| コンパイル使用メモリ | 64,384 KB |
| 実行使用メモリ | 90,668 KB |
| 最終ジャッジ日時 | 2026-10-17 02:28:36 |
| 合計ジャッジ時間 | 8,524 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
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