Comments
+1

ratings updated!

0

How do you check if you’re marked as unrated? Does it not display your rank or is there text somewhere that says it?

https://ide.usaco.guide/OXKfvhJptJSF_8NYFqW

input: 1 4 5 4 3 1 2 7 100000 1

The compiler here outputs 'YES'.

I found it! It arises from repeating from the 'r+1' index, which neglects index 'r'. Here's a test case that outputs "YES" on yours, which is incorrect: a=[101,100,011,001], b=[010,111,10101010,01].

Taking a look at index 3, $$$10101010$$$ of course cannot be created with XOR of any of the elements in array $$$a$$$. However, your algorithm looks at 101^100^011==010, and skips to index 4 without taking a look at index 3.

If I understand correctly, in the problem statement, it says the XOR operation can be performed at most once for each index.

Great problems!