ACM-ICPC 2018 焦作赛区网络预赛 I Save the Room
Bob is a sorcerer. He lives in a cuboid room which has a length of AAA, a width of BBB and a height of CCC, so we represent it as AAA * BBB * CCC. One day, he finds that his room is filled with unknown dark energy. Bob wants to neutralize all the dark energy in his room with his light magic. He can summon a 111 * 111 * 222 cuboid at a time to neutralize dark energy. But the cuboid must be totally in dark energy to take effect. Can you foresee whether Bob can save his room or not?
Input
Input has TTT test cases. T≤100T \le 100T≤100
For each line, there are three integers A,B,CA, B, CA,B,C.
1≤A,B,C≤1001 \le A, B, C \le 1001≤A,B,C≤100
Output
For each test case, if Bob can save his room, print"Yes"
, otherwise print"No"
.
样例输入
1 1 2
1 1 4
1 1 1
样例输出
Yes
Yes
No 题意:
给你一个任意的长方体,问你能否用1*1*2的长方体将所给的长方体恰好填充满 题解:
水题,给出的长方体为1*1*2,所以只要输入的长方体的长宽高中有一条边为偶数就可以,即可以整除2.另两条边就可以为任意数,因为任意的数都是1的倍数,总是能放下的。 代码:
#include <bits/stdc++.h> using namespace std; int main()
{
int n,m,k;
while(scanf("%d%d%d",&n,&m,&k)!=EOF){
if(n%==||m%==||k%==) printf("Yes\n");
else printf("No\n");
}
return ;
}
ACM-ICPC 2018 焦作赛区网络预赛 I Save the Room的更多相关文章
- ACM-ICPC 2018 焦作赛区网络预赛 I Save the Room(水题)
https://nanti.jisuanke.com/t/31718 题意 问能否用1*1*2的长方体填满a*b*c的长方体. 分析 签到.如果a.b.c都是奇数,一定不能. #include< ...
- ACM-ICPC 2018 焦作赛区网络预赛- G:Give Candies(费马小定理,快速幂)
There are N children in kindergarten. Miss Li bought them NNN candies. To make the process more inte ...
- ACM-ICPC 2018 焦作赛区网络预赛- L:Poor God Water(BM模板/矩阵快速幂)
God Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him t ...
- ACM-ICPC 2018 焦作赛区网络预赛
这场打得还是比较爽的,但是队友差一点就再过一题,还是难受啊. 每天都有新的难过 A. Magic Mirror Jessie has a magic mirror. Every morning she ...
- ACM-ICPC 2018 焦作赛区网络预赛J题 Participate in E-sports
Jessie and Justin want to participate in e-sports. E-sports contain many games, but they don't know ...
- ACM-ICPC 2018 焦作赛区网络预赛 K题 Transport Ship
There are NN different kinds of transport ships on the port. The i^{th}ith kind of ship can carry th ...
- ACM-ICPC 2018 焦作赛区网络预赛 L 题 Poor God Water
God Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him t ...
- ACM-ICPC 2018 焦作赛区网络预赛 I题 Save the Room
Bob is a sorcerer. He lives in a cuboid room which has a length of AA, a width of BB and a height of ...
- ACM-ICPC 2018 焦作赛区网络预赛 H题 String and Times(SAM)
Now you have a string consists of uppercase letters, two integers AA and BB. We call a substring won ...
随机推荐
- springboot项目怎么部署到外部tomcat
spring-boot项目中,默认提供内嵌的tomcat,所以打包直接生成jar包,用Java -jar命令就可以启动. 但是也有一定的需求,会使用外部tomcat来部署项目.下面来看: 1.新建项目 ...
- 20155324 2016-2017-2 《Java程序设计》第3周学习总结
20155324 2016-2017-2 <Java程序设计>第3周学习总结 教材学习内容总结 定义类 要产生对象必须先定义类,类是对象的设计图,对象是类的实例.类定义时使用class关键 ...
- 迅为开发板4412开发板-ANROID系统的烧写方法分享
详情了解: http://topeetboard.com 更多了解:https://arm-board.taobao.com 一.OTG接口烧写方式 通过该方式可以烧写 Android4.0.3 ...
- vue的Http请求拦截及处理
/*公共加载遮罩*/ (function($) { $.fn.jqLoading = function(option) { var defaultVal = { backgroudColor : &q ...
- Linux之vi编辑器的使用
今天我们来说一下vi编辑器的使用,vi编辑器主要用来在Linux环境下编辑配置文件. 一.使用方法: 1.输入命令 vi filename,打开文件,处于一个查看模式 2.点击键盘 i,进入inser ...
- C hashtable小例子
参考链接: http://blog.csdn.net/qinpanke/article/details/9171541
- s9.16作业,员工信息表
转载https://blog.csdn.net/qq_35883464/article/details/83151464 实现员工信息表文件存储格式如下:id,name,age,phone,job1, ...
- Linux常用命令(二)查找当前ip地址
查询当地ip地址(没错就是这么短): /sbin/ifconfig
- python(六)列表推导式、字典推导式、集合推导式
转载 https://www.cnblogs.com/tkqasn/p/5977653.html
- 【NLP CS224N笔记】Lecture 3 GloVe: Global Vectors for Word Representation
I. 复习word2vec的核心思路 1. Skip-gram 模型示意图: 2.word vectors的随机梯度 假设语料库中有这样一行句子: I love deep learning and N ...