From 6b548332bfc6469756526002971c422f43f86d0a Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Mon, 24 Jul 2023 13:11:33 +0300 Subject: Removed some empty *.cpp files and Solved some new problems --- codeforces/YoungPhysicist/YoungPhysicist.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'codeforces/YoungPhysicist') diff --git a/codeforces/YoungPhysicist/YoungPhysicist.cpp b/codeforces/YoungPhysicist/YoungPhysicist.cpp index b126bd1..dc5056b 100755 --- a/codeforces/YoungPhysicist/YoungPhysicist.cpp +++ b/codeforces/YoungPhysicist/YoungPhysicist.cpp @@ -1,22 +1,21 @@ -#include +#include using namespace std; int main() { int n; cin >> n; vector> v(n); - for(int i = 0; i < n; i++) { - for(int j = 0; j < 3; j++) { + for (int i = 0; i < n; i++) { + for (int j = 0; j < 3; j++) { int x; cin >> x; v[i].push_back(x); } } int x = 0, y = 0, z = 0; - for(int i = 0; i < n; i++) { - x+=v[i][0]; - y+=v[i][1]; - z+=v[i][2]; + for (int i = 0; i < n; i++) { + x += v[i][0]; + y += v[i][1]; + z += v[i][2]; } cout << ((x == 0 && y == 0 && z == 0) ? "YES" : "NO") << endl; - } -- cgit v1.2.3