当前位置:首页 > 题库 > 正文内容

PROGRAMMING:Tug of war

Luz9个月前 (05-10)题库91
Tug of war
[problem description]
The adventure diary of bear shows that during the summer fallow season, bareheaded Qiang turned into a tour guide and worked with Bear Bear 2,
Help the little girl Zhao Lin go deep into the forest to find the story of her childhood playmate northeast tiger.
One day, they are going to have a tug of war. Many animals in the forest want to sign up for it. After voting, they were the most popular
In the end, we selected bald head Qiang, Zhao Lin, Xiong Da, Xiong Er, Ji Ji and Mao Mao. Because different animals and people have different powers
Yes, so this tug of war may be very unfair. So they want to divide every three into groups and evaluate the strength of each player
Make a proper estimate of the value, and the power estimate is a positive integer.
Tug of war is about to start, please judge whether you can be divided into two groups according to the given strength value, 3 in each group
The total strength of each group should be equal.
###Input format:
The first line is a positive integer T, indicating that there are t groups of data to be determined. Next, for each group of data,
They are all 6 positive integers, indicating the strength of each player, and each group of data occupies one line.
###Output format:
For each group of data, if it can be divided into two teams with the same strength, output yes, otherwise output no, each
The output occupies one line.
###Input sample 1:
```in
one
1 3 2 1 2 1
```
###Output sample 1:
```out
yes
```
###Input sample 2
```in
two
1 1 1 1 1 99
1 1 1 1 1 1
```
###Output sample 2:
```out
no
yes
```







answer:If there is no answer, please comment

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。