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 9 of 22 Older Posts

Educational Codeforces Round 113 ABCD Solutions (Java/C++)

By xloypaypa in codeforces on 16 Sep 2021

A. Balanced Substring Solution: Just need to find "ab" or "ba" in the string. Code: Java C++…

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

By xloypaypa in codeforces on 12 Sep 2021

A. Domino Disaster Solution: Obviously, if the first row is LR or RL, then the second row only needs to be the same.…

Codeforces Round #742 Non-Decreasing Dilemma Solution (Java/C++)

By xloypaypa in codeforces on 12 Sep 2021

Solution: This problem is a typical application of segment tree. As shown in the figure below, we maintain three attributes for each interval:…

Codeforces Round #741 ABCD Solutions (Java/C++)

By xloypaypa in codeforces on 04 Sep 2021

A. The Miracle and the Sleeper Solution: Obviously, when b=r/2+1, the value of a%b is the largest. Of course, note that the value of b cannot be less than l.…

Codeforces Round #741 Two Hundred Twenty One Solution (Java/C++)

By xloypaypa in codeforces on 04 Sep 2021

Solution: First, we define $b[i]=a[i]\cdot (-1)^{(i-1)}$, $sum(l,r)=\sum_{i=l}^r{b[ i]}$. So for any i, b[i] is either 1 or -1. Therefore, if the final sum is 0, then there must be the same number of 1 as the number of -1.…

Codeforces Round #741 Scenes From a Memory Solution (Java/C++)

By xloypaypa in codeforces on 04 Sep 2021

Solution: First of all, it is obvious that if the 1, 4, 6, 8, 9 appear in the original number. All other numbers can be deleted, and only one digit is left.…

Codeforces Round #740 Div 2 ABCDE Solutions (Java/C++)

By xloypaypa in codeforces on 28 Aug 2021

A. Simply Strange Sort Solution: This question can be simulated according to the requirements of the question. Code: Java C++…

Codeforces Round #739 ABCDEF Solutions (Java/C++)

By xloypaypa in codeforces on 21 Aug 2021

A. Dislike of Threes Solution: Just check each number in turn starting from 1. Code: Java C++…

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