题目链接: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 ;
}

C++

codeforces水题100道 第九题 Codeforces Beta Round #63 (Div. 2) Young Physicist (math)的更多相关文章

  1. Codeforces Beta Round #63 (Div. 2)

    Codeforces Beta Round #63 (Div. 2) http://codeforces.com/contest/69 A #include<bits/stdc++.h> ...

  2. codeforces水题100道 第二题 Codeforces Beta Round #4 (Div. 2 Only) A. Watermelon (math)

    题目链接:http://www.codeforces.com/problemset/problem/4/A题意:一个整数能否表示成两个正偶数的和.C++代码: #include <cstdio& ...

  3. codeforces水题100道 第一题 Codeforces Beta Round #1 A. Theatre Square (math)

    题目链接:http://www.codeforces.com/problemset/problem/1/A题意:至少用多少块边长为a的方块铺满NxM的矩形区域.C++代码: #include < ...

  4. codeforcess水题100道

    之所以在codeforces上找这100道水题的原因是为了巩固我对最近学的编程语言的掌握程度. 找的方式在codeforces上的PROBLEMSET中过的题最多的那些题里面出现的最前面的10个题型, ...

  5. 水题 Codeforces Beta Round #70 (Div. 2) A. Haiku

    题目传送门 /* 水题:三个字符串判断每个是否有相应的元音字母,YES/NO 下午网速巨慢:( */ #include <cstdio> #include <cstring> ...

  6. Codeforces Beta Round #32 (Div. 2, Codeforces format)

    Codeforces Beta Round #32 (Div. 2, Codeforces format) http://codeforces.com/contest/32 A #include< ...

  7. Codeforces Beta Round #18 (Div. 2 Only)

    Codeforces Beta Round #18 (Div. 2 Only) http://codeforces.com/contest/18 A 暴力 #include<bits/stdc+ ...

  8. Codeforces Beta Round #22 (Div. 2 Only)

    Codeforces Beta Round #22 (Div. 2 Only) http://codeforces.com/contest/22 A 水题 #include<bits/stdc+ ...

  9. Codeforces Beta Round #16 (Div. 2 Only)

    Codeforces Beta Round #16 (Div. 2 Only) http://codeforces.com/contest/16 A 水题 #include<bits/stdc+ ...

随机推荐

  1. Google File System 学习

    摘要 Google的人设计并实现了Google File System,一个可升级的分布式文件系统,用于大的分布式数据应用.可以运行在廉价的日用硬件上,具备容错性,且为大量客户端提供了高聚合的性能. ...

  2. 转:ios Sqlite数据库增删改查基本操作

    研究了几天的数据库,终于把它给搞出来了.Sqlite是ios上最常用的数据库之一,大家还是有必要了解一下的.这是仿照网上的一个例子做的,有些部分写的不好,我稍作了修改,以讲解为主,主要让大家能够明白如 ...

  3. MVC2 ,MVC3 ,MVC4,MVC5的区别,EF的各个版本的区别;LocalDB是个啥

    2010年發行ASP.NET MVC 2.0版,2011年發行ASP.NET MVC 3.0版,2012年發行ASP.NET MVC 4.0版 MVC3 需要.net framework 4.0 版本 ...

  4. [mysql-Ver5.6.23] windows版my.ini配置

    基于utf8mb4比utf8多了种编码,能更好的支持emoji表情(http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.htm ...

  5. iOS: Sorted Array with Compare

    Question(提问): What I want to do seems pretty simple, but I can't find any answers on the web. I have ...

  6. 设置更改root密码 连接mysql mysql常用命令

  7. CodeFirst时使用T4模板

    我们都知道T4模板用于生成相似代码. 在DBFirst和ModelFirst条件下我们很容易从.edmx下获取所有实体类和其名称,并且通过我们定义的模板和某些遍历工作为我们生成所需要的相似代码. 但是 ...

  8. 你可能不知道UED和UCD

    我们都知道UI是User Interface,即它的本意是用户界面,从字面上看是用户和界面组成,实际上还包括用户与界面之间的交互关系.UI最初对大家来说只是一个名词,它代表一些界面.当然重点还是是UI ...

  9. vue如何正确销毁当前组件的scroll事件?

    将方法写出来,销毁在beforeDestroy写. mounted(){ window.addEventListener("scroll",this.handleFun), }, ...

  10. 理解Node.js异步非阻塞I/O与传统线性阻塞IO的区别(转)

    阻塞I/O 程序执行过程中必然要进行很多I/O操作,读写文件.输入输出.请求响应等等.I/O操作时最费时的,至少相对于代码来说,在传统的编程模式中,举个例子,你要读一个文件,整个线程都暂停下来,等待文 ...