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

Автор Shayan, история, 4 дня назад, По-английски

Hi,

Here is the video editorial of Problems A-F2 of EPIC Institute of Technology Round Summer 2024 (Div. 1 + Div. 2). I hope it helps.

1987A — Upload More RAM

1987B — K-Sort

1987C — Basil's Garden

1987D — World is Mine

1987E — Wonderful Tree!

1987F2 — Interesting Problem (Hard Version)

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

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

C was the weirdest problem

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

    Agreed. I still am unable to wrap my head around it completely.

    Can someone help me get a proof or a solution for it.......

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

      The solution should be computed from right to left.

      For the last element, the time needed to become zero is just the beginning height. Once we know the timing for the last element, we can go from right to left and calculate the total time each flower needs.

      For any flower h[i], we know that it will take time h[i] after the time at which h[i+1] == h[i] — 1. In other words, a flower of height 7 will take 7 seconds after the next flower is at height 6. We know when h[i+1] is at height 6 by adding 6 to the time at which it is at 0. So, flower i will take h[i] + timing[i+1] — (h[i] — 1) which simplifies to timing[i+1] + 1. If there is a particularly larger h[i], its value may be more than timing[j+1]+1 so we just set timing[i] to h[i].

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

Did you link this blog before even the official editorial, and named the official editorial Tutorial 2?? or was it the authors themselves

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

    It happens even if we link this one later (and I think it was added later), so It's just not really obvious behavior of Codeforces.

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

Good contest

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

Great one

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

B although trivial is pretty elegant i must say

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

Problem B, i declared my answer variable as int and all those 10^9 added up to long. C's solution passed pretest 1 but gave clueless answers in pretest 2.