摘要: 题目:http://acm.timus.ru/problem.aspx?space=1&num=1091题意:从 s 个数里挑出 k 个, 这个 k 个数的共因子大于 1 一共有多少种方法直接暴搜,注意剪枝优化View Code 1 typedef long long ll; 2 const int N = 60; 3 int ans,k,s; 4 bool vis[N]; 5 int flag; 6 int gcd(int a,int b) 7 { 8 if(!b) return a; 9 else return gcd(b,a % b);10 }11 bool juge(... 阅读全文
posted @ 2012-09-28 07:45 AC_Girl 阅读(243) 评论(0) 推荐(0) 编辑