Блог пользователя LiM_256

Автор LiM_256, история, 5 лет назад, По-английски
  • A

It is easy to figure out that any $$$s[i]$$$ and $$$s[i - 1]$$$ which $$$i$$$ is even ($$$1$$$ index) must have same ammount of 'a' and 'b's. So just change it greedily.

Solution
  • B

We don't need to consider "$$$+1$$$", because it is a constant. Without it, we can sort the array undecreasing and just implement it one by one. This greedy algorithm can be proved with rearrangement inequality.

Solution
  • C

You can solve this problem intuitively, with checking each "uncovered" point by trying $$$8$$$ directions of $$$(x1, y1)$$$ with 0.5 length, which x1 is in x[1...6], y1 is in y[1...6].

Solution
  • D

It is easy to figure that $$$z$$$ must be divided by $$$abs(a[i] - a[i - 1])$$$. So $$$z$$$ will become maximum if we take $$$z$$$ as its greatest common divisior, and y will become minimum.

Solution
  • E

We can do two binary search and solve the problem easily, and check answer with simple math formula.

Solution
  • F

We can construct such DP method:

DP

We can maintain it using simple data structure, such as segment tree. And the problem can be solved.

Solution
  • Проголосовать: нравится
  • +11
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Auto comment: topic has been updated by LiM_256 (previous revision, new revision, compare).