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

xloypaypa

Twitter
Newer Posts Page 13 of 23 Older Posts

Codeforces Round #729 Strange Function Solution (Java/C++)

By xloypaypa in codeforces on 04 Jul 2021

Solution: First, we can note that: when i is odd number, f(i)=2.Then we consider the case that f(i)=3. Based on the definition, if and only if i is even number and i cannot be divisible by 3, then f(i)=3.…

Codeforces Round #728 (Div. 2) ABC Solutions (Java/C++)

By xloypaypa in codeforces on 26 Jun 2021

A. Pretty Permutations Solution: Obviously, only the two neighbors need to exchange positions with each other.For the case where n is an odd number, only the last three bits need to be exchanged with each other.…

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

By xloypaypa in codeforces on 21 Jun 2021

A. Contest Start Solution: Each participant will make the following $\frac{t}{x}$ participants dissatisfied. But for last few participants, because no more participants following, so need subtract it.…

Codeforces Round #727 PriceFixed Solution (Java/C++)

By xloypaypa in codeforces on 20 Jun 2021

Solution: For each product, we will buy exactly $a_i$ items. We will not buy more items. So, the total number items we buy will not change (because…

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

By xloypaypa in codeforces on 20 Jun 2021

A. Arithmetic Array Solution: For the sum less than n, we just need append one number to make the sum equal to n. For the sum more than n, we append some zero to make n equal to the sum.…

Codeforces Round #726 Deleting Divisors Solution (Java/C++)

By xloypaypa in codeforces on 19 Jun 2021

Solution: We can separate the number to 3 categories: odd, even but not include $2^n$ and $2^n$. Then we can get the state transition brought by one step operation:…

Codeforces Round #725 (Div. 3) ABCDEFG Solutions (Java/C++)

By xloypaypa in codeforces on 12 Jun 2021

A. Stone Game Solution: Let us find the position of minimum and maximum value. Then there are 4 ways to remove: remove from left to right.remove from right to left.…

Codeforces Round #724 ABCDE Solutions (Java/C++)

By xloypaypa in codeforces on 08 Jun 2021

A. Omkar and Bad Story Solution: Obviously, if there is any number in the array is less than zero. Then by using this number as the subtracted number, the array can grow indefinitely.…

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