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

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

In 289B - Polo the Penguin and Matrix, 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
  • Проголосовать: не нравится

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

What is it ? Which kind of features it has? Thanks :-)

Полный текст и комментарии »

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