链接:http://codeforces.com/contest/1072/ A - Golden Plate - [计算题] #include<bits/stdc++.h> using namespace std; inline )*;} int w,h,k; int ans; int main() { cin>>w>>h>>k; ,h-=,k--) ans+=calc(w,h); cout<<ans<<endl; } B - Cu…
http://codeforces.com/contest/1072/problem/C C. Cram Time time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In a galaxy far, far away Lesha the student has just got to know that he has an exa…
CF-1072-C. Cram Time http://codeforces.com/contest/1072/problem/C 题意: 第一天有 a 小时,第二天有 b 小时.第 k 个任务需要 k 个小时来完成.任务不能隔天做(即第一天开始,第二天结束).问这两天分别可以最多完成多少任务,并输出. 分析: 既然总共有a+b个小时,那么每个任务所需时间越少,任务数越多.即我们要找到一个最大的k有\(k*(k+1)/2 \le (a+b)\) 即前k个任务的所需时间和小于等于a+b 找到k之后…
Adieu l'ami. Koyomi is helping Oshino, an acquaintance of his, to take care of an open space around the abandoned Eikou Cram School building, Oshino's makeshift residence. The space is represented by a rectangular grid of n × m cells, arranged into n…