FZOJ--2221-- RunningMan(水题)
Accept: 4 Submit: 10
Time Limit: 1000 mSec Memory Limit : 32768 KB
Problem Description
ZB loves watching RunningMan! There's a game in RunningMan called 100 vs 100.
There are two teams, each of many people. There are 3 rounds of fighting, in each round the two teams send some people to fight. In each round, whichever team sends more people wins, and if the two teams send the same amount of people, RunningMan team wins.
Each person can be sent out to only one round. The team wins 2 rounds win the whole game. Note, the arrangement of the fighter in three rounds must be decided before the whole game starts.
We know that there are N people on the RunningMan team, and that there are M people on the opposite team. Now zb wants to know whether there exists an arrangement of people for the RunningMan team so that they can always win, no matter how the opposite team
arrange their people.
Input
The first line contains an integer T, meaning the number of the cases. 1 <= T <= 50.
For each test case, there's one line consists of two integers N and M. (1 <= N, M <= 10^9).
Output
For each test case, Output "Yes" if there exists an arrangement of people so that the RunningMan team can always win. "No" if there isn't such an arrangement. (Without the quotation marks.)
Sample Input
Sample Output
Hint
In the second example, the RunningMan team can arrange 60, 60, 80 people for the three rounds. No matter how the opposite team arrange their 100 people, they cannot win.
Source
第六届福建省大学生程序设计竞赛-重现赛(感谢承办方华侨大学)
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
int main()
{
int t;
int n,m;
scanf("%d",&t);
while(t--)
{
scanf("%d%d",&n,&m);
if((n+1)*1.0>=(m*3/2))
printf("Yes\n");
else
printf("No\n");
}
return 0;
}
FZOJ--2221-- RunningMan(水题)的更多相关文章
- HDOJ 2317. Nasty Hacks 模拟水题
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Tota ...
- ACM :漫漫上学路 -DP -水题
CSU 1772 漫漫上学路 Time Limit: 1000MS Memory Limit: 131072KB 64bit IO Format: %lld & %llu Submit ...
- ytu 1050:写一个函数,使给定的一个二维数组(3×3)转置,即行列互换(水题)
1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 154 Solved: 112[ ...
- [poj2247] Humble Numbers (DP水题)
DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The se ...
- gdutcode 1195: 相信我这是水题 GDUT中有个风云人物pigofzhou,是冰点奇迹队的主代码手,
1195: 相信我这是水题 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 821 Solved: 219 Description GDUT中有个风云人 ...
- BZOJ 1303 CQOI2009 中位数图 水题
1303: [CQOI2009]中位数图 Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 2340 Solved: 1464[Submit][Statu ...
- 第十一届“蓝狐网络杯”湖南省大学生计算机程序设计竞赛 B - 大还是小? 字符串水题
B - 大还是小? Time Limit:5000MS Memory Limit:65535KB 64bit IO Format: Description 输入两个实数,判断第一个数大 ...
- ACM水题
ACM小白...非常费劲儿的学习中,我觉得目前我能做出来的都可以划分在水题的范围中...不断做,不断总结,随时更新 POJ: 1004 Financial Management 求平均值 杭电OJ: ...
- CF451C Predict Outcome of the Game 水题
Codeforces Round #258 (Div. 2) Predict Outcome of the Game C. Predict Outcome of the Game time limit ...
- CF451B Sort the Array 水题
Codeforces Round #258 (Div. 2) Sort the Array B. Sort the Array time limit per test 1 second memory ...
随机推荐
- PatentTips - Safe general purpose virtual machine computing system
BACKGROUND OF THE INVENTION The present invention relates to virtual machine implementations, and in ...
- 【转】工具系列:IntelliJ IDEA (Mac) 运行速度优化
转自工具系列:IntelliJ IDEA (Mac) 运行速度优化 感谢该作者解决了我使用idea debug很慢的问题 背景 IDEA 下运行程序,经常假死 5 s,作为 Mac 怎么能允许暂停 5 ...
- maven 构建web项目
Maven规定,必须创建以下几个Source Folder src/main/resources src/main/Java src/test/resources src/test/java 添加以上 ...
- LeetCode104_MaximumDepthofBinaryTree Java题解
题目: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the ...
- Tokyo Tyrant(TTServer)系列(二)-启动參数和配置
启动參数介绍 ttserver命令能够启动一个数据库实例.由于数据库已经实现了Tokyo Cabinet的抽象API,所以能够在启动的时候指定数据库的配置类型. 支持的数据库类型有: ...
- [Hyperapp] Interact with the State Object through Hyperapp Action functions
Hyperapp is an ultra lightweight (1kb), minimal, functional, JavaScript library for building UIs. It ...
- 外网主机如何将数据包发送到共用一个公网IP的局域网某特定主机上的
内网的一台电脑要上因特网对外开放服务或接收数据.都须要port映射.port映射分为动态和静态. 动态port映射:内网中的一台电脑要訪问站点.会向NAT网关发送数据包.包头中包含对方站点IP.por ...
- Codeforces Round #311 (Div. 2)题解
A. Ilya and Diplomas time limit per test 1 second memory limit per test 256 megabytes input standard ...
- python解压,压缩,以及存数据库的相关操作
zipfile实现压缩整个目录和子目录 import os,shutil,zipfile,glob def dfs_get_zip_file(input_path,result): # files = ...
- JAVA配置Tomcat
1.下载tomcat,我jdk是1.8的,网上查了一下,说要安装tomcat8及以上的tomcat 尝试点击,弹出, 2.配置环境 3.安装通过cmd安装 4.点击开启服务 5.输入localhost ...