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

Codeforces Round #721 Sequence Pair Weight Solution (Java/C++)

By xloypaypa in codeforces on 23 May 2021

Solution: We put the same numbers together. Then we get the index array of same numbers. For example, for [1,2,1,1], we put same number together, so, we get: [0,2,3] and [1].…

Codeforces Round #721 Palindrome Game (easy/hard) Solution (Java/C++)

By xloypaypa in codeforces on 23 May 2021

Solution: 1: Consider the simplest case: the string is palindrome, and the length of string is even. For example, 000000. For this case, Bob must win.…

Educational Codeforces Round 109 Assimilation IV Solution(Java/C++)

By xloypaypa in codeforces on 21 May 2021

Solution: To get the expected number, we need calculate the total number of points can be conquered in all permutation.…

Educational Codeforces Round 109 ABCDE Solutions

By xloypaypa in codeforces on 17 May 2021

A. Potion-making Solution: It is a fractional simplification of $ \frac k {100} $. The simplified denominator is the answer.…

Educational Codeforces Round 109 Armchairs Solution (Java/C++)

By xloypaypa in codeforces on 17 May 2021

Solution: Define dp[i][j] to stand for the minimum cost if we move the people from the i th occupied armchair to j-th empty armchair.…

Educational Codeforces Round 109 Robot Collisions Solution (Java/C++)

By xloypaypa in codeforces on 17 May 2021

Solution First, for any two robots $i$ and $j$, if $x_i\equiv x_j\mod 2$ (the remainder of 2 is same), then this two robots must meet and explode…

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

By xloypaypa in codeforces on 13 May 2021

A. Arena Solution: If a hero is not the lowest level, then he can fight with lower-level heroes. Code: C++:…

Codeforces Round #720 Nastia and a Good Array - Java/C++

By xloypaypa in codeforces on 08 May 2021

Solution: Because we can change at most n numbers. And the new value at most can be 2*10^9.So, we replace all the number to two big prime numbers:…

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