摘要: 3008 Gold Coins(刚开始以为会超时,会有数学方法,网上搜索了一下居然都是深度搜索)分解质因数之后深度搜索如果没有1 ≤ t ≤ n 这个条件可以直接用数学方法计算View Code #include<cstring>#include<cstdio>#include<algorithm>#include<cstdlib>#define MAXN 10010using namespace std;long long ans,n,k;long long a[MAXN],b[MAXN];void DFS(long long i, long 阅读全文
posted @ 2012-03-23 16:23 蚀 阅读(306) 评论(0) 推荐(0) 编辑