void solve(){
int n;
cin >> n;
int sx = 0, sy = 0, sz = 0;
for (int i = 1; i <= n; i ++) {cin >> q[i].x >> q[i].y >> q[i].z;
sx += q[i].x;
sy += q[i].y;
sz += q[i].z;
}
if (sx == sy && sy == sz && sx == 0) cout << "YES";//不是sx+sy+sz=0
else cout << "NO";
}
Young Physicist
于 2023-08-15 15:52:36 首次发布