SRM 543 EllysXors
● Problem Statement
● XOR problems became very popular in
TopCoder recently. (If you do not know
the bitwise operation XOR, see the
Notes section for an explanation.)
That's why Elly decided to invent one
of her own. Fortunately for you, the
one she came up with is quite simple.
You are given two longs L and R. She
wants you to find the XOR of all
numbers between L and R, inclusive.
姫路 IT 系勉強会 Vol. 6 @kakkun61 30/82
31.
SRM 543 EllysXors
● 要点だけ日本語に訳すと、
● L と R を与えるから、
● L ⊕L+1 ⊕... ⊕R を求めよ
1 ≦ L, R ≦ 4,000,000,000
●
ただし、
L ≦R
●
●
姫路 IT 系勉強会 Vol. 6 @kakkun61 31/82