Good Bye 2018题解 题解 CF1091A [New Year and the Christmas Ornament] 打完cf都忘记写题解了qwq 题意就是:给你一些黄,蓝,红的球,满足蓝的数量恰比黄的多一,红的数量恰比蓝的多一 容易发现黄的数量恰是\(\min{y,b-1,r-2}\) 输出这个值\(*3+3\)即可 # include <bits/stdc++.h> int main() { int y, b, r; scanf("%d%d%d", &…
Good Bye 2018! 题目链接:https://codeforces.com/contest/1091 A. New Year and the Christmas Ornament 题意: 给出三堆数量分别为y,b,r的东西,现在要你从三堆中各选一堆,满足y'+1=b'且b'+1=r' (y',r',b'分别是指从中选取的个数). 现在问最多能拿出的个数为多少. 题解: 我是直接模拟的= =但是有更简单的方法. 让y+=2,b+=1,那么现在的最优解为min(y,b,r)*3-3.这个还…
目录 Codeforces 1091 A.New Year and the Christmas Ornament B.New Year and the Treasure Geolocation C.New Year and the Sphere Transmission(思路) D.New Year and the Permutation Concatenation(思路 计数) E.New Year and the Acquaintance Estimation(Erdos–Gallai定理…
咕bye 2018,因为我这场又咕咕咕了 无谓地感慨一句:时间过得真快啊(有毒 A.New Year and the Christmas Ornament 分类讨论后等差数列求和 又在凑字数了 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int a,b,c; int main() { scanf("%d%d%d",&a,&b,&…
好久没有fst题了...比赛先A了前4题然后发现room里有人已经X完题了没办法只能去打E题,结果差一点点打完...然后C题fst掉了结果就掉rating 了...下面放题解 ### [A. New Year and Hurry](http://codeforces.com/problemset/problem/750/A) 题目大意:给定n道题和时间t,每完成第i道题需花$5*i$ 分钟,求在$240-t$分钟内完成的最大题数. 直接模拟,求完成i道题所花时间$t_i+t\leq 240$ 的…
传送门 https://www.cnblogs.com/violet-acmer/p/10201535.html 题意: n 个people,编号1~n,按顺时针方向围城一圈: 初始,编号为1的people抱着一个球,他可以将球顺时针传给第 k 个people; 接到球的people将球传给他顺时针方向的第 k 个people,循环进行,直到球再一次落到 1 号 people 手中结束: 定义一个开心值 :所有接到球的 people 的编号和. 求所有的开心值,并按升序排列. 题解: 弱弱的我只…