摘要: 题目链接:http://codeforces.com/problemset/problem/402/A题目意思:几经辛苦,终于体明题目噶意思了 = =,完全是考验一个人是否清醒的最简便方法- -! 给出4个数,分别为k,a,b和v。k:1个box最大可以分成的section;a:需要放置的nut的个数;b:divisor的数量 v:每个section的容量。有两个约束条件:(1)每个box的section数不能超过k个; (2)放置的nut的数量不能超过v个(即不能超过section的最大容量)。注意:x个divisor可以得到x + 1个section,每个section的容量为v个。 .. 阅读全文
posted @ 2014-03-18 15:24 windysai 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/problemset/problem/402/B题目意思:给出n个数和公差k,问如何调整使得ai + 1 - ai = k。(1 ≤ i = 1!! 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int maxn = 1000 + 10; 7 int a[maxn], rea[maxn][2]; // a:原始输入序列 rea:保存需要调整的数的调整大小 8 char ch[maxn]; 9 10 int main() 11... 阅读全文
posted @ 2014-03-18 14:49 windysai 阅读(261) 评论(0) 推荐(0) 编辑