摘要: 题目链接:http://acm.zzuli.edu.cn/showproblem?problem_id=1118刚看此题时也是不知道怎么想,可能是自己算法还不够精,于是便百度一下解题方法,看到之后,感觉此题并不是要求很高深得算法,一般般处理即可,于是凭感觉小心翼翼的写了一下代码,虽然不知道是不是有点罗嗦,但是感觉能够得到正确答案,于是提交,幸运的是1A了;代码如下:View Code #include <stdio.h>int ans(int a,int b)///此函数是递归处理的,在递归结束的时候就能得到所需答案{ int i,j; if(b%2==0) { ... 阅读全文
posted @ 2011-11-13 19:46 world_ding 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.zzuli.edu.cn/showproblem?problem_id=1090本题很简单,但不知道为什么,只有一个人做,大意就是求平面内2条直线的关系,a,重合,b,平行,c,相交:此题有一点注意的地方就是,要知道当斜率不存在时注意处理;代码如下:View Code #include <stdio.h>#include <math.h>int main(){ int n,x1,y1,x2,y2,x3,y3,x4,y4,i; double k1,k2,xx1,yy1; scanf("%d",&n); print 阅读全文
posted @ 2011-11-13 10:53 world_ding 阅读(381) 评论(0) 推荐(0) 编辑