Milosz0542

Untitled

Dec 4th, 2021
525
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. int main() {
  4. int n;
  5. std::cin>>n;
  6. int k[n];
  7. for(int i = 0; i<n; i++){
  8.     std::cin>>k[i];
  9. }
  10. int x[1000001];
  11. for( int i = 0; i < 1000001; i++ ) x[i] = 0;
  12. for(int i = 0; i<n; i++) {
  13.     x[k[i]]++;
  14. }
  15. int y = 0;
  16. for(int i = 0; i<1000001; i++) {
  17.     if( x[i]%2 == 1 ) y++;
  18. }
  19. if(y<=1) std::cout<<"TAK";
  20. else std::cout<<"NIE";
  21. return 0;
  22. }
RAW Paste Data