题号:NC219802
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld
题目描述
Codeforces is a website that hosts competitive programming contests. It is maintained by a group of competitive programmers from ITMO University. Since 2013, Codeforces claims to surpass Topcoder in terms of active contestants. As of 2018, it has over 600,000 registered users. Codeforces along with other similar websites are used by top sport programmers and by other programmers interested in furthering their career. Codeforces is recommended by many universities. According to Daniel Sleator, professor of Computer Science at Carnegie Mellon University, competitive programming is valuable in computer science education, because competitors learn to adapt classic algorithms to new problems, thereby improving their understanding of algorithmic concepts.
In codeforces contestants are divided into ranks based on their ratings:
≥3000 | Legendary Grandmaster |
2400 - 2999 | Grandmaster |
2100 - 2399 | Master |
1900 - 2099 | Candidate Master |
1600 - 1899 | Expert |
1400 - 1599 | Specialist |
1200 - 1399 | Pupil |
0 - 1199 | Newbie |
After a contest, the rating of the contestant will change. In this problem, you are given a contestant's rating before and after the contest. You need to answer whether the title has changed. If it has changed, please output the original and changed title.
输入描述:
The first line contains an integer
— the number of test cases, each test case contains two integers
and
representing contestant's rating before and after the contest.
输出描述:
If the title has changed, please output in the form of “
to
”, otherwise output “No”.
示例1
输入
复制
3
1145 1419
1981 0
3000 4000
输出
复制
Newbie to Specialist
Candidate Master to Newbie
No