#P2383. 狗哥玩木棒
狗哥玩木棒
Description
Given some stick lengths, can Gou-ge use all the given sticks (all sticks must be used) to form a square?
Input Format
The first line of the input file is an integer indicating the number of test groups. The following lines describe each group's testdata. In each line, the first number is , followed by numbers representing the lengths of the sticks.
Output Format
For each group's testdata, output "yes" if it is possible to form a square, otherwise output "no".
3
4 1 1 1 1
5 10 20 30 40 50
8 1 7 2 6 4 4 3 5
yes
no
yes
Hint
Gou-ge is about to go crazy.
Translated by ChatGPT 5
京公网安备 11011102002149号