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 ...
随机推荐
- 群发技术-使用python3给微信好友群发消息
本文介绍如何给个人微信好友群发消息. 微信个人号中的群发助手可以一次给30个发送消息,如果要给所有所有群发,则需要自己手动发送多次,或者借助程序实现了.本文即是程序实现教程 一.原理 在微信的官方网站 ...
- TypeScript 快速学习
https://learnxinyminutes.com/docs/zh-cn/typescript-cn/ https://www.tslang.cn/docs/handbook/basic-typ ...
- [C++]环状序列(CircularSequence,ACM/ICPC Seoul 2004,UVa1584)
Question 例题3-5 环状序列(CircularSequence,ACM/ICPC Seoul 2004,UVa1584) 长度为n的环状串有n种表示方法,分别为从某个位置开始顺时针得到,在这 ...
- ArrayList的底层实现
package zy809; public class myArrayList { /** 存放元素 */ private Object[] data;// 创建一个数组引用. /** 元素的个数 * ...
- c语言 弹弹球小游戏
#include <stdio.h>#include <stdlib.h>#include <windows.h>#include <time.h>#i ...
- 【JS】获取一个月份有多少天
new Date(year, month, 0).getDate() 通过 Date 构造函数传入年份.月份.零,然后通过调用获取日期函数即可获取当前月份有多少天 new Date(2019, 2, ...
- mui的switch开关的应用
HTML: <!--mui的switch开关--> <div class="mui-content-padded"> <h5>switch开关m ...
- python中读取mongodb数据并保存为csv格式的文件
import pandas as pd import matplotlib.pyplot as plt import pymongo %matplotlib inline # 连接mongodb数据库 ...
- 现代C++简单介绍
C++ 是世界上最常用的编程语言之一.编写良好的 C++ 程序是快速.高效的. 该语言比其他语言更加灵活,因为你可以使用它来创建各种应用,包括有趣刺激的游戏.高性能科学软件.设备驱动程序.嵌入式程序和 ...
- Python API简单验证
前言 因为CMDB内部的需求,需要一个API进行数据传输,用来传递需要抓取的服务端信息信息给抓取的autoclient,autoclient抓取好之后再通过API传输到服务器,保存到数据库.但是为了防 ...