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

題目鏈接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 10410^4.

For each test case, the only one line contains four integers A1A_1, A2A_2, A3A_3 and A4A_4, where AiA_i is the number of times that the traveller has visited the -th scenic spot, and 0A1,A2,A3,A41000\le A_1,A_2,A_3,A_4\le 100. If AiA_i 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;
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章