木其网络科技专业程序员代写http://www.xmsydw.com
程序员学历擅长经验网店链接
apenny硕士ASP.NET PHP 电子 通信设计 图像 编程 网络5年进入店铺
zheng_qianqian本科C语言 C++面向对象 Java3年进入店铺
guoguanl本科Java Web项目 JSP Hibernate Struts Mysql4年进入店铺
摘要: //Time 0ms, Memory 568KB#include #include #include using namespace std; const double pi=2.0*asin(1.0); int main() { double a,b,h,v; int t,i=1; cin>>t; while(t--) { cin>>a>>b>>h; if(h>b) h=b; v=pi*a*b*(h-h*h*h/(3*b*b)+2*b/3); cout<<"Case "<<i++<< 阅读全文
posted @ 2013-05-18 21:25 C语言程序 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 最大流-多源多汇问题建立超级源点,超级汇点#include #include #include #include using namespace std; const int inf=0xfffffff; queueq; int n,np,nc,m,s,t; int cap[105][105],flow[105][105],d[105],g[105][105]; int main() { int i,a,b,c,f,ss; char s1,s2,s3; while(cin>>n>>np>>nc>>m) { s=n;t=n+1; m... 阅读全文
posted @ 2013-05-18 19:48 C语言程序 阅读(175) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; struct Point { double x,y; }; struct Segment { Point p1,p2; }; double cross(const Point& o,const Point & a,const Point& b) { return (a.x - o.x)*(b.y-o.y) - (a.y - o.y)* (b.x - o.x); } ... 阅读全文
posted @ 2013-05-18 19:43 C语言程序 阅读(215) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int n,d,ans; struct point { int x,y; }p[1010]; bool operator temp) t=temp; else if(p[i].y*p[i].y+(t-p[i].x)*(t-p[i].x)>n>>d && (n||d)) {ok=1; for(i=0;i>p[i].x>>p[i].y; if(p[i].y>d) ok=0; } ... 阅读全文
posted @ 2013-05-18 19:41 C语言程序 阅读(260) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; const double PI=acos(-1.0); int n,l; typedef struct point { double x,y; point(double xx=0,double yy=0):x(xx),y(yy){} }vector; point p[1010],q[1010]; void sort1(point *a,int x,int y,point *t) { int m,u,v,i; if(y-x>1) { m=x+(y-x)/2; u=x,v=m,i=x; sort1(... 阅读全文
posted @ 2013-05-18 19:34 C语言程序 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 最短路问题#include #include using namespace std; const int inf=0xfffffff; int dis[101],vis[101],map[101][101],v[101]; int n,m; int dijkstra() { int i,j,sd,node; for(i=1;idis[j]) { sd=dis[j];node=j; } } if(node==0) break; vis[node]=1;... 阅读全文
posted @ 2013-05-18 19:25 C语言程序 阅读(117) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int MAXN=330; const double eps=1e-4; double p[MAXN][2]; double xx1,yy1,xx2,yy2; double dis(int i,int j) { return sqrt((p[i][0]-p[j][0])*(p[i][0]-p[j][0])+(p[i][1]-p[j][1])*(p[i][1]-p[j][1])); } void get_center_point(int a... 阅读全文
posted @ 2013-05-18 19:20 C语言程序 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int a[65],vis[65],n; int dfs(int len,int li,int s,int num) { int sam=-1,i; if(num==n) return 1; for(i=s;i>=0;i--) { if(vis[i] || a[i]==sam) continue; vis[i]=1; if(len+a[i]>n && n) { sum=0; for(i=0;i>a[i]; sum+=a[i]; vis[i]=0; } ... 阅读全文
posted @ 2013-05-18 19:17 C语言程序 阅读(469) 评论(0) 推荐(0) 编辑
摘要: //Time 15ms,Memory 328K#include #include using namespace std; char city[4][5]; int n,vis[16]; int dfs(int i) { int c1,c2; for(;i=0 && city[j][y]=='.';j--) vis[j*n+y]++; for(int j=x+1;j=0 && city[x][j]=='.';j--) vis[x*n+j]++; for(int j=y+1;j=0 && city[j][y]==&# 阅读全文
posted @ 2013-05-18 15:53 C语言程序 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 这题也可以用搜索来做但用匹配做更简单//Time 0ms,Memory 332K#include #include using namespace std; char city[4][5]; int n,l1,l2,vis[10],flag[10],p[4][4],q[4][4],pq[10][10]; int f(int u) { int i; for(i=0;i>n && n) { l1=0;t=0; memset(p,0,sizeof(p)); memset(q,0,sizeof(q)); memse... 阅读全文
posted @ 2013-05-18 15:49 C语言程序 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. (5)构造法.(poj3295) (6)模拟法.(poj1068,poj2632,poj1573,poj2993,poj2996)二.图算法: (1)图的深度优先遍历和广度优先遍历. (2)最短路径算法(dijkstra,bellman-ford,floyd,heap+dijkstra) (poj1860,poj3259,poj1062,poj2253,poj1125,poj2240) (3)最小生成树... 阅读全文
posted @ 2013-05-18 07:55 C语言程序 阅读(213) 评论(0) 推荐(0) 编辑
木其网络科技专业程序员代写http://www.xmsydw.com
程序员学历擅长经验网店链接
apenny硕士ASP.NET PHP 电子 通信设计 图像 编程 网络5年进入店铺
zheng_qianqian本科C语言 C++面向对象 Java3年进入店铺
guoguanl本科Java Web项目 JSP Hibernate Struts Mysql4年进入店铺