Codeforces 335A.Magic Spheres
来源:互联网 发布:英文随机名字生成算法 编辑:程序博客网 时间:2024/05/03 12:27
(这种题居然要写解题报告我也是醉了,说好了要做点高难度的呢?!)
这题当时半夜没想明白,第二天在栗神的帮助理解下琢磨出来了。
一句话,作差大于0除以2小于零就不管最后求和看看是不是大于0就好了。。。
#include <cstdio>#include <iostream>#include <algorithm>using namespace std;int main(){ int a, b, c, x, y, z; while(~scanf("%d%d%d%d%d%d", &a, &b, &c, &x, &y, &z)){ int r = a - x; int s = b - y; int t = c - z; if(r > 0) r = r / 2; if(s > 0) s = s / 2; if(t > 0) t = t / 2; int sum = r + s + t; if(sum >= 0) printf("Yes\n"); else printf("No\n"); } return 0;}
0 0
- Codeforces 335A.Magic Spheres
- Codeforces Round #335 606A - Magic Spheres
- CodeForces 606A. Magic Spheres
- 【CodeForces】[606A]Magic Spheres
- Codeforces 606A Magic Spheres
- 【CodeForces 606A】Magic Spheres
- Codeforces Round #335 (Div. 2) A. Magic Spheres 水题
- Codeforces Round #335 (Div. 2) A.Magic Spheres
- Codeforces Round #335 (Div. 2) A. Magic Spheres
- CodeForces 606A-A. Magic Spheres【模拟】
- Codeforces 606A Magic Spheres 【水题】
- 【CodeForces】606A - Magic Spheres(水)
- CodeForces 606 A. Magic Spheres(水~)
- CodeForces 606A Magic Spheres【水题】
- A. Magic Spheres
- 606A Magic Spheres
- CodeForces--606A --Magic Spheres(模拟水题)
- 【Codeforces Round 335 (Div 2) A】【水题】Magic Spheres 三种类型物品兑换比例2:1.cpp
- POJ 3278.Catch That Cow
- 根据数据动态显示列及数据的SQL语句
- Android短信发送流程之多收件人发送(原)
- 05Redis入门指南笔记(持久化)
- 【Leetcode】3Sum 【wrong】
- Codeforces 335A.Magic Spheres
- du-查看文件夹大小-并按大小进行排序
- 创业狗们为什么要向《芈月传》里的张仪看齐?
- UI中的自适应高度
- C++ 模板详解(一)
- BMP格式详解
- oracle将数据导出----UTL_FILE.FOPEN的用法
- 弹幕
- linux 后台启动