水题
三个方向向量分别相加得零即可
#include<iostream>
using namespace std;
const int maxn = 1e6+10;
int a[maxn];
int main(void)
{
int t;
cin >> t;
int cnt = 0;
int x = 0,y = 0,z = 0;
while(t--)
{
int a,b,c;
cin >> a >> b >> c;
x += a;
y += b;
z += c;
}
if(x == y && y == z && x == 0)
{
cout << "YES" << endl;
}
else
{
cout << "NO" << endl;
}
}