第一次遇到20s的题,果断暴力,贡献多个TLE, 水题也不是完全水的,必须要适当的优化一下,学习了。View Code #include<stdio.h>#include<string.h>#include<algorithm>using namespace std;#define lld __int64lld gcd(lld a, lld b) //最大公约数 { return a ? gcd(b%a, a) : b; }int n, k;int a[802];bool vis[802];int main(){ int i, j; while( ~scan Read More
posted @ 2012-08-25 22:45 To be an ACMan Views(254) Comments(0) Diggs(0)