• + 0 comments

    IMPORTANT

    There is an issue with the C++ starter code.

    The function you are asked to complete takes vector<int> as input but the question stipulates that A[i] is less than 10^18, so int will not do, long is needed. - Change the function input to vector<long>, - Change the code in the main function to read longs using stol() instead of stoi()

    This question is well worded (in my opinion) and really rewarding otherwise. If you are stuck, research NIM, the Sprague Grundy function, and XOR.

    Always check the specifications :P