Logo
  • Home
  • Codeforces
  • Software
  • Home Page in Chinese
  • @xloypaypa
  • Search
Menu
Topic 175 Posts

codeforces

Solutions for Codeforce。Include Div2 and Div3. Include Div1 ABC(<2500) also.
Newer Posts Page 14 of 22 Older Posts

Codeforces Round #723 Oolimry and Suffix Array Solution (Java/C++)

By xloypaypa in codeforces on 29 May 2021

Solution: Let us represent the string to c. First, we can notice that: for i<j, there must be $c_{s[i]}\leq c_{s[j]}$. For example, $[3,2,4,1,0,5,6]$, at least we have $c_3\leq c_2\leq c_4\leq c_1\leq c_0\leq c_5\leq c_6$.…

Codeforces Round #723 ABCDE Solutions (Java/C++)

By xloypaypa in codeforces on 29 May 2021

A. Mean Inequality Solution: Sort the array. And split the array to two parts. Each time, we take one number from each of the two parts at a time.…

Codeforces Round #723 Potions (Hard/Easy) Solution (Java/C++)

By xloypaypa in codeforces on 29 May 2021

Solution: First, if there are not any limitations, we will drink all the potions. In fact, the only limitation is the health must not less than 0.…

Codeforces Round #723 Kill Anton Solution (Java/C++)

By xloypaypa in codeforces on 29 May 2021

Solution: Let consider how Anton fix the DNS. We found that: for minimum cost, every time, Anton just fixing one character. For example, fix NNOTA to ANTON.…

Codeforces Round #722 (Div. 2) ABCD Solutions (Java/C++)

By xloypaypa in codeforces on 27 May 2021

A. Eshag Loves Big Arrays Solution: Because can choose any subsequence. So, for some number x which is bigger than the minimum number of the array.…

Codeforces Round #722 Parsa's Humongous Tree Solution (Java/C++)

By xloypaypa in codeforces on 25 May 2021

Solution: The first conclusion is: for any vertex, it will choose l or r. Because if and only if the case like example 2 can choose value between l and r…

Codeforces Round #722 Kavi on Pairing Duty Solution (Java/C++)

By xloypaypa in codeforces on 25 May 2021

Solution: Define dp[i] to represent the answer when n=i. We use the case n=4 to explain the solution.…

Codeforces Round #721 MEX Tree Solution (Java/C++)

By xloypaypa in codeforces on 23 May 2021

Solution: Use the node 0 as the root of tree. For each node, calculate the total number of children nodes (include itself) by DFS. Denote by "count".…

Newer Posts Page 14 of 22 Older Posts
xloypaypa's Blog © 2025 Published with Ghost • Theme Attila • System theme
DigitalOcean Referral Badge 蜀ICP备19018968号