From 2842e9ef52d61fb52228ef4d7bc45f5aeb954ab3 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Thu, 30 Mar 2023 23:38:17 +0200 Subject: Solved a couple of problem on codeforces --- codeforces/Sum/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'codeforces/Sum/main.cpp') 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 -#include +#include 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(); } } -- cgit v1.2.3