\(\sf{Solution}\) 显然要用到贪心的思想. 既然最终的结果只与每组强度第二大选手有关,那就考虑如何让他的值尽可能大. 其实,从小到大排个序就能解决,越靠后的值越大,使得每组强度第二大选手的值最大. 最后 \(O(n)\) 扫一遍,更新 \(ans\) 的值. \(\sf{Code}\) #include<iostream> #include<algorithm> using namespace std; #define ll long long ll n,a[300…
Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement There are 3N participants in AtCoder Group Contest. The strength of the i-th participant is represented by an integer ai. They will form N teams, each consisting of three p…
AtCoder Grand Contest 012 A - AtCoder Group Contest 翻译 有\(3n\)个人,每一个人有一个强大值(看我的假翻译),每三个人可以分成一组,一组的强大值定义为三个人中第二强的人的强大值.求\(n\)组最大的强大值之和. 题解 这...不是倒着选两个人,正着选一个人构成一组就好了嘛.. #include<iostream> #include<cstdio> #include<algorithm> using namespa…
A - AtCoder Group Contest Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement There are 3N participants in AtCoder Group Contest. The strength of the i-th participant is represented by an integer ai. They will form N teams,…
原文链接http://www.cnblogs.com/zhouzhendong/p/8735114.html $AtCoder\ Regular\ Contest\ 094(ARC094)\ CDE$题解 本次$ARC$可谓是手速场.当时由于博主实在zz导致滚粗,rk89. 下面是题解. 总结了一下,三道结论题.样例都不错,猜到结论基本上就可以过掉了. 严重差评!!!大概要涨不了多少rating了QAQ(暴露了我的Rating是多么低),xza怎么没来?? (UPD:2018-04-07 21:…
人生第一场 AtCoder,纪念一下 话说年后的 AtCoder 比赛怎么这么少啊(大雾 AtCoder Beginner Contest 154 题解 A - Remaining Balls We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one…
目录 AtCoder Beginner Contest 153 题解 A - Serval vs Monster 题意 做法 程序 B - Common Raccoon vs Monster 题意 做法 程序 C - Fennec vs Monster 做法 程序 D - Caracal vs Monster 做法 程序 E - Crested Ibis vs Monster 做法 程序 F - Silver Fox vs Monster 做法 程序 感谢 AtCoder Beginner Co…
AtCoder Beginner Contest 177 题解 目录 AtCoder Beginner Contest 177 题解 A - Don't be late B - Substring C - Sum of product of pairs D - Friends E - Coprime F - I hate Shortest Path Problem A - Don't be late 问你能不能在时间\(T\)内用不高于\(S\)的速度走过\(D\)的路程,转化为判断\(ST\)…
KYOCERA Programming Contest 2021(AtCoder Beginner Contest 200) 题解 哦淦我已经菜到被ABC吊打了. A - Century 首先把当前年份减去\(1\),对应的世纪也减去\(1\),然后我们就发现第\(0\)到\(99\)年对应第\(0\)世纪,第\(100\)到\(199\)年对应第\(1\)世纪,以此类推. 答案就是\(\lfloor \frac {N-1} {100} \rfloor\).这里\(\lfloor x \rflo…
AtCoder Beginner Contest 184 题解 目录 AtCoder Beginner Contest 184 题解 A - Determinant B - Quizzes C - Super Ryuma D - increment of coins E - Third Avenue F - Programming Contest 这把怎么感觉题目都比以往的ABC水啊,拜此所赐我只是程序写得慢就排名狂掉( A - Determinant 求二阶矩阵的行列式,是小学常见自定义题目(…