Bitwise and of subarray sums problem

Правка en3, от Vovkaez, 2020-09-18 23:41:48

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


  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Vovkaez 2020-09-18 23:41:48 10
en2 Английский Vovkaez 2020-09-18 23:34:11 25 Tiny change: 'eq 2^{50}$' -> 'eq 2^{50}$\n\nTime limit is 0.4 sec'
en1 Английский Vovkaez 2020-09-18 23:32:37 459 Initial revision (published)