自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 poj2400===km

#include #include #include #include const int maxn=21,inf=10000010; int n,lx[maxn],ly[maxn],w[maxn][maxn],d[maxn],t,ans,num,h[maxn]; bool px[maxn],py[maxn]; bool dfs1(int x){ int i; px[x]=true; for

2016-02-16 14:01:38 7076

原创 km算法------poj3686

此题为一个建模很好的题,有点坑~~~~~~ 注: 1.不加return 0;会超时 2.输出一定要%.6f\n #include #include #include #include const int maxn=2501,maxm=51,inf=-10000010; int w[maxm][maxn],lx[maxm],ly[maxn],d[maxn],slack[maxn]; in

2016-02-15 19:03:27 7646

原创 usaco Your Ride Is Here

#include #include char a[10],b[10]; int main(){ int i,j,k,n=1,m=1,l1,l2; freopen("ride.in","r",stdin); freopen("ride.out","w",stdout); scanf("%s%*c%s",&a,&b); l1=strlen(a); l2=strlen(b); for(i=

2016-02-13 19:39:57 7656

原创 usaco transform

#include #include char c[10][10],d[10][10],a[10][10],b[10][10]; int n; bool pd(){ int i,j; bool b=true; for(i=0;i<n;i++) for(j=0;j<n;j++) if(a[i][j]!=d[i][j]) b=false; return b;

2016-02-13 19:38:34 7356

原创 usaco sprime

#include #include #include #include int i,j,k,n,m; int prime[10010],p[10010],num,d[10010]; bool pd(int x){ m=d[(int)sqrt(x)]; for(j=1;j<=m;j++) if(x%prime[j]==0) return false; return true;

2016-02-13 19:37:25 7620

原创 usaco rect1

#include #include #include #include #include using namespace std; const int dmax=2001,maxn=10001; int a[1501][1501]; int x[maxn],ux[maxn],y[maxn],uy[maxn]; struct node{ int x,y,x1,y1; int color; };

2016-02-13 19:36:25 7988

原创 usaco pprime

#include #include #include #include int prime1[110],prime2[1010],prime3[10010],p[10010],u,v,num1,num2,num3; bool pd1(int x){ for(u=1;u<=num1;u++) if(x%prime1[u]==0) return false; return tru

2016-02-13 19:35:22 7978

原创 usaco palsquare

#include #include int c[30],b; bool pd(int n){ int i; for(i=1;i<=n;i++) if(c[i]!=c[n-i+1]) return false; return true; } void jz(int n){ int ch[30],i=1,j,m=n; while(m>0){ ch[i]=m%b;

2016-02-13 19:34:43 8111

原创 usaco numtri

#include #include #include #include int a[1010][1010],n,d[1010][1010]; int max(int x,int y){ if(x>y) return x; return y; } int main(){ int i,j,k,m; freopen("numtri.in","r",stdin); freopen("numtri

2016-02-13 19:33:44 9346

原创 usaco milk3

#include #include #include #include int a,b,c,ans[500],n; short may[30][30][30]; int find(int a1,int b1,int c1){ if(may[a1][b1][c1]) return 0; if(a1+b1+c1!= c) return 1; if(a1==0){ ans[++n] =

2016-02-13 19:32:28 9060

原创 usaco milk

#include #include int p[5010],a[5010],sum=0; int main(){ int n,m; freopen("milk.in","r",stdin); freopen("milk.out","w",stdout); scanf("%d%d",&n,&m); int i,j,k; for(i=1;i<=m;i++) scanf("%d%d",

2016-02-13 19:31:42 9838

原创 usaco Friday the Thirteenth

#include #include int m[12]={31,28,31,30,31,30,31,31,30,31,30,31}; int d[7]; main(){ freopen("friday.in","r",stdin); freopen("friday.out","w",stdout); int i,j,l=6,n; scanf("%d",&n); n+=1900; for

2016-02-13 19:30:24 9735

原创 usaco calfflac

#include #include char a[20010],b[20010]; int n=0,c[20010],m=0,num1,num2,max=0; bool hw(int x,int y){ int i,j; for(i=x;i<=y;i++) if(b[i]!=b[y-i+x]) return false; return true; } int main(){

2016-02-13 19:26:05 7370

原创 usaco ariprog

#include #include #include #include bool p[125000+10],flag; int n,max,i1; bool pd(int x,int y){ for(i1=0;i1<n;i1++) if(!p[x+i1*y] || x+i1*y>max) return false; return true; } int main(){ int i,j,

2016-02-13 19:24:50 6386

转载 vim精通

转自:http://blog.csdn.net/niushuai666/article/details/7275406# vim的学习曲线相当的大(参看各种文本编辑器的学习曲线),所以,如果你一开始看到的是一大堆VIM的命令分类,你一定会对这个编辑器失去兴趣的。下面的文章翻译自《Learn Vim Progressively》,我觉得这是给新手最好的VIM的升级教程了,没有列举所有的命令

2016-02-13 17:32:11 6614

原创 石子合并

#include #include int n,f[101][101],sum[101][101],a[101]; int main() { int i,j,k,t; scanf("%d",&n); for(i=1;i<=n;i++) scanf("%d",&a[i]); for(i=1;i<=n;i++){ f[i][i]=0; sum[i][i]=a[i];

2016-02-13 17:31:08 6337

原创 匈牙利算法

#include #include int a[101][101],d[101],m,n,p[101]; int dfs(int x){ int i,j,k; for(i=1;i<=n;i++) if(a[x][i] && !p[i]){ p[i]=1; if(!d[i] || dfs(d[i])){

2016-02-13 17:23:49 6471

原创 km入门-----hdu2255

奔小康赚大钱 问题描述 传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。 这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子。 另一方面,村长和另外的村领导希望得到最大的效益,这样村里的机构才会有钱.由于老百姓

2016-02-13 17:08:24 7413

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除