Help me out in this problem

#include<bits/stdc++.h>
using namespace std;
int main(){

int n;
cin>>n;
int ar[n];
for(int i=0;i<n;i++)
{
	cin>>ar[i];
}
set<int> s;
int count[n];

set<int>::iterator it;


for(int i=n-1;i>=0;i--)
{
	s.insert(ar[i]);
	
	count[i]=s.lower_bound(ar[i])-s.begin();
}
for(int i=0;i<n;i++)
{
	cout<<count[i]<<" ";
}

}
why it is giving ?
can anyone me the reason…

tell me why it is giving error?

Hi, I guess you asked the same question elsewhere.