Home
Problem
Status
Contest
Workbook
User
Group
Forum
Register
Login
{"workbook":{"problemsBrief":"{\"CodeForces-1954D\":[\"Colored Balls\",4612,\"\\u003ca style\\u003d\\\"color: black\\\" href\\u003d\\\"https://codeforces.com/contest/1954\\\"\\u003eEducational Codeforces Round 164 (Rated for Div. 2)\\u003c/a\\u003e\"],\"洛谷-U422313\":[\"Minus Twice\",11,null]}","joined":false,"groups":{}},"managingGroups":{},"author":"Tiny_Konnyaku","updateTime":1712981876000,"title":"2024 Codeforces Easy Questions","dislikeCnt":0,"content":"This workbook includes the simpler but refreshing questions of all the [Codeforces contests](https://codeforces.com) I have participated in 2024.\n\nMay wish to do it, can greatly improve the ability of thinking. Be sure not to read the solutions in a hurry, or you can\u0027t absorb the essence of the questions.\n\n[problem:CodeForces-1954D]\n[problem:洛谷-U422313]\nLemma: Give an array $a$ of length $n$, each time you can choose $i,j$ and let $a_i,a_j$ minus $1$. If $i\u003dj$, $a_i$ only minus $1$, not $2$. The minimum number of operations to let $a$ all $0$ is $\\min(\\lceil \\frac{\\sum_{i\u003d1}^n a_i}{2} \\rceil, \\max_{i\u003d1}^n(a_i))$\n\nTry to solve the second problem, then you will be able to prove this Lemma. I think there are other ways to prove this Lemma.","threadId":189658,"likeCnt":0,"createTime":1712971859000,"isWorkbook":true,"viewCnt":88,"openness":2,"fav":false,"id":4864,"trustable":false}