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+ ...
随机推荐
- 如何配置propagation
配置spring事务代理时的事务属性. <prop key=“get*”>PROPAGATION_REQUIRED,readOnly</prop> 表示类方法名称是以get开头 ...
- mysql小题趣事
题一 答案: case when +条件 +then 显示什么 +else+显示另外什么+end
- python numpy logic_and
>>> import numpy as np >>> np.logical_and(True, False) False >>> np.logic ...
- 使用Maven清理项目
在基于Maven的项目中,很多缓存输出在“target”文件夹中.如果想建立项目部署,必须确保清理所有缓存的输出,从面能够随时获得最新的部署. 要清理项目缓存的输出,发出以下命令: mvn clean ...
- e832. 从JTabbedPane中移动卡片
To move a tab, it must first be removed and then reinserted into the tabbed pane as a new tab. Unfor ...
- 从SQL查询分析器中读取EXCEL中的内容
很早以前就用sql查询分析器来操作过EXCEL文件了. 由于对于excel公式并不是很了解,所以很多时候处理excel中的内容,常常是用sql语句来处理的.[什么样的人有什么样的办法吧 :)] 今又要 ...
- C# 通过调用Win32 API函数清除浏览器缓存和cookie
public enum ShowCommands : int { SW_HIDE = , SW_SHOWNOrmAL = , SW_NOrmAL = , SW_SHOWMINIMIZED = , SW ...
- 关于SpringMVC的文件上传
关于文件的上传,之前写过2篇文章,基于Struts2框架,下面给出文章链接: <关于Struts2的文件上传>:http://www.cnblogs.com/lichenwei/p/392 ...
- phpstorm 初体验
最近在学php,今天想要读一下公司刚外包网站的源代码,要安装一个php的集成环境,因最开始用过JetBrains的pycharm觉得很好用,这会儿还选用该家产品PHPStorm(为啥storm这个词, ...
- 在jstl表达式中嵌入el表达式
一.问题 在jsp中,想要这么写: <c:url value='/resources/themes/${easyuiThemeName}/easyui.css'/> 但报错:Accordi ...