Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

pairs (i,j) s.t. i^j = k

Revision en1, by zeref_dragoneel, 2016-07-16 03:19:39

number of pairs (i,j) s.t. 1<=i<=n, 1<=j<=m s.t. i^j = k in O(max(log n, log m)). I am able to do it in min(n,m).

Tags xor, number theory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English zeref_dragoneel 2016-07-16 03:19:39 137 Initial revision (published)