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 ...
随机推荐
- REST POST PUT差别
rest api http://www.cnblogs.com/zhangpengshou/archive/2012/07/09/2583096.html Rest模式get,put,post,del ...
- 20秒教你如何写maven2的pom文件的依赖包
所有Maven 库 需要的包 及 pom.xml 中 groupId artifactId version 都可在这个网上收到. 例如:需要 通过 maven 在项目 中 添加 geronimo-k ...
- datatable转换为list<model> 映射
using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.R ...
- Sqlserver 连接oracle和mysql数据库 已经oracle导入sqlserver表数据
SQL Server2012创建连接服务器到ORACLE11G 8,百思考不知道原因啊??突然我发现如下:链接服务器—〉访问接口—〉OraOLEDB.Oracle—〉允许进程内没有勾上,但是我想上面的 ...
- mysql 查询优化 ~ select count 知多少
一 简介:今天咱们来聊聊mysql的查询总数 二 具体介绍 1 从引擎层面说 myisam myisam的扫描总行数是非常快的,这是因为myisam会将表的总行数存储起来,定期维护,但是注意,一旦加 ...
- 对象转换为json格式,类似中间层API
<一头扎进SpringMvc视频教程\<一头扎进SpringMvc>第四讲 源码\> 对象自动转换为json格式要在 spring-mvc.xml添加一个东西 ,和对应的命名空 ...
- python - 代码练习 - 备份目录/文件(windos环境)
备份目录/文件 import zipfile import os,datetime class beifen(object): def __init__(self,files,new_files,co ...
- JAVA锁和volatile的内存语义&volatile的使用场景
JAVA锁的内存语义 当线程释放锁时,JMM(Java Memory Model)会把该线程对应的本地内存中的共享变量刷新到主内存中. 当线程获取锁时,JMM会将该线程对应的本地内存置为无效.从而使得 ...
- PHP 简单学习(“hello world”,变量,运算符)
在PHP中: 变量用$来规范 变量名:可以用字母,数字,_来组成,且不能用数字开头(与其他变成命名规范基本一致) <?php $age = 28; // 变量名 $age = $age + ...
- 求两个排序数组中位数 C++
题目描述: 给定两个大小为 m 和 n 的有序数组 nums1 和 nums2 . 请找出这两个有序数组的中位数.要求算法的时间复杂度为 O(log (m+n)) . 你可以假设 nums1 和 nu ...