Logo
  • Home
  • Codeforces
  • Software
  • Home Page in Chinese
  • @xloypaypa
  • Search
Menu
Author 181 Posts
xloypaypa

xloypaypa

Twitter
Newer Posts Page 15 of 23 Older Posts

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".…

Codeforces Round #721 Sequence Pair Weight Solution (Java/C++)

By xloypaypa in codeforces on 23 May 2021

Solution: We put the same numbers together. Then we get the index array of same numbers. For example, for [1,2,1,1], we put same number together, so, we get: [0,2,3] and [1].…

Codeforces Round #721 Palindrome Game (easy/hard) Solution (Java/C++)

By xloypaypa in codeforces on 23 May 2021

Solution: 1: Consider the simplest case: the string is palindrome, and the length of string is even. For example, 000000. For this case, Bob must win.…

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