摘要: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=24&problem=1268&mosmsg=Submission+received+with+ID+11407977输入一组数据,求出在排序中数据交换的次数View Code #include<stdio.h>int main(){ int a[1010],i,j,sum,n,temp; while(scanf("%d",& 阅读全文
posted @ 2013-03-09 11:25 执着追求的IT小小鸟 阅读(120) 评论(0) 推荐(0) 编辑
摘要: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=24&problem=982&mosmsg=Submission+received+with+ID+11407931vito 在一条街选间房子,使得到亲戚家的距离之和最小,求出这个和,即在数组中求出中位数,计算各个数与中位数的差之和View Code #include<stdio.h>#include<math.h>int main(){ i 阅读全文
posted @ 2013-03-09 11:08 执着追求的IT小小鸟 阅读(110) 评论(0) 推荐(0) 编辑
摘要: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=24&problem=2113&mosmsg=Submission+received+with+ID+11407808简单的比较两个数的大小,记得类型定得大一点View Code #include<stdio.h>#include<string.h>int main(){ long long a,b; int i; while(scanf(& 阅读全文
posted @ 2013-03-09 10:23 执着追求的IT小小鸟 阅读(118) 评论(0) 推荐(0) 编辑