#A. Greg's Workout

    远端评测题 2000ms 256MiB

Greg's Workout

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Greg's Workout

题面翻译

Greg 是一个健身者。现在有三种运动:chest\text{chest}biceps\text{biceps}back\text{back}

Greg 会以

$$\text{chest} \to \text{biceps} \to \text{back} \to \text{chest} \to \text{biceps} \to \text{back} \to \ldots $$

的规律(三个一组)做 nn 天运动,每天会做相应的运动 aia_i 次。问他做得最多的运动。

输入

第一行一个整数 nn

接下来一行包含 nn 个整数,用空格隔开,分别为 a0,a1,,an1a_0, a_1, \ldots, a_{n-1}aia_i 表示第 ii 天做了 aia_i 次运动。

输出

输出做得最多的运动。

题目描述

Greg is a beginner bodybuilder. Today the gym coach gave him the training plan. All it had was n n integers a1,a2,...,an a_{1},a_{2},...,a_{n} . These numbers mean that Greg needs to do exactly n n exercises today. Besides, Greg should repeat the i i -th in order exercise ai a_{i} times.

Greg now only does three types of exercises: "chest" exercises, "biceps" exercises and "back" exercises. Besides, his training is cyclic, that is, the first exercise he does is a "chest" one, the second one is "biceps", the third one is "back", the fourth one is "chest", the fifth one is "biceps", and so on to the n n -th exercise.

Now Greg wonders, which muscle will get the most exercise during his training. We know that the exercise Greg repeats the maximum number of times, trains the corresponding muscle the most. Help Greg, determine which muscle will get the most training.

输入格式

The first line contains integer n n (1<=n<=20) (1<=n<=20) . The second line contains n n integers a1,a2,...,an a_{1},a_{2},...,a_{n} (1<=ai<=25) (1<=a_{i}<=25) — the number of times Greg repeats the exercises.

输出格式

Print word "chest" (without the quotes), if the chest gets the most exercise, "biceps" (without the quotes), if the biceps gets the most exercise and print "back" (without the quotes) if the back gets the most exercise.

It is guaranteed that the input is such that the answer to the problem is unambiguous.

样例 #1

样例输入 #1

2
2 8

样例输出 #1

biceps

样例 #2

样例输入 #2

3
5 1 10

样例输出 #2

back

样例 #3

样例输入 #3

7
3 3 2 7 9 6 8

样例输出 #3

chest

提示

In the first sample Greg does 2 chest, 8 biceps and zero back exercises, so the biceps gets the most exercises.

In the second sample Greg does 5 chest, 1 biceps and 10 back exercises, so the back gets the most exercises.

In the third sample Greg does 18 chest, 12 biceps and 8 back exercises, so the chest gets the most exercise.

7.22上午10点40作业

未认领
状态
已结束
题目
2
开始时间
2023-7-22 0:00
截止时间
2023-7-30 23:59
可延期
24 小时