分巧克力
蓝桥杯2017-省AB-分巧克力N, K = map(int, input().split()) c = [] for _ in range(N): H, W = map(int, input().split()) c.append((H, W)) def can_cut(mid): # 检查边长为 mid 时,能不能切出至少 K 块 total = 0
蓝桥杯2017-省AB-分巧克力N, K = map(int, input().split()) c = [] for _ in range(N): H, W = map(int, input().split()) c.append((H, W)) def can_cut(mid): # 检查边长为 mid 时,能不能切出至少 K 块 total = 0
蓝桥杯-倒水二分答案 n, k = map(int, input().split()) a = list(map(int, input().split())) def check(mid): b = a[:] # 从前往后,贪心地倒水 for i in range(n - k): if b[i] > mid: # 把多余的倒给