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 ...
随机推荐
- 【python小练】0012题
第 0012 题: 敏感词文本文件 filtered_words.txt,里面的内容 和 0011题一样,当用户输入敏感词语,则用 星号 * 替换,例如当用户输入「北京是个好城市」,则变成「**是个好 ...
- 第20月第17天 mvvm 多次点击push -ObjC
1. 响应式库EasyReact建成后,为了能使其得到更好的利用,更好地降低使用的理解和学习成本,臧成威老师又带领团队开发了基于响应式的MVVM框架:EasyMVVM. https://www.jia ...
- 5.28 js基础 简介
Web前端有三层: HTML:从语义的角度,描述页面结构 CSS:从审美的角度,描述样式(美化页面) JavaScript:从交互的角度,描述行为(提升用户体验) JavaScript历史背景介绍 布 ...
- 通过dbutil操作数据库
dbutil操作数据库工具类 步骤 导入jar包 c3p0-0.9.1.2.jar commons-dbutils-1.6.jar mysql-connector-ja ...
- mysql 架构 ~ MHA 总揽
一 简介:MHA相关二 版本 mha0.56 mha0.57 mha0.58三 切换流程 0 主库已不可达 阶段一 1 从集群选出新主,根据新主同步的binlog信息进行拷贝binl ...
- div与 css--绝对定位和相对定位
<10-页面美化专题-div和css基础.avi> Border-topPadding-topMargin-topFloat Position #clear{Both:clear;}//浮 ...
- Redis 集群环境的搭建
下载与解压 [root@localhost ~]# cd /usr/temp/ [root@localhost temp]# wget http://download.redis.io/release ...
- Django学习手册 - csrf
CSRF csrf原理 无csrf时存在隐患 Form提交 Ajax提交 默认为全局都csrf Form表单提交方式: <div> <form action="/login ...
- JVM内存分配及GC流程
-verbose 这是查询GC问题最常用的命令之一,具体参数如: -verbose:class 输出jvm载入类的相关信息,当jvm报告说找不到类或者类冲突时可此进行诊断. -verbose:gc 输 ...
- ubuntu14.04配置face_recognition环境
Github项目地址:https://github.com/MiChongGET/face_collection 环境搭建 1. 环境 ubuntu14.04 LTS python2.7 pip ...