E. Simple学长的礼物

    传统题 1000ms 128MiB

Simple学长的礼物

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Description

The Christmas Eve is coming,so simple has bought n apples for his two friends. Now he wants to divide all the apples between the friends. Each apple weights 100 grams or 200 grams.Of course Simple doesn't want to make any of his friend unhappy. Therefore the total weight of the apples given to his friends must be equal. But unfortunately Simple doesn't have a knife,so he cannot split any apple into some parts. Please, tell him: is it possible to divide all the apples in a fair way between his friends?

Input Format

The first T indicates there are T groups of date.

The first line of every group contains an integer n (1 <= n <= 100) — the number of apples. The second line contains n integers w1, w2, ..., wn (wi = 100or wi = 200), where wi is the weight of the i-th apple.

Output Format

In a single line print "YES" (without the quotes) if it is possible to divide all the apples between his friends. Otherwise print "NO" (without the quotes).
2
3
100 200 100
4
100 100 100 200
YES
NO

Source

2016周赛 八

2016级河南工大新生周赛总决赛

未参加
状态
已结束
规则
XCPC
题目
7
开始于
2016-12-21 3:40
结束于
2016-12-21 6:10
持续时间
2.5 小时
主持人
参赛人数
206