Bitwise and of subarray sums problem
Difference between en1 and en2, changed 25 character(s)
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 or of sums of subarrays is maximal. Print maximal or. ↵


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


Time limit is 0.4 sec

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Vovkaez 2020-09-18 23:41:48 10
en2 English Vovkaez 2020-09-18 23:34:11 25 Tiny change: 'eq 2^{50}$' -> 'eq 2^{50}$\n\nTime limit is 0.4 sec'
en1 English Vovkaez 2020-09-18 23:32:37 459 Initial revision (published)