02 2015 档案
摘要:最简单的并查集。。。 代码: #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int pre[1200]; int mark[1300]; int find(int x){ return pr
阅读全文
摘要:规律题,如果多写出几组数据就可以找出规律了。。。。 代码: #include<stdio.h> #include<string.h> __int64 num[1200000]; int main(){ __int64 n; int i,j,k,t; memset(num,0,sizeof(num))
阅读全文
摘要:我想到的根本都不是背包问题,看来是我想得太简单了。。。 代码,借鉴别人的 #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; struct node{ int p,h,c,value; }s[30
阅读全文