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

Автор tourist, 14 месяцев назад, По-русски

1786A2 - Чередующаяся колода (сложная версия)

Problem author: KAN

Explanation
Code by KAN

1786B - Производство тортов

Problem author: KAN

Explanation
Code by KAN

1785A - Монстры (простая версия)

Problem author: tourist

Explanation
Code by tourist

1785B - Обмен буквами

Problem author: tourist

Explanation
Code by PavelKunyavskiy

1785C - Монстры (сложная версия)

Problem author: tourist

Explanation
Code by tourist

1785D - Деревянная ложка

Problem author: tourist

Explanation
Code by tourist

1785E - Бесконечная игра

Problem author: tourist

Explanation
Code by tourist

1785F - Минимумы или медианы

Problem author: tourist

Explanation
Code by tourist, O(n^2)
Code by tourist, O(n)
  • Проголосовать: нравится
  • +81
  • Проголосовать: не нравится

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

Thanks for the editorial,waiting from a long time.

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

Finally an editorial! After a long week and a half.

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

In the problem 1785A I think bi should be the amount of health points monster i has right AFTER the spell of type 2 is cast, otherwise the numer of spells of type 1 is smaller than ai — bi

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

can someone tell me, why this test case is NO according to tutorial code

3 2 2 8 13 100 2 10 100

here we do need to shift , 2nd dispenser will server first and second cake , so this should be YES right .(KAN)

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

tourist!

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

Another approach for B

If we are shifting to left it means we are moving in negative direction If we are shifting to right it means we are moving in positive direction

We can try all possible values of shifting by binary search, and compare if we want to shift in positive and negative direction and reduce the search space on each try

https://codeforces.com/contest/1786/submission/238301378

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

hi tourist