题意:
题目链接:http://codeforces.com/contest/606/problem/A
思路:
一道思维题,统计出每种颜色的变化量,如果减少的量总和/2大于等于增加的量总和,就可以完成转化
代码:
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, x, y, z;
scanf("%d%d%d%d%d%d", &a, &b, &c, &x, &y, &z);
int sum = 0;
if (a - x >= 0) sum += (a - x) / 2;
else sum += a - x;
if (b - y >= 0) sum += (b - y) / 2;
else sum += b - y;
if (c - z >= 0) sum += (c - z) / 2;
else sum += c - z;
if (sum >= 0) puts("Yes");
else puts("No");
return 0;
}