diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-03-30 23:38:17 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-03-30 23:38:17 +0200 |
| commit | 2842e9ef52d61fb52228ef4d7bc45f5aeb954ab3 (patch) | |
| tree | 83491054ffb89ccfdb14b73e4f5103dce64f47d1 /codeforces/Sum | |
| parent | 4529466e757ee26063bcf943a22223d12ad6a792 (diff) | |
| download | competitive-programming-2842e9ef52d61fb52228ef4d7bc45f5aeb954ab3.tar.xz competitive-programming-2842e9ef52d61fb52228ef4d7bc45f5aeb954ab3.zip | |
Solved a couple of problem on codeforces
Diffstat (limited to 'codeforces/Sum')
| -rwxr-xr-x | codeforces/Sum/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/codeforces/Sum/main.cpp b/codeforces/Sum/main.cpp index f9def9b..ca01bb8 100755 --- a/codeforces/Sum/main.cpp +++ b/codeforces/Sum/main.cpp @@ -1,5 +1,5 @@ #include <algorithm> -#include<bits/stdc++.h> +#include <bits/stdc++.h> using namespace std; @@ -25,21 +25,21 @@ const int dy[4]{0, 1, 0, -1}; void solve() { vi v(3); - for (auto &x : v) cin >> x; - if (v[0] + v[1] == v[2] || v[1] + v[2] == v[0] || v[0] + v[2] == v[1]) { + for (auto &x : v) + cin >> x; + if (v[0] + v[1] == v[2] || v[1] + v[2] == v[0] || v[0] + v[2] == v[1]) { cout << "YES" << '\n'; } else { cout << "NO" << '\n'; } - } -int main () { +int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int tt; cin >> tt; - while(tt--) { + while (tt--) { solve(); } } |
