标签:color 离散化 style unique 离散 prepare bsp code sort
void prepare(int *x) { fo(i,1,n) data[i]=x[i]; sort(data+1,data+n+1); int m=unique(data+1,data+n+1)-data-1; fo(i,1,n) x[i]=lower_bound(data+1,data+m+1,x[i])-data; }
标签:color 离散化 style unique 离散 prepare bsp code sort
原文地址:https://www.cnblogs.com/lishengkangshidatiancai/p/10505634.html