#includeusing namespace std;void main(){int x,y,a,b,m=1;cout>x>>y;if(x>y){a=x;b=y;}else{a=y;b=x;}do{ m=a%b;a=b;b=m;}while(m!=0);coutusing namespace .....
分类:
其他好文 时间:
2014-11-01 19:11:10
阅读次数:
189
gcd(x,y)(1 gcd(x/k,y/k)=1,k是x的质因数 的个数 Σφ(x/k) (1 2 using namespace std; 3 typedef long long ll; 4 int phi[10000001],n; 5 bool unPrime[10000001]; 6 ll ...
分类:
其他好文 时间:
2014-11-01 18:59:33
阅读次数:
164
貌似以前做到过这题。。。结果没搞出来T T现在终于会了!谁想出来的,这么巧妙>.11 #include 12 13 using namespace std;14 const int N = 100005;15 int n, ans;16 int v[N], a[N], b[N];17 18 in.....
分类:
其他好文 时间:
2014-11-01 17:45:40
阅读次数:
240
∵∑gcd(i, N)(1 gcd(x/ki,N/ki)=1 (1 2 #include 3 using namespace std; 4 typedef long long ll; 5 ll n,ans; 6 int phi(ll x) 7 { 8 ll res=x; 9 for(...
分类:
其他好文 时间:
2014-11-01 16:15:10
阅读次数:
186
题意:给定长度为n,m 2 using namespace std; 3 #define vii vector::iterator 4 #define M0(a) memset(a, 0, sizeof(a)) 5 #define repf(i, a, b) for (int i = (a); i ...
分类:
其他好文 时间:
2014-11-01 16:04:36
阅读次数:
194
HDU 2236 无题II
题目链接
思路:行列只能一个,想到二分图,然后二分区间长度,枚举下限,就能求出哪些边是能用的,然后建图跑二分图,如果最大匹配等于n就是符合的
代码:
#include
#include
#include
#include
using namespace std;
const int N = 105;
int t, n, x[N][N]...
分类:
其他好文 时间:
2014-11-01 14:53:58
阅读次数:
189
#include
#include
#include
#include
using namespace std;
typedef long long LL;
int gcd(int x,int y){
return y ? gcd(y,x%y) : x;
}
int main()
{
int n,m;
LL ans;
while(scanf("%d%d",&m,...
分类:
其他好文 时间:
2014-11-01 14:52:47
阅读次数:
188
#include#include#include using namespace std;int main(){ cout ::max)(); cout ::min)() ::max)(); cout ::min)() ::max)(); cout ::min)() ::ma...
分类:
编程语言 时间:
2014-11-01 13:15:53
阅读次数:
225
1 #include 2 #include 3 #include 4 using namespace std; 5 typedef char ElemTp; 6 typedef struct Bittree 7 { 8 ElemTp data; 9 stru...
分类:
其他好文 时间:
2014-11-01 13:15:10
阅读次数:
277
URAL 2035输入x,y,c, 找到任意一对a,b 使得a+b==c&& 0 2 #include 3 using namespace std; 4 int main(){ 5 int x,y,c; 6 while(~scanf("%d%d%d",&x,&y,&c)){ 7 ...
分类:
其他好文 时间:
2014-11-01 11:30:43
阅读次数:
229