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

Автор danx, история, 12 месяцев назад, По-английски

Hello everyone!

Below is the editorial for the informatics division of CAMA along with the solution code to every problem. We have also uploaded PDFs with the editorial both in Spanish and English on our website. The contest can be found on this gym.

The problems were prepared by Esomer, danx, Hectorungo_18, javiergm06 and Rigobertus. We would also like to thank our VIP tester BernatP for his dedication towards the contest.

A. Saving the cinema

Solution
Code

B. Operation

Solution
Code

C. Maximum profit

Solution
Code

D. jbum

Solution
Code

E. Looking for palindromes

Solution
Code

F. Harry Potter in CMS

Solution
Code

G. XOR + Constructive = Love

First of all, we would like to apologize for misjudging the difficulty of this problem. It turned out to be much harder than what we expected.

Solution
Code

H. Menorca's ants

Solution
Code

I. Fake bills

Solution
Code

J. Force Perturbation

Solution
Code

K. Óscar and his battle

Solution
Code

L. Random intervals

Solution
Code

M. The battle of Helm's Deep

Solution
Code

N. The Omer's orange tree

Solution
Code

O. Bea the maximizer

Solution
Code

P. Ski resort

Solution
Code
Разбор задач CAMA 2023
  • Проголосовать: нравится
  • +30
  • Проголосовать: не нравится

»
12 месяцев назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

We have put a lot of effort into preparing the contest and we believe that the problems are interesting.

We hope you enjoy them!

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

Problems are good. Nice contest!

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    Thanks, we are glad you like the problems. Hope to see you participating in the next edition :)

»
12 месяцев назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

K can be solved by without trees or compression, just by nuancing the two pointers approach. The idea is that when considering characters in non-increasing order of $$$a_i$$$, there is no point considering a character with a smaller $$$b_i$$$ than one we've seen already. Thus, we can impose both that $$$a_i$$$ is non-increasing and that $$$b_i$$$ is non-decreasing over the monsters that we consider, allowing us to use two pointers over $$$c$$$ and $$$d$$$ to maintain the number of coins as we go.

Code
»
11 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Is there a typo in the problem statement for problem E? Bounds claim N=5000 but test data goes above that