Created
October 9, 2019 05:39
-
-
Save lazycipher/89559a817cca59d0683d5434826fc0c1 to your computer and use it in GitHub Desktop.
69A - Young Physicist Solution in C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
int main(){ | |
int n, x, y, z, xf(0), yf(0) ,zf(0); | |
std::cin>>n; | |
for(int i=0; i<n; i++){ | |
std::cin>>x>>y>>z; | |
xf+=x; | |
yf+=y; | |
zf+=z; | |
} | |
if(xf==0 && yf==0 && zf==0){ | |
std::cout<<"YES"; | |
}else{ | |
std::cout<<"NO"; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment