Time limit in a test case

Here is the link of the problem https://cses.fi/problemset/task/1621/

And this is my code

int main()
{
    ll n;

    cin >> n;
    
    unordered_set<int> s;

    for (int i = 0; i < n; i++)
    {
        ll x;

        cin >> x;
        s.insert(x);
    }
    cout << s.size() << endl;
    
}

I have time limit in one of the test cases

1 Like