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

Codeforces Round #748 All are Same/Half of Same Solutions (Java/C++)

By xloypaypa in codeforces on 17 Oct 2021

Solution: D1. All are Same First, if all numbers are the same, then k can be any value. So we only need to consider the situation where there are different numbers.…

Codeforces Round #748 Changing Brackets Solution (Java/C++)

By xloypaypa in codeforces on 17 Oct 2021

Solution: First of all, according to the description of the problem, we can know that the direction of the brackets does not affect the result at all. So naturally, we only need to consider the parity of different types of brackets.…

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

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