https://codeforces.com/contest/1118/problem/D1 能做完的天数最大不超过n,因为假如每天一杯咖啡,每杯咖啡容量大于1 首先对容量进行从大到小的排序, sort(num.rbegin(),num.rend());sort(num.begin(),num.end(),greater<int>());都可以 然后遍历每一天,当第i天的时候,选出i个容量最大的分配到每一天,如果还没写完,继续选择i个最大的,但是由题意容量需要进行衰减,衰减的量为j/i(也就是…