摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1087代码如下:#include"stdio.h"#include"string.h"int a[1005],sum[1005];int main( ){ int n,i,j,max; while(scanf("%d",&n)&&n!=0) { max=0; memset(sum,0,sizeof(sum)); for(i=1;i<=n;i++) { scanf("%d",&a[i]); fo 阅读全文
posted @ 2012-07-06 21:45 朝圣の路 阅读(137) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2108代码如下:#include"stdio.h"int flag1,flag2,x[1005],y[1005];void judge(int x1,int y1,int x2,int y2){ if(x1*y2-x2*y1>0) flag1=1; else if(x1*y2-x2*y1<0) flag2=1;}int main( ){ int n,a,b,i; while(scanf("%d",&n)&&n!=0) { flag1= 阅读全文
posted @ 2012-07-06 15:14 朝圣の路 阅读(170) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1785代码如下:#include"stdio.h"#include"math.h"#include"stdlib.h"struct nod{ double x,y; double num;}a[105]; int cmp(const void *a,const void *b){ nod *aa=(nod*)a,*bb=(nod*)b; return aa->num>bb->num?1:-1;}int main( ){ int n, 阅读全文
posted @ 2012-07-06 13:15 朝圣の路 阅读(211) 评论(0) 推荐(0) 编辑