jakaria_hossain

codeforces - 01 game

Jun 25th, 2020
1,056
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define fast()(ios_base::sync_with_stdio(0),cin.tie(NULL));
  5. int main()
  6. {
  7.     fast();
  8.     ll t;
  9.     cin>>t;
  10.     while(t--)
  11.     {
  12.         string s,x,y;
  13.         cin>>s;
  14.         ll cnt=0,i=0;
  15.         for(i;i<s.size();i++)
  16.         {
  17.             if(s[i]=='0')cnt++;
  18.         }
  19.         i=s.size()-cnt;
  20.         cnt=min(cnt,i);
  21.         if(cnt%2)cout<<"DA"<<endl;
  22.         else cout<<"NET"<<endl;
  23.     }
  24. }
RAW Paste Data