• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

Recommended Posts

L. Light of Stars

题解:题目比较明显的提示了二维数点,关键在于坐标的变换的推导,感觉是正常高中水平就可以推出,所以不在题解里赘述了(其实是画图太麻烦,懒的画)

#includebits/stdc .h

使用命名空间标准

#为(int i=(a)定义rep(i,a,b);IB;我)

#定义按钮推回

#定义db double

#定义ll龙龙

#首先定义船方不负担装货费用

#定义硒秒

#define all(x) x.begin(),x.end()

const db pi=acos(-1.0);

const int N=1e5 5

双EPS=1e-8;

向量对db,db点;

结构节点{

db fi,se;

进程号

};

向量节点角;

vectordb V;

int RES[N];

int C[N];

int低位(int x){ return x(-x);}

int query(int x){

int t=0;

for(;x;x-=低位(x))t=C[x];

return t;

}

void mofidy(int x,int d){

for(;xN;x=低位(x))C[x]=d;

返回;

}

(同Internationalorganizations)国际组织离散(数据库x){

return lower_bound(all(V),x)-V . begin()1;

}

int main(){

int n,k;

scanf('%d%d ',n,k);

点。调整大小(n);

角。调整大小(n);

rep(i,0,n)scanf('%lf%lf ',point).菲,点[我].se);

while(k - ){

五。clear();

memset(C,0,sizeof C);

db l,r;scanf('%lf%lf ',l,r);

db sl=sinl(l/180.0*pi),cl=cosl(l/180.0 * pi);

db sr=sinl(r/180.0*pi),Cr=cosl(r/180.0 * pi);

rep(i,0,n){

db x=点[我].fi;

数据库y=点[我].se;

pt.fi=x * sr y * cr

pt.se=x * sl y * cl

pt.id=I;

V.pb(pt.se);

}

sort(all(V));

V.erase(unique(all(V),[](db a,db b){ return fabs(a-b)=EPS;})、v . end());

sort(all(pt),[](Node a,Node b){

返回fabs(a.fi-b.fi)eps?纤维。fi : a SEB。se;

});

rep(i,0,n){

int yy=discrete(pt).第二-EPS);

决议,决议,决议.id]=查询(N-1)查询(YY-1);

mofidy(yy,1);

}

}

rep(i,0,n){

printf('%d ',RES);

}

printf(' \ n ');

}

Link to comment
Share on other sites