222802026-01-14 19:55:04hunzombiNegáló rendezés (55 pont)cpp17Compilation error
#include <bits/stdc++.h>
using namespace std;

typedef vector<int> vi;
typedef long long ll;

const ll MOD = 1e7 + 9;

int main()
{
    int n;
    cin >> n;

    vi vec(n);

    for (ll &x : vec) cin >> x;

    sort(vec.begin(), vec.end(), greater<int>());

    ll res = 1;
    ll prev = vec[0], cnt = 1;
    for (ll i=1; i < n; i++) {
        if (vec[i] != prev) {
            res = (res * (cnt + 1LL)) % MOD;
            cnt = 0LL;
        }
        cnt++;
        prev = vec[i];
    }

    cout << res << '\n';

    return 0;
}
Compilation error
open /var/local/lib/isolate/415/box/a.out: no such file or directory
main.cpp: In function 'int main()':
main.cpp:16:18: error: cannot bind non-const lvalue reference of type 'll&' {aka 'long long int&'} to a value of type 'int'
   16 |     for (ll &x : vec) cin >> x;
      |                  ^~~