#include <bits/stdc++.h>
using namespace std;
const int maxn = ;
typedef long long ll;
ll a[maxn];
ll b[maxn]; int main(){
for(int i = ;i < maxn;i++){
cin >> a[i];
}
ll ans = -;
for(int i = ;i < maxn;i++){
for(int j = ;j < maxn;j++) b[j] = a[j];
b[i] = ;
int x = a[i] / maxn;
int y = a[i] % maxn;
for(int j = ;j < maxn;j++)
b[j] += x;
for(int j = ;j <= y;j++)
b[(j+i)%maxn]++;
ll sum = ;
for(int j = ;j < maxn;j++)
if(b[j]% == )
sum += b[j];
if(ans < sum)
ans = sum;
}
cout << ans << endl;
return ;
}

B. Mancala

B. Mancala (Codeforces Round #478 (Div. 2))的更多相关文章

  1. Codeforces Round #478 (Div. 2)

    题目链接:http://codeforces.com/contest/975 A. Aramic script time limit per test:1 second memory limit pe ...

  2. Codeforces Round #478 (Div. 2) ABCDE

    A. Aramic script time limit per test 1 second memory limit per test 256 megabytes input standard inp ...

  3. 【map离散&容斥】Ghosts @Codeforces Round #478 (Div. 2) D

    传送门 题意:给你一条直线的斜率a和截距b,和某一时刻n个在直线上的点的横坐标,以及沿坐标轴方向的速度.问你这些点在(-∞,+∞)的时间内的碰撞次数. solution 设两个点在t时刻相碰,有: x ...

  4. 【推导】Codeforces Round #478 (Div. 2) D. Ghosts

    题意:给你一条直线以及初始时刻这条直线上的一些人的坐标,以及他们的速度矢量.让你对每个人计算他在过去无限远到将来无限远的时间内会与多少人处于同一个点,然后对每个人的这个值求和. 列方程组:两个人i,j ...

  5. Codeforces Round #366 (Div. 2) ABC

    Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...

  6. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

  7. Codeforces Round #368 (Div. 2)

    直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...

  8. cf之路,1,Codeforces Round #345 (Div. 2)

     cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅.....   ...

  9. Codeforces Round #279 (Div. 2) ABCDE

    Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems     # Name     A Team Olympiad standard input/outpu ...

随机推荐

  1. java复制图片实现方法

    原图片路径:srcpic 目的图片路径:despic public static void copyPic(String srcpic, String despic){ File file1=new ...

  2. AndroidPageObjectTest_ByAllPossible.java

    以下代码使用ApiDemos-debug.apk进行测试 //这个脚本用于演示PageFactory的功能:使用注解@AndroidFindAll定位元素.注解用法参考页面类代码. package c ...

  3. 将前端文件和Go程序打包

    我今天项目上碰见个需求,前端小哥给我写了个页面,要搭配我的Go程序一起使用,突然想到Go可以打包静态页面,而且调用也很方便,所以操作了一下,成功,我把它记录下来,作为以后的回顾和复习. 首先,我们需要 ...

  4. 编写按键驱动以及在framework层上报按键事件

    平台信息:内核:linux3.10 系统:android6.0平台:RK3288 前言:本文主要实现的功能是在android系统中添加一个按键,在驱动层使用定时器,每隔1秒钟向上层发送按键实现,fra ...

  5. 电脑设备对于IT人员,犹如武器对于士兵

    本人做了多年Softwarer,写些感受. 比我们早的老一代程序员更是用自己的健康总结了一些经验. 先说关于健康方面: 程序员要长期坐着,这对健康损害很大,颈椎腰椎,心肺能力都会衰减.以前只是听说,自 ...

  6. html5--3.16 button元素

    html5--3.16 button元素 学习要点 掌握button元素的使用 button元素 用来建立一个按钮从功能上来说,与input元素建立的按钮相同 button元素是双标签,其内部可以配置 ...

  7. 单元测试JUnit4 Ctrl + Shift + T

    单元测试 public class Calculator { public int result = 0; public int add(int operandl, int operand2) { r ...

  8. Yii2.0 自动生成 model 层

    yii2.0 里一个表对应一个model,可以自动生成 前台使用的model在frontend(backend)/web目录下的gii生成例如(www.liqiuyue.com/yii /fronte ...

  9. Splay模板(序列终结者)

    我只是一个存模板的,详细的请看这里http://blog.csdn.net/whai362/article/details/47298133 题目链接:http://www.codevs.cn/pro ...

  10. 最小点覆盖 hdu--1054

    点击打开题目链接 最小点覆盖=最大二分匹配的 (单向图) ; 最小点覆盖=最大二分匹配的一半 (双向图) ; 证明 所以我们只需求最大匹配,用 匈牙利算法 求出最大匹配,除以二得到答案 具体算法都已经 ...