牛客等级之题N2(8.4场)

#include <iostream>

using namespace std;

int main()
{
    
    
    int n;
    cin >> n;
    for (int i = 0;i < n;i++)
    {
    
    
        int ans = 0x0;
        int temp;
        while (1)
        {
    
    
            cin >> temp;
            if (0 == temp)
            {
    
    
                break;
            }
            else
            {
    
    
                ans ^= temp;
            }
        }

        if (ans == 0x0)
        {
    
    
            cout << "Yes" << endl;
        }
        else
        {
    
    
            cout << "No" << endl;
        }
    }
    return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_32862515/article/details/107781728