Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define nl "\n"
- main()
- {
- ios_base::sync_with_stdio(false);
- cin.tie(NULL);
- int test, ind=1;
- cin>>test;
- while(ind<=test)
- {
- long long int n, i, checker=0;
- cin>>n;
- long long int arr1[n], arr2[n];
- for(i=0; i<n; i++)
- {
- cin>>arr1[i];
- cin>>arr2[i];
- }
- for(i=0; i<n; i++)
- {
- checker^=abs(arr1[i]-arr2[i]-1)%2;
- }
- // cout<<checker<<nl;
- if(checker)
- cout<<"Case "<<ind<<": "<<"white wins"<<nl;
- else
- cout<<"Case "<<ind<<": "<<"black wins"<<nl;
- ind++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment