CodeForces - [ACM-ICPC Jiaozuo Onsite A]Xu Xiake in Henan Province(模拟)

522 篇文章 3 订阅
93 篇文章 0 订阅

题目链接https://codeforces.com/gym/102028/problem/A
Time limit: 2.0 s Memory limit: 1024 MB

Problem Description

Shaolin Monastery, also known as the Shaolin Temple, is a Chan (“Zen”) Buddhist temple in Dengfeng County, Henan Province. Believed to have been founded in the 5-th century CE, the Shaolin Temple is the main temple of the Shaolin school of Buddhism to this day.

Longmen Grottoes, are some of the finest examples of Chinese Buddhist art. Housing tens of thousands of statues of Buddha and his disciples, they are located 12 kilometres (7.5 mi) south of present-day Luoyang in Henan province.

White Horse Temple is, according to tradition, the first Buddhist temple in China, established in 68 AD under the patronage of Emperor Ming in the Eastern Han dynasty capital Luoyang.

The Yuntai Mountain is situated in Xiuwu County, Jiaozuo, Henan Province. The Yuntai Geo Park scenic area is classified as an AAAAA scenic area by the China National Tourism Administration. Situated within Yuntai Geo Park, with a fall of 314 metres, Yuntai Waterfall is claimed as the tallest waterfall in China.

They are the most famous local attractions in Henan Province.
在这里插入图片描述
Now it’s time to estimate the level of some travellers. All travellers can be classified based on the number of scenic spots that have been visited by each of them.

  • A traveller that visited exactly 0 above-mentioned spot is a “Typically Otaku”.
  • A traveller that visited exactly 1 above-mentioned spot is a “Eye-opener”.
  • A traveller that visited exactly 2 above-mentioned spots is a “Young Traveller”.
  • A traveller that visited exactly 3 above-mentioned spots is a “Excellent Traveller”.
  • A traveller that visited all 4 above-mentioned spots is a “Contemporary Xu Xiake”.

Please identify the level of a traveller.

Input

The input contains several test cases, and the first line contains a positive integer T indicating the number of test cases which is up to 1 0 4 10^4 104.

For each test case, the only one line contains four integers A 1 A_1 A1, A 2 A_2 A2, A 3 A_3 A3 and A 4 A_4 A4, where A i A_i Ai is the number of times that the traveller has visited the -th scenic spot, and 0 ≤ A 1 , A 2 , A 3 , A 4 ≤ 100 0\le A_1,A_2,A_3,A_4\le 100 0A1,A2,A3,A4100. If A i A_i Ai is zero, it means that the traveller has never been visiting the -th spot.

Output

For each test case, output a line containing one string denoting the classification of the traveller which should be one of the strings “Typically Otaku”, “Eye-opener”, “Young Traveller”, “Excellent Traveller” and “Contemporary Xu Xiake” (without quotes).

Example

Input

5
0 0 0 0
0 0 0 1
1 1 0 0
2 1 1 0
1 2 3 4

Output

Typically Otaku
Eye-opener
Young Traveller
Excellent Traveller
Contemporary Xu Xiake

Problem solving report:

Description:t组查询,每组给出4个数,代表去过4个地方,如果4个数都是0,输出Typically Otaku,如果有3个0,输出Eye-opener,如果有2个0,输出Young Traveller,如果有1个0,输出Excellent Traveller,如果没有0,输出Contemporary Xu Xiake
Problem solving:直接模拟就行。

Accepted Code:

/* 
 * @Author: lzyws739307453 
 * @Language: C++ 
 */
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int main() {
    int t, a, ans;
    scanf("%d", &t);
    while (t--) {
        ans = 0;
        for (int i = 0; i < 4; i++) {
            scanf("%d", &a);
            if (a) ans++;
        }
        switch (ans) {
            case 0: puts("Typically Otaku"); break;
            case 1: puts("Eye-opener"); break;
            case 2: puts("Young Traveller"); break;
            case 3: puts("Excellent Traveller"); break;
            case 4: puts("Contemporary Xu Xiake"); break;
        }
    }
    return 0;
}
Python网络爬虫与推荐算法新闻推荐平台:网络爬虫:通过Python实现新浪新闻的爬取,可爬取新闻页面上的标题、文本、图片、视频链接(保留排版) 推荐算法:权重衰减+标签推荐+区域推荐+热点推荐.zip项目工程资源经过严格测试可直接运行成功且功能正常的情况才上传,可轻松复刻,拿到资料包后可轻松复现出一样的项目,本人系统开发经验充足(全领域),有任何使用问题欢迎随时与我联系,我会及时为您解惑,提供帮助。 【资源内容】:包含完整源码+工程文件+说明(如有)等。答辩评审平均分达到96分,放心下载使用!可轻松复现,设计报告也可借鉴此项目,该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的。 【提供帮助】:有任何使用问题欢迎随时与我联系,我会及时解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 下载后请首先打开README文件(如有),项目工程可直接复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ityanger

你的鼓励将是我创作的最大动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值