-
Notifications
You must be signed in to change notification settings - Fork 0
/
886A ACM ICPC.cpp
57 lines (57 loc) · 1.16 KB
/
886A ACM ICPC.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include<bits/stdc++.h>
using namespace std;
int main()
{
int s=0,d;
vector<int>v(6);
cin>>v[0]>>v[1]>>v[2]>>v[3]>>v[4]>>v[5];
s=v[0]+v[1]+v[2]+v[3]+v[4]+v[5];
if(v[0]+v[1]+v[2]==v[3]+v[4]+v[5])
{
cout<<"YES"<<endl;
}
else if(v[0]+v[3]+v[2]==v[1]+v[4]+v[5])
{
cout<<"YES"<<endl;
}
else if(v[0]+v[3]+v[4]==v[1]+v[2]+v[5])
{
cout<<"YES"<<endl;
}
else if(v[0]+v[1]+v[2]==v[3]+v[4]+v[5])
{
cout<<"YES"<<endl;
}
else if(v[3]+v[1]+v[4]==v[0]+v[2]+v[5])
{
cout<<"YES"<<endl;
}
else if(v[3]+v[2]+v[4]==v[0]+v[1]+v[5])
{
cout<<"YES"<<endl;
}
else if(v[3]+v[1]+v[5]==v[0]+v[2]+v[4])
{
cout<<"YES"<<endl;
}
else if(v[3]+v[2]+v[5]==v[0]+v[1]+v[4])
{
cout<<"YES"<<endl;
}
else if(v[0]+v[1]+v[3]==v[2]+v[5]+v[4])
{
cout<<"YES"<<endl;
}
else if(v[0]+v[3]+v[5]==v[1]+v[2]+v[4])
{
cout<<"YES"<<endl;
}
else if(v[1]+v[2]+v[3]==v[0]+v[5]+v[4])
{
cout<<"YES"<<endl;
}
else
{
cout<<"NO"<<endl;
}
}