HBC244829社团游戏,二分,分治,枚举,前缀和Make it Equal题解 (baiqianhasnnnumbers)

冷默言语 算法基础篇 40 0
全网最全C++题库,助您快速提升编程技能!题库丰富多样,涵盖各个领域,让您在练习中不断成长!
n numbers. She can choose any of the operating parameters. k, it cannot be changed. Then BaiQian can perform an unlimited number of operations . Each operation is to select the. n numbers and make them decrease by 1. She wants to make all the numbers equal.

BaiQian has n n numbers. She can choose any of the operating parameters k (1 leq k leq n) k(1≤k≤n). After selecting the value of k k, it cannot be changed. Then BaiQian can perform an unlimited number of operations (at least once). Each operation is to select the k k numbers with different positions from the n n numbers and make them decrease by 1. She wants to make all the numbers equal. How much k k can BaiQian choose? If there are multiple possible k k, please output the largest one.

HBC244829社团游戏,二分,分治,枚举,前缀和Make it Equal题解
(baiqianhasnnnumbers)-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断学习,不断挑战,才能在编程领域中脱颖而出!全网最全C++题库,助您成为编程高手!

标签: HBC244829社团游戏 二分 分治 枚举 前缀和Make it Equal题解