andre_joy

导航

2012年7月8日

hdu 2151

摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2151题意:中文……mark:递推。dp[i][j]代表第i时刻在第k棵树的方法数。dp[i][j] = dp[i-1][j-1] + dp[i-1][j+1]。代码:#include <stdio.h>#include <string.h>int dp[110][110];int main(){ int n,p,m,t; int i,j; while(~scanf("%d%d%d%d", &n, &p, &m, &t)) { 阅读全文

posted @ 2012-07-08 23:46 andre_joy 阅读(121) 评论(0) 推荐(0) 编辑

hdu 2108

摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2108题意:给定一个多边形的每一个顶点坐标,判断它是否为凸多边形。mark:判断每两个向量的转向。wa了2次,tle了1次。把文件输入输出部分一起交了……代码:#include <stdio.h>int main(){ int n,x1,x2,x3,y1,y2,y3,f,x0,y0,x4,y4; while(scanf("%d", &n), n) { if(n < 3) { while(n--) scanf... 阅读全文

posted @ 2012-07-08 18:26 andre_joy 阅读(139) 评论(0) 推荐(0) 编辑