CodeForces 606A Magic Spheres
水题
/* ***********************************************
Author :Zhou Zhentao
Email :774388357@qq.com
Created Time :2015/12/15 12:45:27
File Name :main.cpp
************************************************ */ #include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <time.h>
using namespace std; int a,b,c;
int x,y,z;
int flagA,flagB,flagC;
int flag2; int main()
{
while(~scanf("%d%d%d",&a,&b,&c))
{
scanf("%d%d%d",&x,&y,&z); flagA=,flagB=,flagC=,flag2=; int num=; if(a>=x) flagA=flagA+a-x;
else flag2=flag2+x-a; if(b>=y) flagB=flagB+b-y;
else flag2=flag2+y-b; if(c>=z) flagC=flagC+c-z;
else flag2=flag2+z-c; num=num+flagA/;
num=num+flagB/;
num=num+flagC/; if(num>=flag2) printf("Yes\n");
else printf("No\n");
}
return ;
}
CodeForces 606A Magic Spheres的更多相关文章
- codeforce 606A - Magic Spheres
题意:a,b,c三种球,能把俩个一样的球变成另一颜色不一样的球.给你目标x,y,z,问能否经过变化至少达打目标. #include<iostream> #include<stdio. ...
- Codeforces Round #335 (Div. 2) A. Magic Spheres 水题
A. Magic Spheres Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://www.codeforces.com/contest/606/ ...
- 【CodeForces 606A】A -特别水的题1-Magic Spheres
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102271#problem/A Description Carl is a beginne ...
- Codeforces Round #335 (Div. 2) A. Magic Spheres 模拟
A. Magic Spheres Carl is a beginner magician. He has a blue, b violet and c orange magic spheres. ...
- CodeForces--606A --Magic Spheres(模拟水题)
Magic Spheres Time Limit: 2000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Submi ...
- Codeforces 710C. Magic Odd Square n阶幻方
C. Magic Odd Square time limit per test:1 second memory limit per test:256 megabytes input:standard ...
- Codeforces 670D1. Magic Powder - 1 暴力
D1. Magic Powder - 1 time limit per test: 1 second memory limit per test: 256 megabytes input: stand ...
- [递推+矩阵快速幂]Codeforces 1117D - Magic Gems
传送门:Educational Codeforces Round 60 – D 题意: 给定N,M(n <1e18,m <= 100) 一个magic gem可以分裂成M个普通的gem ...
- CodeForces 670D2 Magic Powder 二分
D2. Magic Powder - 2 The term of this problem is the same as the previous one, the only exception — ...
随机推荐
- iOS应用程序内存查看工具
我要找的是一个可以检查应用程序中哪一个数组存贮的什么内容的工具. 网上搜到的工具名称是Allocations Instrument,后来一试发现不是我想要的.这还是一个后期调试阶段的内存检查工具. h ...
- 拓扑序+dp Codeforces Round #374 (Div. 2) C
http://codeforces.com/contest/721/problem/C 题目大意:给你有向路,每条路都有一个权值t,你从1走到n,最多花费不能超过T,问在T时间内最多能访问多少城市? ...
- centos主机信任
一.实现原理 使用一种被称为"公私钥"认证的方式来进行ssh登录."公私钥"认证方式简单的解释是: 首先在客户端上创建一对公私钥(公钥文件:~/.ssh/id_ ...
- UML类图图示样例
下图来自<大话设计模式>一书:
- regress
#! /bin/ksh ############### ### UAT ### ############### export ENVS=/test/change/env/env_test.sq ...
- 【prim + kruscal 】 最小生成树模板
来源:dlut oj 1105: Zhuo’s Dream Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 40 Solved: 14[Submit][St ...
- selenium RC
http://blog.sina.com.cn/s/blog_68cb48770100v9c7.html http://www.cnblogs.com/hyddd/archive/2009/05/24 ...
- Viewpager实现图片轮播
//-------------主布局文件------------------------------------- <LinearLayout xmlns:android="http: ...
- AI 人工智能 探索 (六)
这次我为 角色 attribute 添加了 多个属性 其中 att 是 好人 坏人 等属性, 显然 数字不同 就要打起来. grade 是智商属性 ,今天先做了 3的智商.也就是小兵智商.碰到就打 逃 ...
- java abstract类和abstract方法
Example5_12.java abstract class A { abstract int add(int x,int y); int sub(int x,int y) { return x-y ...