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

xloypaypa

Twitter
Newer Posts Page 14 of 23 Older Posts

Codeforces Round #724 Omkar and Forest Solution (Java/C++)

By xloypaypa in codeforces on 08 Jun 2021

Solution: There are two conclusions: For any point of the map, assume the value of this point is x. So, there must a path from this point, and the value of…

Codeforces Round #724 Omkar and Medians Solution (Java/C++)

By xloypaypa in codeforces on 08 Jun 2021

Solution: First, we can find that: for b[i+1], compare to b[i], actually, we add two number to a: a[2i+1] and a[2i]. So, the impact to the median is limited to 1 position.…

Educational Codeforces Round 110 ABCDE Solutions (Java/C++)

By xloypaypa in codeforces on 06 Jun 2021

A. Fair Playoff Solution: Just check whether the two winners are the first two largest after sorted or not. Code: Java C++…

Educational Codeforces Round 110 Gold Transfer Solution (C++ only)

By xloypaypa in codeforces on 05 Jun 2021

Solution: First. Because the cost of child node must higher that their father node. So obviously, we will choose the shallower node. Then we need find the shallowest node which still have gold remained.…

Educational Codeforces Round 110 Playoff Tournament Solution (Java/C++)

By xloypaypa in codeforces on 05 Jun 2021

Solution: Like segment tree. Maintain all the possibilities of the current game and the earlier game. For sample data, the Initial state:…

Educational Codeforces Round 110 Unstable String Solution (Java/C++)

By xloypaypa in codeforces on 05 Jun 2021

Solution: First, consider if the string is unstable, then how many substrings is beautiful. For 010101, we found it can have 6 substrings which length is 1…

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

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