标题:[求助]一道ACM关于三角形的问题
取消只看楼主
dreamhunter
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2006-10-18
 问题点数:0 回复次数:3 
[求助]一道ACM关于三角形的问题

Description:
During superman’s childhood, he has been addicting to playing with sticks. After all, superman is only a child. He tries his best to form a triangle by using such sticks (None of them can be bended).

Input:
Given an integer n (3<=n<=30), which means the total number of sticks (Number 0 indicates the end of input). And n integers followed by mean the different length of such sticks(1<=len[i]<=100).
Output:
If such sticks can form a triangle (All of them should be used), please print “Yes”, or print the word “No”.

Sample Input:
3
20 30 10
4
20 30 10 10
0
Sample Output:
No
Yes


谢谢

搜索更多相关主题的帖子: ACM 三角形 
2006-10-18 23:03
dreamhunter
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2006-10-18
得分:0 
先谢了,我去试试看

2006-10-19 20:57
dreamhunter
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2006-10-18
得分:0 

2006-10-20 23:25
dreamhunter
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2006-10-18
得分:0 

是的,三楼的是对的,谢谢大家!


2006-10-21 21:27



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-97260-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.484848 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved