2014年7月16日

hdu1806 RMQ

摘要: 1 #include 2 int d[100005][50]; 3 int max(int a,int b) 4 { 5 if (a>b) return(a); 6 return(b); 7 } 8 int rmq(int l,in... 阅读全文

posted @ 2014-07-16 17:46 xiao_xin 阅读(101) 评论(0) 推荐(0) 编辑

hdu1754 线段树点修改

摘要: 1 #include 2 int ql,qr,p,v,minv[1000005]; 3 int max(int x,int y) 4 { 5 if (x>y) return(x); 6 return(y); 7 } 8 int qu... 阅读全文

posted @ 2014-07-16 17:34 xiao_xin 阅读(87) 评论(0) 推荐(0) 编辑

hdu1166 树状数组

摘要: 1 #include 2 int n,c[1000005]; 3 int lowbit(int x) 4 { 5 return(x&-x); 6 } 7 void add(int x,int d) 8 { 9 while (x0)1... 阅读全文

posted @ 2014-07-16 17:30 xiao_xin 阅读(81) 评论(0) 推荐(0) 编辑

hdu1102 最小生成树

摘要: 1 #include 2 int a[10005],p[10005],q[10005],father[10005]; 3 int find(int x) 4 { 5 if (father[x]!=x) father[x]=find(father[x]); 6 return(fath... 阅读全文

posted @ 2014-07-16 16:54 xiao_xin 阅读(74) 评论(0) 推荐(0) 编辑

hdu2544 dijkstra

摘要: 1 #include 2 #define max 100000000; 3 int main() 4 { 5 int n,m,i,j,k,min,a,b,c,hash[1005],ar[1005],length[105][105]; 6 while (~scanf("%d%d",&... 阅读全文

posted @ 2014-07-16 16:51 xiao_xin 阅读(80) 评论(0) 推荐(0) 编辑

hdu1711 kmp

摘要: 1 #include 2 #include 3 int a[1000005],b[1000005],next[100005]; 4 int main() 5 { 6 int t,i,j,n,m; 7 while (~scanf("%d",&t)) 8 while (t--)... 阅读全文

posted @ 2014-07-16 16:47 xiao_xin 阅读(78) 评论(0) 推荐(0) 编辑

hdu2202 凸包+旋转卡壳

摘要: 1 #include 2 #include 3 typedef struct dian 4 { 5 int x,y; 6 }; 7 dian p[50005],ch[50005]; 8 double area(int i,int j,int k) 9 {10 double a,b,... 阅读全文

posted @ 2014-07-16 16:39 xiao_xin 阅读(128) 评论(0) 推荐(0) 编辑

hdu1849 1850 1851 nim博弈

摘要: 1 #include 2 int main() 3 { 4 int n,k,a,i; 5 while (~scanf("%d",&n)&&n!=0) 6 { 7 k=0; 8 for (i=1;i 2 int main() 3 { 4 ... 阅读全文

posted @ 2014-07-16 16:32 xiao_xin 阅读(89) 评论(0) 推荐(0) 编辑

hdu1527 威佐夫博弈

摘要: 1 #include 2 #include 3 int main() 4 { 5 int t,n,m,x; 6 while (~scanf("%d%d",&n,&m)) 7 { 8 if (n>m) {t=m; m=n; n=t; } 9 t... 阅读全文

posted @ 2014-07-16 16:30 xiao_xin 阅读(111) 评论(0) 推荐(0) 编辑

hdu1348 凸包

摘要: 1 #include 2 #include 3 int x[100005],y[100005],ch[100005]; 4 void sort(int l,int r) 5 { 6 int i,j,xx,yy,x1; 7 i=l; j=r; 8 xx=x[(i+j)/2];... 阅读全文

posted @ 2014-07-16 16:28 xiao_xin 阅读(76) 评论(0) 推荐(0) 编辑

导航