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

Автор gepardo, история, 6 лет назад, По-английски

Hello everyone :)

We are happy to announce that XXI Open Cup, GP of Belarus will take place on February 14, 2021 at 11:00 MSK.

The authors of the problems are gepardo, kimden, Mediocrity, 244mhq, Wind_Eagle, and PuRpLe_FoReVeR. Also greencis, aleex, RED_INSIDE, programmer228, mrboorger, Chmel_Tolstiy, and gosuto took part in preparing the contest.

This contest was in Petrozavodsk, so if you have been there and have seen the problems, do not solve it now.

Links: Div. 1, Div. 2. You need an Open Cup login to participate.

You can discuss the contest here after it's over.

Good luck everyone and I hope you'll enjoy the problems!

UPD: Editorial

UPD 2: The contest is added to gym now.

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

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +63 Проголосовать: не нравится

Hope you will enjoy the problems!

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

How to solve H, K, L?

  • »
    »
    6 лет назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится +20 Проголосовать: не нравится

    For H, I tried the following (but got WA6; possibly due to a bug, not sure though)

    If we have to go say south-east from (x1,y1) to (x2,y2), then we should take south as long as the x-coordinate is smaller than the y-coordinate. After we get to (k,k) cooodinates, we should keep alternately increasing x and y until we hit x2 or y2. Then, we increase the other coordinate.

    I computed all the series by abusing wolfram alpha (though it was doable by hand) and directly wrote the final expressions.

    I did casework for all similar cases; in another case, it turns out to be x <= -y.

    • »
      »
      »
      6 лет назад, скрыть # ^ |
      Rev. 2  
      Проголосовать: нравится +20 Проголосовать: не нравится

      The model solution is very similar (we consider many cases and use the optimal strategy for each of them), but there is one observation which makes the calculation much simpler. See the editorial for details.

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

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

»
6 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +21 Проголосовать: не нравится

problem I nice solution)

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +50 Проголосовать: не нравится

Fun fact: F can be passed by $$$O(n^3)$$$ brute force.

code

»
6 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +30 Проголосовать: не нравится

For the sake of completeness, here is the editorial of Division 2 only problems.

Problem N (Div. 2). Bad Sets Usage. For pieces of each color and rank, check if there are enough of them in the first set. If not, borrow some pieces from the second set and remember them before printing. If there are still not enough, it is impossible to complete the first set.

Problem O. Blots Spilled Unluckily. This problem is an exercise in implementing a depth-first search or a breadth-first search on a grid.

Problem P. Bored Serving Users? We obviously prefer hubs with more sockets. Sort the hubs in non-increasing order by the number of sockets and find the least $$$i$$$ such that the first $$$i$$$ hubs are enough. Remember that connecting $$$i$$$ hubs requires $$$2(i-1)$$$ sockets, thus we have to check that $$$(\sum_{j=1}^{i} k_j) - 2(i-1) \ge N$$$. Also, we should store the indices $$$j$$$ of the hubs along with the values of $$$k_j$$$ to restore the answer.

Problem Q. Base Structure Under... Convert the years $$$A$$$ and $$$B$$$ into AUC, then iterate over all years in the range, represent them in the Roman number system, and find the length of the longest representation.

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

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

»
6 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится -18 Проголосовать: не нравится

-

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится -16 Проголосовать: не нравится

Can any author confirm that why the Editorial link is not working ?

UPD:- Mentioning authors gepardo, kimden, Mediocrity, 244mhq, Wind_Eagle and PuRpLe_FoReVeR.