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

Codeforces Round #717 Baby Ehab Partitions Again - Math+01 Knapsack problem

By xloypaypa in codeforces on 23 Apr 2021

Solution Define $sum=\sum_{i=1}^n a_i$. If $sum$ is a odd number, then of course no need remove anything.…

Codeforces Round #717 AGAGA XOOORRR - bitmasks

By xloypaypa in codeforces on 23 Apr 2021

Solution: If the XOR sum of all numbers is 0. Then it must can make it. Because if and only if a[1]⊕a[2]⊕...⊕a[n−1]=a[n], the XOR sum is 0. So we can make the array as: (a[n],a[n]).…

Codeforces Round #703 Guessing the Greatest - Binary search

By xloypaypa in codeforces on 21 Apr 2021

Solution: Let's query $[1,n]$ firstly. And we get the index of 2nd largest value. Now we can get picture below:…

Educational Codeforces Round #106 ABCD Solutions

By xloypaypa in codeforces on 18 Apr 2021

A. Domino on Windowsill Solution: Place the domino upright in vertical is fine. Then place in horizontal for the extra part.…

Codeforces Round #715 Binary Literature - Construction

By xloypaypa in codeforces on 17 Apr 2021

Solutions: It is very simple to prove that the string which length is 3n can be obtained. Let's get two string which length is 2n, one is 000000, another one is 111111.…

Codeforces Round #715 (Div. 2) ABCDE Solutions

By xloypaypa in codeforces on 17 Apr 2021

A. Average Height Solutions: Put all odd number together. And then put all even number together. Code:…

Codeforces Round #715 The Sports Festival - DP

By xloypaypa in codeforces on 17 Apr 2021

Solution: Sort $a$ first. We can easily find that on any day, the members inside must be a continuous segment of $a$.…

Codeforces Round #715 Almost Sorted - DP+Construction

By xloypaypa in codeforces on 17 Apr 2021

Solution: Generally, Get the total number of almost sorted permutations of length $l$ by DP. And continuously split $n$ and $k$ into sub-DPs.…

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