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

Автор michaelalan, 11 лет назад, По-английски

In 289B - Пингвин Поло и матрица, there is a sentence "In one move the penguin can add or subtract number d from some matrix element". And the output is "the minimum number of moves the penguin needs to make all matrix elements equal". But the first sample input seems not fit that:
input:

2 2 2
2 4
6 8

output:

4

In my opinion, only 3 moves are needed:

2 4       2 2      2 2       2 2
6 8  -->  4 6  --> 2 4  -->  2 2 

Is there any misunderstanding? Plz help me.

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

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

It is allowed to modify only one value in one step. For example, in first step you modify three values (4->2, 6->4 and 8->6).

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

It should be: "In one move the penguin can add or subtract number d from one matrix element"

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

I'm not native English speaker, but it seems OK for me, because I'd write ... from some matrix element**s** if it's allowed to decrease more than one number

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

    Oh. How careless I am. I only focused on word "some", and ignored the word "element"(not "elements"!).