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

Codeforces Round #754 Treelabeling Solution (Java/C++)

By xloypaypa in codeforces on 16 Nov 2021

Solution: We first consider when $u\oplus v> \min(u,v)$. It is not difficult to find that $u\oplus v> \min(u,v)$ if and only if one of the highest bits of u and v is 0 and the other is 1. Take the following picture as an example:…

Codeforces Round #754 Array Equalizer Solution (Java/C++)

By xloypaypa in codeforces on 15 Nov 2021

Solution: First of all, we can naturally notice that i=1 will directly affect all numbers, and the final result will only be affected by b[1]-a[1].…

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

By xloypaypa in codeforces on 07 Nov 2021

A. Era Solution: Just simulation. When we find a certain a[i]>i+ ans, insert the number of a[i]-(i+ ans). Code: Java C++…

Codeforces Round #752 Extreme Extension Solution (Java/C++)

By xloypaypa in codeforces on 07 Nov 2021

Solution: Obviously, we don't need to consider the operation sequence. Therefore, we directly consider how to perform several operations on a certain number.…

Codeforces Round #753 ABCDEFGH Solutions (Java/C++)

By xloypaypa in codeforces on 05 Nov 2021

A. Linear Keyboard Solution: Just simulate according to the question. Code: Java C++…

Codeforces Round #753 Banquet Preparations 2 Solution (Java/C++)

By xloypaypa in codeforces on 05 Nov 2021

Solution: Obviously, if two dishes are the same, then the total weight of the two dishes must also be the same. According to the previous question, we know that we can calculate the value range of the last remaining a.…

Codeforces Round #753 Banquet Preparations 1 Solution (Java/C++)

By xloypaypa in codeforces on 05 Nov 2021

Solution: We represent the total remain weight of each dish by $remain_i$, which obviously has $remain_i=a_i+b_i-m$.…

Codeforces Round #753 Robot on the Board 2 Solution (Java/C++)

By xloypaypa in codeforces on 05 Nov 2021

Solution: Obviously it is a memory search. Obviously, the maximum distance that the current point can travel = the maximum distance of the next point+1.…

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