The Brand New Function

2020 VietMX 0

Polycarpus has a sequence, consisting of n non-negative integers: a 1, a 2, …, a n. Let’s define function f(l, r) ( l, r are integer, 1 ≤ l ≤ r ≤ n) for sequence a as an operation of bitwise OR of all the sequence elements with indexes […]