Saleh127

Cf 1373B

Jun 25th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define fellow_junior ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. int main()
  7. {
  8. fellow_junior
  9. test
  10. {
  11. string a;
  12. int i,j,k,c=0,d=0,e,f;
  13. cin>>a;
  14. for(i=0;i<a.size();i++)
  15. {
  16. if(a[i]=='0') c++;
  17. else d++;
  18. }
  19. k=min(c,d);
  20. if(k%2) cout<<"DA\n";
  21. else cout<<"NET\n";
  22.  
  23. }
  24.  
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment