题干:

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

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-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.

Input

The first line contains integer n (1 ≤ n ≤ 20). The second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 25) — the number of times Greg repeats the exercises.

Output

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.

Examples

Input

2
2 8

Output

biceps

Input

3
5 1 10

Output

back

Input

7
3 3 2 7 9 6 8

Output

chest

Note

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.

题目大意:

一个人有n个回合的三个项目要训练,每个回合ai次,现在告诉你第一个回合先练“chest”,第二个回合练"biceps",第三个回合练"back",第四个回合又练“chest”,,以此类推。现在告诉你每个回合的练习次数,问你哪个项目练的次数最多。

解题报告:

直接暴力,,,注意取模的运用会简化代码,,,但是别忘了要从0开始读入、、

AC代码:

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<queue>
#include<map>
#include<vector>
#include<set>
#include<string>
#include<cmath>
#include<cstring>
#define ll long long
#define pb push_back
#define pm make_pair
#define fi first
#define se second
using namespace std;
const int MAX = 2e6 + 5;
ll n,tmp;
ll bk[20];
int main()
{cin>>n;for(int i = 0; i<n; i++) {scanf("%lld",&tmp);bk[i%3]+=tmp;}if(bk[0] > bk[1] && bk[0] > bk[2]) {printf("chest");}else if(bk[1] > bk[0] && bk[1] > bk[2]) {printf("biceps");}else printf("back");return 0 ;}

总结:

一个小坑,,注意一下就好了,,取模的时候,,需要从0开始读入

【CodeForces - 255A】Greg's Workout (水题)相关推荐

  1. Codeforces 864 A Fair Game 水题

    题目链接: http://codeforces.com/problemset/problem/864/A 题目描述: 看不是是不是一串数中只有两种数且这两种数字的数量是相同的 解题思路: 水题, 水过 ...

  2. CodeForces - 1141D Colored Boots(暴力+水题)

    题目链接:点击查看 题目大意:给出两个字符串s和t,两个字符串中相同的字母可以匹配,问号可以和任意字符匹配,现在问两个字符串最多能匹配多少个字符,并给出匹配的下标 题目分析:挺好玩的一道水题,大体思路 ...

  3. 【CodeForces - 569B】Inventory (水题)

    题干: Companies always have a lot of equipment, furniture and other things. All of them should be trac ...

  4. codeforces 702A A. Maximum Increase(水题)

    题目链接: A. Maximum Increase time limit per test 1 second memory limit per test 256 megabytes input sta ...

  5. Codeforces gym 100685 C. Cinderella 水题

    C. Cinderella Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100685/problem/ ...

  6. codeforces 667A A. Pouring Rain(水题)

    题目链接: A. Pouring Rain time limit per test 1 second memory limit per test 256 megabytes input standar ...

  7. 【CodeForces - 485A】Factory (水题,抽屉原理,tricks)

    题干: One industrial factory is reforming working plan. The director suggested to set a mythical detai ...

  8. CodeForces - 25A IQ test【水题】

    题目链接:https://codeforces.com/contest/25/problem/A #include <iostream> using namespace std; int ...

  9. CodeForces - 29A Spit Problem【水题】

    题目链接:https://codeforces.com/contest/29/problem/A #include <iostream> #include <cstdio> # ...

  10. CodeForces - 29B Traffic Lights【水题】

    题目链接:https://codeforces.com/contest/29/problem/B #include <iostream> #include <cstdio> # ...

最新文章

  1. 在建工程直接费用化_计入在建工程的成本怎么算
  2. 关于Python函数的一些问题
  3. MySQL 数据库常用命令—insert delete update select
  4. 连环清洁工之特殊任务--java资源如何关闭?
  5. visual tree view在工具箱力没有_Visual-Inertial Odometry
  6. adb devices无法找到魅族MX5的解决方法
  7. 并发编程 – Concurrent 用户指南
  8. python字符串是用双引号括起来的_用python连接字符串列表并用引号将每个字符串括起来...
  9. struts2上传图片到mysql数据库 实例_Struts2上传图片到Mysql数据库中,以及显示到页面...
  10. 怎样使用计算机解方程,【教程】用计算器解方程(牛顿法)
  11. 如何批量缩小图片尺寸大小?
  12. 小胡网创:读书和赚钱是一个人一生最好的修行
  13. 历时一个月整理2021金三银四Java面试题汇总,足足127页!
  14. 11G rac修改监听端口
  15. 1.3寸OLED SH1106 IIC驱动显示错误解决方法
  16. 杭电计算机学院和其他学院,浙江最好的5所大学,浙江大学一家独大,其余4所争议很大...
  17. Python|动态规划问题--斐波那契数列
  18. 解析mac苹果电脑与Windows电脑的区别。他们各自有什么优势?
  19. 微信公众号文章爬取 java
  20. LETO型空间光调制器(SLM)的安装

热门文章

  1. [dp]leetcode 198. House Robber
  2. [Leetcode][第79题][JAVA][单词搜索][DFS][回溯]
  3. [Leedcode][JAVA][第16题][最接近的三数之和][双指针][数组]
  4. 语言三做一年级算题_一年级数学期末考试,学生交卷说能考100分,快让你家孩子试试吧...
  5. 游戏服务器红点系统,Unity简易的红点系统RedPoint System
  6. 废粉盒在哪里_很想知道打印机废粉盒中的那些废碳粉应该怎么处理?
  7. stunnel使用详解
  8. python发邮件主机找不到_Python 使用QQ邮箱发邮件
  9. 清华大学-曾鸣-《ARM微控制器与嵌入式系统》I2C总线(一)
  10. php 伪静态是什么意思,路由与伪静态