已经堕落到转载模板了是么?
哎……
cty
void prepare(int *x)
{
fo(i,1,n) d[i] = x[i];
sort(d + 1,d + 1 + n);
int m = unique(d + 1,d + 1 + n) - d - 1;
fo(i,1,n) x[i] = lower_bound(d + 1,d + m + 1,x[i]) - d;
}
已经堕落到转载模板了是么?
哎……
cty
void prepare(int *x)
{
fo(i,1,n) d[i] = x[i];
sort(d + 1,d + 1 + n);
int m = unique(d + 1,d + 1 + n) - d - 1;
fo(i,1,n) x[i] = lower_bound(d + 1,d + m + 1,x[i]) - d;
}