摘要:
思路就是最大的数相加次数最小,每次相加后的新数要重新排序。#include#include#include#include#includeusing namespace std;int main(){ int n,a[5009],i; long long int sum,t; wh... 阅读全文
posted @ 2015-02-11 20:31
xryz
阅读(127)
评论(0)
推荐(0)
摘要:
数据比较小,所以直接将所有和算出来,然后在遍历和的数组,找出最靠近的。#include#includeusing namespace std;int f(int a,int b){ if(a>b) return a-b; return b-a;}int main(){ int n,... 阅读全文
posted @ 2015-02-11 20:07
xryz
阅读(143)
评论(0)
推荐(0)

浙公网安备 33010602011771号