我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Square

Given a set of sticks of various lengths, is it possible to join them end-to-end to form a square?

Input

The first line of input contains N, the number of test cases. Each test case begins with an integer 4 <= M <= 20, the number of sticks. M integers follow; each gives the length of a stick - an integer between 1 and 10,000.

Output

For each case, output a line containing "yes" if is is possible to form a square; otherwise output "no".

Sample Input

3
4 1 1 1 1
5 10 20 30 40 50
8 1 7 2 6 4 4 3 5

Sample Output

yes
no
yes

http://blog.csdn.net/xinghongduo/article/details/5876228

http://www.cnblogs.com/jackes/archive/2012/03/28/2422069.html

近期文章

  • java中的一个小问题
  • 如何根据return的内容创建类
  • 怎样知道Linux目录下文件数量的方法?
  • android Leaks内存泄漏的结果显示Linearlayout.mContext泄漏?
  • 移植opencv库到arm板上遇到的问题
  • SpringMVC如何重定向带参?
  • 小程序从下弹出层是什么控件
  • sql如何删除表中重复的数据
  • 请教solrCloud 分片问题
  • WPF WebBrowser嵌套网页,向网页传参数
  • flexgrid重载数据筛选问题
  • Classroom Scheduling
  • Deal with C++ Comments
  • 一个简单的js图片库问题
  • 如何通过snmpsharpnet获取交换机拓扑结构?
  • Packing Unit 4D Cubes
  • CreateControl创建成功后,但窗口句柄为NULL????
  • jmeter中测试webserver时提示连接超
  • Alien Security
  • 微信小程序如何一次上传多张图片

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华