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

xloypaypa

Twitter
Newer Posts Page 12 of 23 Older Posts

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

By xloypaypa in codeforces on 28 Jul 2021

A. Polycarp and Coins Solution: Divide n by 3. If the remainder is 0, then c1 and c2 are equal; if the remainder is 1, then c1 has one extra; if the remainder is 2, then c2 has one extra.…

Educational Codeforces Round 111 ABCD Solutions (Java/C++)

By xloypaypa in codeforces on 25 Jul 2021

A. Find The Array Solution: Just be greedy. Press 1, 3, 5, 7 and so on in sequence, and stop as long as the sum is greater than s. Code: Java C++…

Educational Codeforces Round 111 Excellent Arrays Solution (Java/C++)

By xloypaypa in codeforces on 25 Jul 2021

Solution: First, let us pay attention to the range of l and r, $l\leq 1$, $r\geq n$. So, for the first half of a, you can let $a[i]=i+1$, and for the second half of a, you can let $a[i]=i-1$.…

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

By xloypaypa in codeforces on 24 Jul 2021

A. AquaMoon and Two Arrays Solution: Just simulate the process. For each time, find the i,j where a[i]>b[i] and a[j]<b[j]. Just apply the operation for this i, j. Code: Java C++…

Codeforces Round #731 (Div. 3) ABCDEFG Solution (Java/C++)

By xloypaypa in codeforces on 18 Jul 2021

A. Shortest Path with Obstacle Solution: If and only if the three points of ABF are in a straight line and F is between AB, the answer is Manhattan distance +2.…

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

By xloypaypa in codeforces on 11 Jul 2021

A. Exciting Bets Solution: If the two numbers are the same, then obviously the answer is infinity. If the two numbers are different, then let us represent these two numbers to a and a+x.…

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

By xloypaypa in codeforces on 05 Jul 2021

A. Odd Set Solution: Just need count the number of even numbers. If and only if the number of even numbers and the number of odd numbers are the same, then we output "Yes" Code: Java C++…

Codeforces Round #729 Priority Queue Solution (Java/C++)

By xloypaypa in codeforces on 04 Jul 2021

Solution: First, for each + operation, we only need count the number of subsequences which include this operation. Let us assume the i-th operation is +, and the value of it is a[i].…

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