10 2018 档案
摘要:#include //卡精度卡的蛋疼妈蛋 using namespace std; #define LL long long const int maxn=1e4+10; const int blk=256; vectormp[blk*blk]; #define eps 1e-8 #define inside(x,y) (x>=0&&x=0&&y=1;f--) { p....
阅读全文
摘要://写完和贴吧群dalao的代码比了一下 结果发现总是有更好的写法让你规避bug - -郁闷https://paste.ubuntu.com/p/8RRBw7jrHQ/#include using namespace std; #define LL long long const int maxn=2e2+10; char r[15]="123456789AJKQ"; char l[15]="...
阅读全文
摘要:http://www.cnblogs.com/DevilInChina/p/9691126.html 这个dalao 的思路 设平移球心到原点后 当前飞船坐标为 p(y_1,y_2,..,y_k) 球面上该点坐标q(a_1,a_2,...,a_k) 设 F(p) = sigma(yi-ai)^2 +
阅读全文
摘要:#include //题目要求01矩阵的//第一行除了A11只能有1个1//最后一列除了Ann只能有1个1//除了矩阵的四条边,里面的点要求该点所在行列1的个数各自相等//最后可以发现 如果说题目给了一个完全图的边权矩阵,那么01矩阵就显示了在这个图上的的一条路径//巧妙的修改spfa求最小环就oK using namespace std; #define LL long long const ...
阅读全文
摘要:#include #define LL long long using namespace std; const int maxn=1e5+10; struct nod { int x,k;int i; bool operator mp; LL f(LL y) { LL r=0; while(y) { r+=a[y%10][k]; ...
阅读全文
摘要:#include using namespace std; #define LL long long const int maxn=1e6+10; const LL mod=1e9+7; int phi[maxn], p[maxn+1]; bool check[maxn]; int phi_and_prime_table() { phi[1]=1; int sz=0; ...
阅读全文
摘要:#include using namespace std; #define LL long long const int maxn=sqrt(2e9)+10; int p[maxn]; void getprime() { for(int i=2;i getfactor(LL x) { vectorq; for(int i=1,t;i*imp[maxm]; int lin...
阅读全文
摘要:#include #include using namespace std; struct DLX { const static int maxn=750,maxm=350,maxnode=maxn*maxm; int n,m,sz,anssz; int u[maxnode],d[maxnode],l[maxnode],r[maxnode],row[maxnode]...
阅读全文
摘要:#include using namespace std; #define LL long long const int maxn=2e5+10; struct BIT //binary index tree { int t[maxn],n; int a[maxn]; #define lowbit(x) (x&(-x)) void init(int n_) ...
阅读全文
摘要:#include using namespace std; struct DLX { const static int maxn=64,maxm=64,maxnode=maxn*maxn; int n,m,sz,anssz; int u[maxnode],d[maxnode],l[maxnode],r[maxnode],row[maxnode],col[maxnode]...
阅读全文
摘要:#include using namespace std; struct DLX { const static int maxn=64,maxm=64,maxnode=maxn*maxn; int n,m,sz,anssz; int u[maxnode],d[maxnode],l[maxnode],r[maxnode],row[maxnode],col[maxnode]...
阅读全文
摘要:#include using namespace std; struct DLX { const static int maxn=64,maxm=64,maxnode=maxn*maxn; int n,m,sz,anssz; int u[maxnode],d[maxnode],l[maxnode],r[maxnode],row[maxnode],col[maxnode]...
阅读全文
摘要:#include using namespace std; const int maxn=110; const int maxm=maxn*maxn; struct DLX { const static int maxn=1001,maxm=1001,maxnode=100010; int n,m,sz,anssz; int u[maxnode],d[maxnode],...
阅读全文
摘要:#include #define LL long long using namespace std; const int maxn=1e3+10; int a[maxn][maxn]; int m4[4][4]={ 1,2,3,4, 4,3,2,1, 2,1,4,3, 3,4,1,2 }; void meow(int n) { if(n==4) ...
阅读全文
摘要:#include #include #include #include #define LL long long using namespace std; const int maxn=1e3+10; #define in(x) scanf("%lld",&x) #define inf 9223372036854775807LL LL ex_gcd(LL a,LL b,LL&x,LL &...
阅读全文
摘要:#include int a[1000010],q[1000010],L[1000010],top,n,m,Q; int main(){ scanf("%d%d%d",&n,&m,&Q); for(int i=1;i<=n;i++)scanf("%d",a+i); for(int i=1;i<=n;i++){ if(!top)q[++top]=i; ...
阅读全文

浙公网安备 33010602011771号