Sunday, July 13, 2014

Codeforces Beta Round #63 (Div. 2), problem: (A) Young Physicist solution

 Codeforces Beta Round #63 (Div. 2), problem: (A) Young Physicist: http://codeforces.com/problemset/problem/69/A

 Codeforces Beta Round #63 (Div. 2), problem: (A) Young Physicist editorial: http://codeforces.com/blog/entry/1571

 Codeforces Beta Round #63 (Div. 2), problem: (A) Young Physicist solution: http://ideone.com/SBU0ba


#include <iostream>
#include <cstdio>
using namespace std;

int main() {
    int n, x, y, z, a=0, b=0, c=0;
    scanf("%d", &n);
    while(n--) {
        scanf("%d%d%d", &x, &y, &z);
        a+=x, b+=y, c+=z;
    }
    if(a==0 && b==0 && c==0) printf("YES");
    else printf("NO");
    return 0;
}

No comments:

Post a Comment