#include using namespace std; typedef long long ll; #define pb push_back #define fi first #define se second typedef pair P; using VP = vector

; using VVP = vector; using VI = vector; using VVI = vector; using VVVI = vector; const int inf=1e9+7; const ll INF=1LL<<60; const ll mod=1e9+7; ll gcd(ll a,ll b){ if(a>n; ll a[n]; for(i=0;i>a[i]; map ma,ma2; ma[a[0]]=1; for(i=1;ifirst,a[i])]+=it->second; } ma2[a[i]]++; ma=ma2; } cout<