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

xloypaypa

Twitter
Newer Posts Page 17 of 23 Older Posts

Codeforces Round #719 Arranging The Sheep - Sort

By xloypaypa in codeforces on 06 May 2021

Solution: We define the data structure below: static class Sheep { int suppose_pos, pos; } suppose_pos represent the position of this su…

Codeforces Round #719 To Go Or Not To Go? - BFS

By xloypaypa in codeforces on 06 May 2021

Solution: This is a shortest paths problem. But do not use Dijkstra or SPFA to solve this problem. Because the time complex is $O(nm\cdot log(nm))$. Can get TLE with an extra $log$.…

Codeforces Round #719 Guess the K-th Zero (Hard version) - Segment tree

By xloypaypa in codeforces on 06 May 2021

Solution Base on the easy version, we still binary search in the hard version. So, we query the sum of $[1, mid]$.Now the problem is, after each time, we need change the element from 0 to 1.…

Codeforces Global Round 14 ABCD Solutions

By xloypaypa in codeforces on 03 May 2021

A. Phoenix and Gold Solution: If the sum of all numbers in w is x, then there is no solution. Because no matter what order, when $i=n$, the sum will be x.…

Codeforces Round #707 Going Home - Complexity Analysis

By xloypaypa in codeforces on 01 May 2021

Solution: First. We can change $a_x + a_y = a_z + a_w$ to $a_x - a_w = a_z - a_y$. So the problem becomes a problem of finding two pairs so that their differ of each pair are equal.…

Educational Codeforces Round #108 ABCD ​Solutions

By xloypaypa in codeforces on 30 Apr 2021

A. Red and Blue Beans Solution: Take the minimum value of $r$ and $b$ as $min$ and the maximum value as $max$.…

Educational Codeforces Round #105 ABCDE ​Solutions

By xloypaypa in codeforces on 28 Apr 2021

A. ABC String Solution: Obviously, a certain letter appears twice as often as the other two letters. But for the convenience of implementation,…

Educational Codeforces Round #105 A-Z Graph - Graphs + Construction

By xloypaypa in codeforces on 28 Apr 2021

Solution: It is obvious if the vertices can be repeated. Assuming there is a solution, there must be two edges v1->v2 and v2->v1.…

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