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 ;
}
C++
codeforces水题100道 第九题 Codeforces Beta Round #63 (Div. 2) Young Physicist (math)的更多相关文章
- Codeforces Beta Round #63 (Div. 2)
Codeforces Beta Round #63 (Div. 2) http://codeforces.com/contest/69 A #include<bits/stdc++.h> ...
- codeforces水题100道 第二题 Codeforces Beta Round #4 (Div. 2 Only) A. Watermelon (math)
题目链接:http://www.codeforces.com/problemset/problem/4/A题意:一个整数能否表示成两个正偶数的和.C++代码: #include <cstdio& ...
- codeforces水题100道 第一题 Codeforces Beta Round #1 A. Theatre Square (math)
题目链接:http://www.codeforces.com/problemset/problem/1/A题意:至少用多少块边长为a的方块铺满NxM的矩形区域.C++代码: #include < ...
- codeforcess水题100道
之所以在codeforces上找这100道水题的原因是为了巩固我对最近学的编程语言的掌握程度. 找的方式在codeforces上的PROBLEMSET中过的题最多的那些题里面出现的最前面的10个题型, ...
- 水题 Codeforces Beta Round #70 (Div. 2) A. Haiku
题目传送门 /* 水题:三个字符串判断每个是否有相应的元音字母,YES/NO 下午网速巨慢:( */ #include <cstdio> #include <cstring> ...
- Codeforces Beta Round #32 (Div. 2, Codeforces format)
Codeforces Beta Round #32 (Div. 2, Codeforces format) http://codeforces.com/contest/32 A #include< ...
- Codeforces Beta Round #18 (Div. 2 Only)
Codeforces Beta Round #18 (Div. 2 Only) http://codeforces.com/contest/18 A 暴力 #include<bits/stdc+ ...
- Codeforces Beta Round #22 (Div. 2 Only)
Codeforces Beta Round #22 (Div. 2 Only) http://codeforces.com/contest/22 A 水题 #include<bits/stdc+ ...
- Codeforces Beta Round #16 (Div. 2 Only)
Codeforces Beta Round #16 (Div. 2 Only) http://codeforces.com/contest/16 A 水题 #include<bits/stdc+ ...
随机推荐
- group by 小结
前提:SQL函数的两个概念 聚敛函数:对多条记录进行操作的函数,如SUM.COUNT.MIN.MAX.AVG. 其他函数:对单条记录进行操作的函数,如ABS.CEIL.SQRT等. 举个例子: SEL ...
- 【转载】linux下的mount命令详解;
以下内容来自:http://blog.csdn.net/clozxy/article/details/5299054 http://linux.chinaunix.net/techdoc/system ...
- JsonCpp 判断 value 中是否有某个KEY
JsonCpp如何判断是否有某个KEY,使用json[“key”]和isXXX的函数即可. 如果json中没有key键,则会创建一个空成员或者返回一个空成员. bool isNull() const; ...
- freetds设置超时
freetds的超时一般在其配置文件中有设置,实际上程序中也可以设置,动用两个api dbsetlogintime dbsettime 设置在dbopen之前,如下所示: 表示设置登录超时5秒,读写超 ...
- unity---------------------关于BuildAssetBundles的使用(打包)
using UnityEditor;using UnityEngine; public class BuildAssetBundle{ /// <summary> /// 点击后,所有设置 ...
- CI框架 -- 自动加载资源
CodeIgniter 的"自动加载"特性可以允许系统每次运行时自动初始化类库.辅助函数和模型. 如果你需要在整个应用程序中全局使用某些资源,为方便起见可以考虑自动加载它们. 支持 ...
- linux下nginx配置ssl证书(https)
nginx配置ssl很简单,首先需要两个文件,一个是crt文件,另一个是key文件,如下所示: xxx.crt; #(证书公钥)xxx.key; #(证书私钥) 把这两个文件放到nginx的conf ...
- js Object.prototype.toString.call()
Object.prototype.toString.call(obj)使用方法以及原理 这几天看vue-router的源码 发现了Object.prototype.toString.call()这 ...
- 无插件用Terminal/TotalTerminal的开当前finder位置
从win7开始,在资源管理器内按住shift再右键,是可以选择“在当前位置打开命令行”的,相当有用,这个命令在mac下是如何实现的呢? 前提:我讲的是TotalTerminal下的方案,原生的term ...
- [转]jmeter 自定义测试脚本
http://blog.csdn.net/kash_chen007/article/details/37690411 http://wangym.iteye.com/blog/731729 1.创建一 ...