結果
| 問題 | No.3297 Bake Cookies |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2025-10-14 03:38:02 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 212 ms / 2,000 ms |
| + 628µs | |
| コード長 | 461 bytes |
| 記録 | |
| コンパイル時間 | 874 ms |
| コンパイル使用メモリ | 64,104 KB |
| 実行使用メモリ | 90,264 KB |
| 最終ジャッジ日時 | 2026-11-21 07:05:46 |
| 合計ジャッジ時間 | 7,979 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
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