摘要: #include #define PB push_back #define MP make_pair using namespace std; typedef long long LL; typedef pair PII; #define PI acos((double)-1) #define E exp(double(1)) #define K 100000+9 int a[K],vis[K... 阅读全文
posted @ 2016-07-24 11:27 weeping 阅读(396) 评论(0) 推荐(0) 编辑
摘要: LL gcd(LL a,LL b){ if(b==0) return a; else return gcd(b,a%b); } LL ex_gcd(LL a,LL b,LL &x,LL &y){ if(b==0){ x=1;y=0; return a; } LL r=ex_gcd(b,a%b,x,y); LL t=... 阅读全文
posted @ 2016-07-24 09:24 weeping 阅读(251) 评论(0) 推荐(0) 编辑