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

xloypaypa

Twitter
Newer Posts Page 8 of 23 Older Posts

Codeforces Round #748 Red-Black Number Solution (Java/C++)

By xloypaypa in codeforces on 17 Oct 2021

Solution: A very obvious DP problem. It is not difficult to think of several states: 1. The first i numbers; 2. |r-l|; 3. The remainder of division by A; 4. The remainder of division by B.…

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

By xloypaypa in codeforces on 16 Oct 2021

A. Computer Game Solution: Scan from left to right one by one. As long as one of the columns on the left can be reached, all safe cells in the current column can be reached.…

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

By xloypaypa in codeforces on 10 Oct 2021

A. Consecutive Sum Riddle Solution: Obviously $\frac {(l+r)\cdot (r-l+1)} 2 = n$, so $(l+r)\cdot (r-l+1) = 2\cdot n$.…

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

By xloypaypa in codeforces on 09 Oct 2021

A. Gamer Hemose Solution: Obviously, we only need to choose the two weapons with the highest attack power to attack alternately. Code: Java C++…

Codeforces Round #746 Bakry and Partitioning Solution (Java/C++)

By xloypaypa in codeforces on 09 Oct 2021

Solution: First, if the XOR of each component is the same (represent by X), then the XOR of all nodes is either X or 0.…

Codeforces Round #746 Hemose in ICPC ? Solution (Java/C++)

By xloypaypa in codeforces on 09 Oct 2021

Solution: First, because gcd(a,b,c) must be less than or equal to gcd(a,b) or gcd(b,c). Therefore, the maximum distance must be the largest side.…

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

By xloypaypa in codeforces on 06 Oct 2021

A. CQXYM Count Permutations Solution: It is not difficult to think that there are x of i satisfying the condition in an permutations , then if we reverse the permutations, there are 2n-x of i satisfying the condition.…

Codeforces Round #745 (Div. 2) Train Maintenance Solution (Java/C++)

By xloypaypa in codeforces on 06 Oct 2021

Solution: First of all, we can almost immediately notice that if x[i]>m, then this must have no effect, and we can ignore it directly. Therefore, the value range of x[i] is reduced from 0~$10^9$ to 0~$2\cdot 10^5$.…

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