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

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

This problem was asked by Goldman Sachs yesterday for hiring interns at IIT Kharagpur:
Given a N x 3 grid with numbers written in the cells. You have K, 2 x 1 tiles which you can put to cover some cells. The numbers written on those two cells is added to your score which was initially zero. Find the maximum possible score you can achieve.The tiles can be placed horizontally or vertically.

Constraints:
1<=N<=1000
1<=K<=1000
Example:
N = 2
K = 2
0 4 1
1 0 4
Ans = (4 + 1) + (0 + 4)

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

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