Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- #include<iomanip>
- #include<algorithm>
- #include<cstdlib>
- #include<cstring>
- #include<vector>
- #include<utility>
- #define ll long long
- #define nl '\n'
- #define sz(x) int(x.size())
- #define all(x) x.begin(),x.end()
- #define rall(s) s.rbegin(), s.rend()
- #define ceill(n, m) (((n) / (m)) + ((n) % (m) ? 1 : 0))
- using namespace std;
- void Fast_IO(){
- ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- void solve(){
- int n; cin>>n;
- int x_value=0,y_value=0,z_value=0;
- while(n--){
- int x,y,z; cin>>x>>y>>z;
- x_value+=x,y_value+=y,z_value+=z;
- }
- if(x_value+y_value+z_value == 0) cout<<"YES";
- else cout<<"NO";
- }
- int main(){
- Fast_IO();
- int t =1;
- //cin>>t;
- while(t--){
- solve();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment