做法 1:二分天数,判断是否够吃,时间复杂度 O(logn)O(\log n)O(logn)。
做法 2:从待处理天数中不断取出 mmm 天加入答案,并令待处理天数增加 111。时间复杂度 O(logmn)O(\log_m n)O(logmn)。
By signing up a CZOJ universal account, you can submit code and join discussions in all online judging services provided by us.
Using your CZOJ universal account