A2019 Save the Room

简介: A2019 Save the Room

文章目录

一、A2019 Save the Room

总结


一、A2019 Save the Room

本题链接:A2019 Save the Room


题目:


Bob is a sorcerer. He lives in a cuboid room which has a length of A, a width of B and a height of C, so we represent it as A * B * C. 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 1 * 1 * 2 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 T test cases. T≤100


For each line, there are three integers A, B, C.


1≤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


本博客给出本题截图:

image.png

image.png

AC代码

#include <iostream>
using namespace std;
int main()
{
    int a, b, c;
    while(cin >> a >> b >> c)
        if (a % 2 == 0 || b % 2 == 0 || c % 2 == 0 ) puts("Yes");
        else puts("No");
    return 0;
}

总结

大胆猜测,只要三边有一条边是偶数就可以满足题意


目录
相关文章
|
域名解析 存储 网络协议
Linux中搭建主从DNS服务器
搭建主从DNS架构以提升DNS服务的高可用性、负载均衡和数据冗余。主服务器配置涉及编辑`/etc/named.conf`,设置监听IP和允许查询的范围,并定义主区域及允许的数据传输。从服务器配置需指定为奴隶类型,并指明主服务器的IP。测试表明正反向查询解析均正常。注意配置文件的语法正确性和权限设置。
441 0
|
移动开发
MATLAB用GARCH模型对股票市场收益率时间序列波动的拟合与预测
MATLAB用GARCH模型对股票市场收益率时间序列波动的拟合与预测
|
存储
练习>>代码实现将一个字符串中的小写字母变为大写
练习>>代码实现将一个字符串中的小写字母变为大写
118 0
|
算法
30.斐波那契数列
大家都知道斐波那契数列,现在要求输入一个整数n,请你输出斐波那契数列的第n项(从0开始,第0项为0)。 n<=39
113 0
30.斐波那契数列
|
缓存 Linux KVM
Linux Enterprise Server 15 SP3配置安装kvm nvidia vGPU
Linux Enterprise Server 15 SP3配置安装kvm nvidia vGPU
804 0
|
NoSQL Java 关系型数据库
|
程序员 测试技术
《代码大全》学习笔记(1):欢迎进入软件创建世界
写在前面:          它山之石,可以攻玉!        《代码大全》是编程领域里的一本经典书籍,全书介绍了基本数据类型、变量命名、子程序和函数的编写、编程工具以及调试等内容。
1098 0