摘要: 原题链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2474题目大意:输入三个数,判断能否构成三角形,不能则输出“Invalid”,能构成且三边均相等输出“Equilateral”,恰有两边相等则输出“Isosceles”,三遍均不相等输出“Scalene”。 1 #include<stdio.h> 2 int main(){ 3 int n,t=1; 4 long int a,b,c; 5 scanf(&quo 阅读全文
posted @ 2013-02-16 08:00 sev_en 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 原题链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3087题目大意:输入三个数判断这三个数是否构成一个三角形,可以的话输出"OK”,否则输出"Wrong!!"。 1 #include<stdio.h> 2 int main(){ 3 int n,a,b,c; 4 scanf("%d",&n); 5 while(n--){ 6 scanf("%d 阅读全文
posted @ 2013-02-16 07:55 sev_en 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 原题链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2986题目大意:输入一个奇数N,后面有N个数,且这些数必定以递增或递减顺序排列,我们的任务是找出一个数f使得比f小的数的个数总等于比f大的数的个数,即求中间数。 1 #include<stdio.h> 2 int main(){ 3 int i,n,k=1,t,a[10]; 4 scanf("%d",&n); 5 while(n-- 阅读全文
posted @ 2013-02-16 07:52 sev_en 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 原题链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2113题目大意:比较大小,水题。 1 #include<stdio.h> 2 int main(){ 3 long int a,b; 4 int n; 5 scanf("%d",&n); 6 while(n--){ 7 scanf("%ld%ld",&a,&b); 8 if(a>b)prin 阅读全文
posted @ 2013-02-16 07:41 sev_en 阅读(118) 评论(0) 推荐(0) 编辑