UVa 11479 - Is this the easiest problem?
来源:互联网 发布:海豚加速器for mac 编辑:程序博客网 时间:2024/06/07 07:12
题目:给出三角形三边判断所属集合。
分析:简单题。直接判断即可。
注意:数据可能有负数、使用long long类型。
#include <iostream>#include <cstdlib>#include <cstdio>using namespace std;int main(){int t;long long a,b,c;while ( cin >> t )for ( int i = 1 ; i <= t ; ++ i ) {cin >> a >> b >> c;printf("Case %d: ",i);if ( a > 0 && a == b && b == c )printf("Equilateral\n");else if ( a > 0 && b > 0 && c > 0 ) { if ( a == b && a+b > c || b == c && b+c > a || a == c && a+c > b )printf("Isosceles\n");else if ( a+b <= c || a+c <= b || b+c <= a )printf("Invalid\n");else printf("Scalene\n");}else printf("Invalid\n");} return 0;}
- UVa 11479 - Is this the easiest problem?
- UVa 11207 - The easiest way
- This is the first problem
- HUNNU11354:Is the Name of This Problem
- Is the Name of This Problem
- UVa Problem 10209 Is This Integration? (需要积分吗?)
- 1157. The hardest problem == the easiest problem……
- Problem 013——UVa 10474 - Where is the Marble?
- Node.js Setup:This may indicate a problem with this package. The error code is 2503.
- this is the request
- Fix the problem:xxx is not in the sudoers file.This incident will be reported
- The Problem is Fixed...
- UVA The Blocks Problem
- The Counting Problem UVA
- This is the first problem for test. Since all we know the ASCII code, your job is simple: Input numb
- uva 10209 Is This Integration?
- [uva] 10209 - Is This Integration ?
- UVA 10209 - Is This Integration
- IDE和SATA双硬盘安装全攻略
- 从开源时代进入到逆向时代
- 搜索神器
- sizeof(即类型大小)详解-转自http://veryti.com/question/443
- 变量在内存中的位置
- UVa 11479 - Is this the easiest problem?
- Android中Activity启动模式详解
- 大话数据结构八:队列的顺序存储结构(循环队列)
- Python 读写图片
- 深入探索 boost::lambda 系列 (一)
- 企业技术/数据架构想法---逻辑图模型
- Android实现网络多线程断点续传下载
- Linux进程间通信之管道(pipe)、命名管道(FIFO)与信号(Signal)
- 互联网系统架构的演进