1. 程式人生 > >ACM-ICPC 2018 焦作賽區網路預賽 I. Save the Room(水)

ACM-ICPC 2018 焦作賽區網路預賽 I. Save the Room(水)

樣例輸入 
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;
}