otero1991's blog

By otero1991, 12 years ago, In English

When are the authors of CodeForce Round #134 or anybody going to write the Editorial, I couldn't make Div2 D and I want to read the solution, but nobody has post it

  • Vote: I like it
  • +28
  • Vote: I do not like it

»
12 years ago, # |
  Vote: I like it -7 Vote: I do not like it

If someone help to solve an editorial

»
12 years ago, # |
  Vote: I like it +6 Vote: I do not like it

2044609 there are some comments. Generally, you have to find all possible combinations of commands and chose the best of them.

  • n = 4 r = 5
  • TBTB 0 1 -> 1 1; 1 2; 3 2; 3 5; <- 0 mistakes
  • TTBT 0 1 -> 1 1; 2 1; 2 3; 5 3; <- 1 mistakes

first is better.

First step is T -> "1 1" . Last step is * -> "x r" or "r x". Check [1..r-1] for x. Calculate the number of commands "x r" -> "1 1" (when it's possible). Chose the best combination of commands.