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

Автор doreshnikov, история, 5 лет назад, перевод, По-русски

Краткая информация

Прошу прощения за очередное длительное ожидание разбора, я обещал, что он будет появляться быстрее, но я немного приболел, и работа идет очень медленно.

Про задачу F:

И еще раз прошу прощения за жесткое ограничение по памяти в этой задаче. Мы не планировали специально отсекать решения с DFS или заставлять всех писать сложные оптимизации, просто исходный расчет был на решение, не использующее DFS. Прикладываю к разбору как раз то решение, которое мы ожидали, оно использует ~75MB памяти.

Видимо, Div. 3 раунды могут послужить хорошим опытом и для авторов. Постараюсь в следующий раз не допускать таких же ошибок :) Спасибо всем за участие и надеюсь увидеть вас в следующих раундах!

Разбор

1607A - Линейная клавиатура

Идея: doreshnikov, MikeMirzayanov

Разбор
Решение

1607B - Математический кузнечик

Идея: doreshnikov

Разбор
Решение

1607C - Устранение минимума

Идея: doreshnikov

Разбор
Решение

1607D - Сине-красная перестановка

Идея: MikeMirzayanov

Разбор
Решение

1607E - Робот на доске 1

Идея: MikeMirzayanov

Разбор
Решение

1607F - Робот на доске 2

Идея: doreshnikov

Разбор
Решение

1607G - Подготовка банкета 1

Идея: doreshnikov

Разбор
Решение

1607H - Подготовка банкета 2

Идея: MikeMirzayanov

Разбор
Решение
Разбор задач Codeforces Round 753 (Div. 3)
  • Проголосовать: нравится
  • +122
  • Проголосовать: не нравится

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

Thanks for an amazing round !

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

Correct me if I'm wrong but I believe there's a typo in the editorial to problem B. It says "coordinate −1 is even, jumping right to 2 leads to 2", when jumping right 2 from -1 should be 1 (2-1 = 1).

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

I finally know why so many people I know can't solve problem F.

But I get TLE because I forgot to push a tag XD.

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

doreshnikov Can you explain the following line in the editorial with an example for problem : Robot on the Board 1?

Since the robot breaks as soon as goes outside the field, if any command causes it to break, it either leads to its total shift relative to (r, c) of exactly c to the left or exactly m — c + 1 to the right, or, similarly, of exactly r up or exactly n — r + 1 down.

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

can anyone share accepted java solution for problem C. mine is https://codeforces.me/contest/1607/submission/134305901 giving TLE

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

For the case n=10 and x0=10 in problem B, where x0 is the starting point and n is total number of steps, how the output is 11? From what I understood from the problem statement, I was getting 15.

10-1+2-3+4...+10 -> 15

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

Why in problem F the solution with dfs gives MLE?

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

I think the tutorial of problem C has a mistake:

The Words in the tutorial

I think $$$a_0$$$ should be [1,4,6,12,15].

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

what does "max[->]" mean in editorial of problem E

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

jj

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

problem H can also be thought of as segments on an X, Y graph. In this case the X coordinate is the amount of A left and the Y coordinate can be thought of as the amount of B left. Drawing this out one can observe that all such segments have slope -1 and thus only segments with the same y intercept can intersect with each other. It turns out this y intercept corresponds to the total amount of left over food across both A and B which is A + B — M. We can solve such a problem for each one of these intercepts separately and see that by rotating these lines to a slope of 0 we essentially have a problem where there are segments that may or may not overlap and we want to choose the minimum amount of points such that all segments are covered by these points. This is a well known greedy problem. Notice that we can just sort segment endpoints by the total amount of A left as when rotating this line to have slope 0, the order of these endpoints will not change if they are sorted by the X coordinate for these points.

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

Hi, could someone figure out why my submission for Problem F is TLEing? A runtime analysis of this shows that it should only be O(mn) — the size of the board, which theoretically should pass. Thanks a lot!

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

For F question(Robot on the Board 2), I submitted this code but it is giving wrong answer on test 2 — test case 223. Can anyone help me out with the mistake?

Checker comment is: wrong answer number of steps in the output is 6 but in fact it's 7 (test case 223)