#include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef string str; #define ALL(x) (x).begin(),(x).end() #define RALL(x) (x).rbegin(),(x).rend() #define MAX_LL (1LL<<62) #define MOD 998244353 ll max(const ll &a, const ll &b) {if(a>b) return a; else return b;} ll min(const ll &a, const ll &b) {if(ab) a %= b; else b %= a;}} ull pow_mod(ull a, ull b, ull mod=-1) {if(mod<2) return 0; ull ans=1, now=a; while(b>0){if(b%2) ans=(ans*now)%mod; now=(now*now)%mod; b/=2;} return ans;} bool update_max(ll &a, const ll &b) {if(ab){a=b; return true;} else return false;} bool update_min(ld &a, const ld &b) {if(a>b){a=b; return true;} else return false;} ll upper_char_to_ll(const char &c) {return ll(c)-65;} int main() { ll N; cin >> N; vector A(N); for(ll i=0; i> A[i]; } vector> sortedA(N); for(ll i=0; i pair_counts(N); ll border = 0; for(ll i=1; i pair_counts_running_totals(N); pair_counts_running_totals[0] = pair_counts[0]; for(ll i=1; i answers; for(ll i=0; i= border) answers.push_back(i+1); } cout << answers.size() << endl; for(ll i=0; i