• codeforces水题100道 第九题 Codeforces Beta Round #63 (Div. 2) Young Physicist (math)


    题目链接:http://www.codeforces.com/problemset/problem/69/A
    题意:给你n个三维空间矢量,求这n个矢量的矢量和是否为零。
    C++代码:

    #include <cstdio>
    #include <iostream>
    using namespace std;
    int x, y, z;
    int main()
    {
        int n, tx, ty, tz;
        cin >> n;
        while (n--)
        {
            cin >> tx >> ty >> tz;
            x += tx, y += ty, z += tz;
        }
        puts(!x && !y && !z ? "YES" : "NO");
        return 0;
    }
    C++
  • 相关阅读:
    浅谈Semaphore类
    Python浅谈requests三方库
    191104
    191103
    191102
    191101
    191031
    191030
    191029
    191028
  • 原文地址:https://www.cnblogs.com/moonlightpoet/p/5688959.html
Copyright © 2020-2023  润新知