Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <set>
- using namespace std;
- int main()
- {
- int n, x;
- cin >> n;
- set<int> s;
- for (int i = 0; i < n; i++)
- {
- cin >> x;
- s.insert(x);
- }
- if (s.size() == n)
- cout << "YES";
- else
- cout << "NO";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement