Блог пользователя dario-dsa

Автор dario-dsa, 11 лет назад, По-английски

HI, I am having problem with figure it a fast way to solve this problem so can anyone help me?
http://codeforces.com/contest/243/problem/A

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

»
11 лет назад, # |
Rev. 2   Проголосовать: нравится +6 Проголосовать: не нравится

For each R, there are at most log(106) distinct values of F(L, R). For k-th bit, we find max(i | i <= R and (bit k in a[i] = 1)). These will be all possible values of L.