A10402 | A Good Contest
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
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?
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?
输入格式
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: the $i$ -th of them consists of a participant handle $name_{i}$ and two integers $before_{i}$ and $after_{i}$ ( $-4000<=before_{i},after_{i}<=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.
The next $n$ lines describe participants results: the $i$ -th of them consists of a participant handle $name_{i}$ and two integers $before_{i}$ and $after_{i}$ ( $-4000<=before_{i},after_{i}<=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.
输出格式
Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise.
输入输出样例
输入 #1
3 Burunduk1 2526 2537 BudAlNik 2084 2214 subscriber 2833 2749
输出 #1
YES
输入 #2
3 Applejack 2400 2400 Fluttershy 2390 2431 Pinkie_Pie -2500 -2450
输出 #2
NO
In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest.
In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie\_Pie's handles were not colored red before the contest.
In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie\_Pie's handles were not colored red before the contest.
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted