The Preliminary Contest for ICPC Asia Xuzhou 2019 徐州网络赛 C Buy Watermelon
The hot summer came so quickly that Xiaoming and Xiaohong decided to buy a big and sweet watermelon. But they are two very strange people. They are even-numbered enthusiasts. They want to cut the watermelon in two parts, and each part weighs two times as much as a kilogram .They quickly decide which melon to buy. Do you know if you want to buy this melon?
Input
Only one line contains one integer ww (1\leq w\leq 100)(1≤w≤100),units are kilograms.
Output
If it can meet the requirements, you will output YES, otherwise output NO.
样例输入复制
8
样例输出复制
YES
这个题判断能不能把这个数分成两个偶数,然后一开始以为是对半分,WA了一发,后来发现不是,那么任意分的话除了2的所有的偶数都可以。
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
#define N 100010
using namespace std;
int main()
{ int w;
cin>>w;
if(w==2||w%2)cout<<"NO"<<endl;
else cout<<"YES"<<endl;
}
The Preliminary Contest for ICPC Asia Xuzhou 2019 徐州网络赛 C Buy Watermelon的更多相关文章
- The Preliminary Contest for ICPC Asia Xuzhou 2019 徐州网络赛 K题 center
		You are given a point set with nn points on the 2D-plane, your task is to find the smallest number o ... 
- The Preliminary Contest for ICPC Asia Xuzhou 2019 徐州网络赛 XKC's basketball team
		XKC , the captain of the basketball team , is directing a train of nn team members. He makes all mem ... 
- The Preliminary Contest for ICPC Asia Xuzhou 2019 徐州网络赛 D Carneginon
		Carneginon was a chic bard. But when he was young, he was frivolous and had joined many gangs. Recen ... 
- The Preliminary Contest for ICPC Asia Xuzhou 2019 徐州网络赛 B so  easy
		题目链接:https://nanti.jisuanke.com/t/41384 这题暴力能过,我用的是并查集的思想,这个题的数据是为暴力设置的,所以暴力挺快的,但是当他转移的点多了之后,我觉得还是我这 ... 
- The Preliminary Contest for ICPC Asia Xuzhou 2019 徐州网络赛 A Who is better?
		A After Asgard was destroyed, tanker brought his soldiers to earth, and at the same time took on the ... 
- 计蒜客 41391.query-二维偏序+树状数组(预处理出来满足情况的gcd) (The Preliminary Contest for ICPC Asia Xuzhou 2019 I.) 2019年徐州网络赛)
		query Given a permutation pp of length nn, you are asked to answer mm queries, each query can be rep ... 
- The Preliminary Contest for ICPC Asia Xuzhou 2019 E XKC's basketball team [单调栈上二分]
		也许更好的阅读体验 \(\mathcal{Description}\) 给n个数,与一个数m,求\(a_i\)右边最后一个至少比\(a_i\)大\(m\)的数与这个数之间有多少个数 \(2\leq n ... 
- The Preliminary Contest for ICPC Asia Xuzhou 2019
		A:Who is better? 题目链接:https://nanti.jisuanke.com/t/41383 题意: 类似于有N个石子,先手第一次不能拿完,每次后手只能拿 1 到 前一次拿的数量* ... 
- The Preliminary Contest for ICPC Asia Xuzhou 2019  E. XKC's basketball team
		题目链接:https://nanti.jisuanke.com/t/41387 思路:我们需要从后往前维护一个递增的序列. 因为:我们要的是wi + m <= wj,j要取最大,即离i最远的那个 ... 
随机推荐
- 挑战全网最幽默的Vuex系列教程:第二讲 Vuex旗下的State和Getter
			先说两句 上一讲 「Vuex 到底是个什么鬼」,已经完美诠释了 Vuex 的牛逼技能之所在(纯属自嗨).如果把 Vuex 比喻成农药里面的刘备,那就相当于你现在已经知道了刘备他是一个会打枪的力量型英雄 ... 
- 上班无聊,自己用python做个小游戏来打发时间
			前言 文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理. PS:如有需要Python学习资料的小伙伴可以加点击下方链接自行获取t.cn ... 
- 多线程高并发编程(5) -- CountDownLatch、CyclicBarrier源码分析
			一.CountDownLatch 1.概念 public CountDownLatch(int count) {//初始化 if (count < 0) throw new IllegalArg ... 
- 2.react-插件
			PC: antd(蚂蚁金服)https://ant.design/index-cn 移动: mobile-antd(蚂蚁金服)https://mobile.ant.design =========== ... 
- SpringMVC数据传递及乱码问题
			基础环境搭建请参考SringMVC入门程序 一.SpringMVC数据处理 1:resful 路径传值 http://localhost/get/1/2 /* http://localhost/get ... 
- linq详细案例
			LINQ to SQL语句(1)之Where 适用场景:实现过滤,查询等功能. 说明:与SQL命令中的Where作用相似,都是起到范围限定也就是过滤作用的,而判断条件就是它后面所接的子句.Where操 ... 
- Linux-LAMP虚拟主机配置
			1.配置用户认证 <Directory /data/discuz/passwd> AllowOverride AuthConfig AuthName "自定义的" Au ... 
- shell脚本:备份数据库、代码上线
			备份MySQL数据库场景:一台MySQL服务器,跑着5个数据库,在没有做主从的情况下,需要对这5个库进行备份 需求:1)每天备份一次,需要备份所有的库2)把备份数据存放到/data/backup/下3 ... 
- python模块一键安装
			利用bat文件 在不懂电脑的小白电脑上一键安装你python环境所需要的模块(你想让她一个个安装,你会疯的) 先新建一个txt文件,把你需要安装的模块和版本号写进去: 然后再新建一个txt文件 然后把 ... 
- Spring Boot中只能有一个WebMvcConfigurationSupport配置类
			首先将结论写文章的最前面,一个项目中只能有一个继承WebMvcConfigurationSupport的@Configuration类(使用@EnableMvc效果相同),如果存在多个这样的类,只有一 ... 
