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

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

Hi, I've encountered this problem in a contest which is already over, so I'd like to share it and see if you have any solution. I've been trying for about a week and still haven't found any good dp or backtracking solution.

Given array $$$a$$$ of $$$n$$$ integers, divide it into $$$m$$$ non-empty subarray so that bitwise and of sums of subarrays is maximal. Print maximal and.

$$$1 \leq n, m \leq 50$$$ $$$1 \leq a_i \leq 2^{50}$$$

Time limit is 0.4 sec

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

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