• 沒有找到結果。

The total sum of the weights of all the suitcases is less or equal to 200 kilograms

N/A
N/A
Protected

Academic year: 2021

Share "The total sum of the weights of all the suitcases is less or equal to 200 kilograms"

Copied!
1
0
0

加載中.... (立即查看全文)

全文

(1)

10664 Luggage

Peter and his friends are on holiday, so they have decided to make a trip by car to know the north of Spain. They are seven people and they think that two cars are enough for their luggage.

It’s time to leave …and a heap of suitcases are awaiting out of the cars. The drivers disagree about which suitcase must be put into each boot, because nobody wants one boot to carry more weight than the other one. Is it possible that the two boots load with the same weight? (Obviously without unpacking the suitcases!)

Consider m sets of numbers representing suitcases weights, you must decide for each one, if it is possible to distribute the suitcases into the boots, and the two boots weigh the same.

Input

The first line of the input contains an integer, m, indicating the number of test cases.

For each test case, there is a line containing n integers (1 ≤ n ≤ 20) separated by single spaces.

These integers are the weights of each suitcase. The total sum of the weights of all the suitcases is less or equal to 200 kilograms.

Output

The output consists of m lines. The i-th line corresponds with the i-th set of suitcases weight and contains the string ‘YES’ or ‘NO’, depending on the possibility that the two boots load with the same weight for the respective test case.

Sample Input 3

1 2 1 2 1

2 3 4 1 2 5 10 50 3 50

3 5 2 7 1 7 5 2 8 9 1 25 15 8 3 1 38 45 8 1

Sample Output NO

YES YES

參考文獻

相關文件

好了既然 Z[x] 中的 ideal 不一定是 principle ideal 那麼我們就不能學 Proposition 7.2.11 的方法得到 Z[x] 中的 irreducible element 就是 prime element 了..

Wang, Solving pseudomonotone variational inequalities and pseudocon- vex optimization problems using the projection neural network, IEEE Transactions on Neural Networks 17

volume suppressed mass: (TeV) 2 /M P ∼ 10 −4 eV → mm range can be experimentally tested for any number of extra dimensions - Light U(1) gauge bosons: no derivative couplings. =>

For pedagogical purposes, let us start consideration from a simple one-dimensional (1D) system, where electrons are confined to a chain parallel to the x axis. As it is well known

Courtesy: Ned Wright’s Cosmology Page Burles, Nolette & Turner, 1999?. Total Mass Density

The observed small neutrino masses strongly suggest the presence of super heavy Majorana neutrinos N. Out-of-thermal equilibrium processes may be easily realized around the

Define instead the imaginary.. potential, magnetic field, lattice…) Dirac-BdG Hamiltonian:. with small, and matrix

incapable to extract any quantities from QCD, nor to tackle the most interesting physics, namely, the spontaneously chiral symmetry breaking and the color confinement.. 