Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int n;
- int t[1000000];
- int main()
- {
- ios_base::sync_with_stdio(0);
- cin >> n;
- for (int i=1; i<=n; i++)
- {
- cin >> t[i];
- }
- sort (t, t+n);
- for (int i=1; i<=n-1; i++)
- {
- if (t[i]==t[i+1])
- {
- cout << "NIE";
- return 0;
- }
- if ((t[i]+1)!=(t[i+1]))
- {
- cout << "NIE";
- return 0;
- }
- }
- cout << "TAK";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement