ACM-ICPC 2018 焦作赛区网络预赛 L. Poor God Water(水)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yz467796454/article/details/82716303

题目链接:https://nanti.jisuanke.com/t/31718

样例输入 
1 1 2
1 1 4
1 1 1
样例输出 
Yes
Yes
No

题意:a*b*c的立方体,问能不能用1*1*2的立方体不重叠的放满

思路:胆子放大,猜完就交,abc三遍任意一边能被2整除,就可以做到不重叠放满

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<queue>
#define maxn 300005
using namespace std;

int main(){
	int a,b,c;
	while(~scanf("%d%d%d",&a,&b,&c)){
		if(c%2==0)printf("Yes\n");
		else if(a%2==0)printf("Yes\n");
		else if(b%2==0)printf("Yes\n");
		else printf("No\n");
	}
	return 0;
}

猜你喜欢

转载自blog.csdn.net/yz467796454/article/details/82716303