木其网络科技专业程序员代写http://www.xmsydw.com
程序员学历擅长经验网店链接
apenny硕士ASP.NET PHP 电子 通信设计 图像 编程 网络5年进入店铺
zheng_qianqian本科C语言 C++面向对象 Java3年进入店铺
guoguanl本科Java Web项目 JSP Hibernate Struts Mysql4年进入店铺
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 55 下一页
摘要: //Time 906ms, Memory 384K#include #include int vis[110][110],dx[4]={0,1,0,-1},dy[4]={1,0,-1,0},n,m,t,min,num,road[6000],rd[6000]; char map[110][110]; void f(int x,int y) { int i,nx,ny,p; if(x==n-1 && y==m-1) { for(i=0;i=vis[n-1][m-1]) || num>6000) return; num++; for(i=0;i... 阅读全文
posted @ 2013-06-12 08:36 C语言程序 阅读(155) 评论(0) 推荐(0) 编辑
摘要: #include #include int a[100000][2],vis[100000],i,count; int f(int p,int k) { int j,t; for(j=k+1;j-ki) t=j-i-1; else t=j; if(p==a[t][0] && !vis[a[t][1]]) { vis[a[t][1]]=1;count++; if(f(a[t][1],t)==0) return 0; } else if(p==a[t][... 阅读全文
posted @ 2013-06-12 08:23 C语言程序 阅读(173) 评论(0) 推荐(0) 编辑
摘要: //Time 531ms,Memory 1228K#include #include int map[50][50][50],t,t1,vis[50][50][50],dx[6]={0,0,0,0,1,-1},dy[6]={0,1,0,-1,0,0},dz[6]={1,0,-1,0,0,0},a,b,c; void f(int x,int y,int z) { int i,nx,ny,nz;t1++; for(i=0;ia-1 || nyb-1 || nzc-1 || map[nx][ny][nz]==1) continue; if(vis[nx][ny][nz... 阅读全文
posted @ 2013-06-12 08:17 C语言程序 阅读(173) 评论(0) 推荐(0) 编辑
摘要: #include #include int main() { int i,j,k,n,a[18][301]; memset(a,0,sizeof(a)); for(i=0;i<301;i++) a[1][i]=1; for(i=2;i<18;i++) { for(j=0;j<301;j++) for(k=0;j+i*i*k<301;k++) a[i][j+i*i*k]+=a[i-1][j]; } while(scanf("%d",&n)==1 && n... 阅读全文
posted @ 2013-06-12 00:29 C语言程序 阅读(196) 评论(0) 推荐(0) 编辑
摘要: #include int fa[10001],di[10001],n,m; int find(int v) { if(fa[v]!=1 && fa[v]!=v) fa[v]=find(fa[v]); return fa[v]; } int find1(int v) { if(di[v]!=1 && di[v]!=v) di[v]=find1(di[v]); return di[v]; } void Unio(int x,int y) { if(x>1) fa[x]=find(y); if(y>1) di[y]=fi... 阅读全文
posted @ 2013-06-12 00:27 C语言程序 阅读(171) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; typedef struct point { double x,y; point(double x=0.0,double y=0.0):x(x),y(y){} }vector; point p[1000010],c; vector operator - (point a,point b) {return vector(a.x-b.x,a.y-b.y);} point operator + (point a,point b) {return point(a.x+b.x,a.y+b.y);} point ... 阅读全文
posted @ 2013-06-11 18:20 C语言程序 阅读(198) 评论(0) 推荐(0) 编辑
摘要: #include __int64 gcd(__int64 a,__int64 b) { return b==0?a:gcd(b,a%b); } int main() { int i,j,prime[]={2,3,5,7,11,13,17,19},n,t; __int64 s1,s2,m,d,gd; while(scanf("%d",&n)==1) { s2=1;s1=0;t=0; if(n==21 || n==22) { for(i=2;id) { ... 阅读全文
posted @ 2013-06-11 18:15 C语言程序 阅读(214) 评论(0) 推荐(0) 编辑
摘要: // Time 1062 ms, Memory 4252K#include #include int map[1010][1010],vis[1010],a[1010],b[1010],k; int f1(int u) { int v; for(v=0;v<k;v++) { if(map[u][v] && !vis[v]) { vis[v]=1; if(!b[v] || f1(b[v])) { a[u]=v;b[v]=u;return ... 阅读全文
posted @ 2013-06-11 16:32 C语言程序 阅读(191) 评论(0) 推荐(0) 编辑
摘要: // Time 0ms, Memory 356K#include #include #include using namespace std; int n,m,p[9][9],sx,sy,dx[]={0,1,0,-1},dy[]={1,0,-1,0}; struct point { int x,y,time,step; point(int x=0,int y=0,int time=0,int step=0):x(x),y(y),time(time),step(step){} }; int bfs() { point s(sx,sy,6,0),t; queueq;... 阅读全文
posted @ 2013-06-11 16:27 C语言程序 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 转载请注明出处,谢谢http://blog.csdn.net/ACM_cxlove?viewmode=contents by---cxlove做了几个非常基础的数位DP,很水。弱爆了,接下来要进行进阶训练了HDU 2089 不要62http://acm.hdu.edu.cn/showproblem.php?pid=2089不能出现4,或者相邻的62,这题可以暴力打表解决具体的在代码里都有解释#include #include #include #include #include #include #define N 55 #define inf 14) //高位可... 阅读全文
posted @ 2013-06-11 09:30 C语言程序 阅读(293) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 55 下一页
木其网络科技专业程序员代写http://www.xmsydw.com
程序员学历擅长经验网店链接
apenny硕士ASP.NET PHP 电子 通信设计 图像 编程 网络5年进入店铺
zheng_qianqian本科C语言 C++面向对象 Java3年进入店铺
guoguanl本科Java Web项目 JSP Hibernate Struts Mysql4年进入店铺