Codeforces Round #357 (Div. 2) A. A Good Contest 水题
A. A Good Contest
题目连接:
http://www.codeforces.com/contest/681/problem/A
Description
Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance.
Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it.
Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same?
Input
The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest .
The next n lines describe participants results: i-th} of them consists of a participant handle namei and two integers beforei and afteri ( - 4000 ≤ beforei, afteri ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters.
It is guaranteed that all handles are distinct.
Output
Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise.
Sample Input
3
Burunduk1 2526 2537
BudAlNik 2084 2214
subscriber 2833 2749
Sample Output
YES
Hint
题意
有n个人,给你这个人的名字,这个人比赛前的分数,比赛后的分数
如果存在一个人之前的分数>=2400,且还涨分了
那就输出yes
题解:
按照题意模拟一下就好了
代码
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
scanf("%d",&n);
string s1;
int a,b;
int flag = 0;
for(int i=0;i<n;i++)
{
cin>>s1>>a>>b;
if(a>=2400&&b>a)
flag = 1;
}
if(flag==1)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
Codeforces Round #357 (Div. 2) A. A Good Contest 水题的更多相关文章
- Codeforces Round #307 (Div. 2) A. GukiZ and Contest 水题
A. GukiZ and Contest Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/551/ ...
- Codeforces Round #297 (Div. 2)A. Vitaliy and Pie 水题
Codeforces Round #297 (Div. 2)A. Vitaliy and Pie Time Limit: 2 Sec Memory Limit: 256 MBSubmit: xxx ...
- Codeforces Round #290 (Div. 2) A. Fox And Snake 水题
A. Fox And Snake 题目连接: http://codeforces.com/contest/510/problem/A Description Fox Ciel starts to le ...
- Codeforces Round #322 (Div. 2) A. Vasya the Hipster 水题
A. Vasya the Hipster Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/581/p ...
- Codeforces Round #373 (Div. 2) B. Anatoly and Cockroaches 水题
B. Anatoly and Cockroaches 题目连接: http://codeforces.com/contest/719/problem/B Description Anatoly liv ...
- Codeforces Round #368 (Div. 2) A. Brain's Photos 水题
A. Brain's Photos 题目连接: http://www.codeforces.com/contest/707/problem/A Description Small, but very ...
- Codeforces Round #359 (Div. 2) A. Free Ice Cream 水题
A. Free Ice Cream 题目连接: http://www.codeforces.com/contest/686/problem/A Description After their adve ...
- Codeforces Round #355 (Div. 2) A. Vanya and Fence 水题
A. Vanya and Fence 题目连接: http://www.codeforces.com/contest/677/problem/A Description Vanya and his f ...
- Codeforces Round #384 (Div. 2) A. Vladik and flights 水题
A. Vladik and flights 题目链接 http://codeforces.com/contest/743/problem/A 题面 Vladik is a competitive pr ...
随机推荐
- 浅谈mysql配置优化和sql语句优化【转】
做优化,我在这里引用淘宝系统分析师蒋江伟的一句话:只有勇于承担,才能让人有勇气,有承担自己的错误的勇气.有承担错误的勇气,就有去做事得勇气.无论做什么事,只要是对的,就要去做,勇敢去做.出了错误,承担 ...
- 使用pandas把mysql的数据导入MongoDB。
使用pandas把mysql的数据导入MongoDB. 首先说下我的需求,我需要把mysql的70万条数据导入到mongodb并去重, 同时在第二列加入一个url字段,字段的值和第三列的值一样,代码如 ...
- 使用Scrapy命令行工具【导出JSON文件】时编码设置
Windows 10家庭中文版,Python 3.6.4,virtualenv 16.0.0,Scrapy 1.5.0, 使用scrapy命令行工具建立了爬虫项目(startproject),并使用s ...
- No.15 selenium for python JavaScript
JS处理滚动条 一.上下滚动 1.滚动条回到顶部: js="var q=document.documentElement.scrollTop=10000" driver.execu ...
- 耗时任务DefaultEventExecutorGroup 定时任务
一. 耗时任务 static final EventExecutorGroup group = new DefaultEventExecutorGroup(16); // Tell the pipel ...
- thinkphp模型创建
- Redux-DevTools 安装
以下以Chrome为准. 首先,从Chrome Web Store(需要***支持)下载chrome 插件 Redux DevTools. 使用方式有两种: 一种只需在代码createStore中添加 ...
- OA项目Ioc DI(二)
依赖注入:属性和构造函数的注入 一个简单的Demo: IUserInfoDal接口: public interface IUserInfoDal { void Show(); string Name ...
- oracle数据库11g(11.2.0.1)安装报错:提示ins_ctx.mk编译错误。
https://blog.csdn.net/weixin_42967330/article/details/81668404
- #JS Ajax的error函数
使用jquery的ajax方法向服务器发送请求的时候,常常需要使用到error函数进行错误信息的处理, 一般error函数返回的参数有三个: function(jqXHR jqXHR, String ...