Processing math: 100%

XJOI Noip2016模拟赛1

tonyfang posted @ 2016年10月27日 21:59 in 随笔 with tags c++ OI , 1054 阅读

XJOI的模拟赛,(一个账号提前交卷了出了一些锅),不过还是顺利AK

【A 吉利挖矿】

【题解】这种题啊一看就是二分答案然后乱搞啦!

非常兹磁!O(nhlog ai,j)

 

【B 吉利的道路】

见xiaone校内训练Round1 T1:这里

【C 膜拜吉利】

【题解】对于操作1,我们可以暴力维护,操作2我们用类似于LCA的往上跳即可,因为膜拜吉利的人一定从下到上集中在几层里,所以就能维护啦,至于怎么维护从小到大?搞LCA的时候排排序啊,DFS序搞搞就行了。

因为会随时push,所以用priority_queue。

Tips: priority_queue<int, vector<int>, greater<int>>是小根堆。

 

 

pavzi.com 说:
2023年4月20日 19:39

With the assistance of the editorial and content teams, we supply you with the best web content on any topic imaginable.Pavzi Post is a startup founded by dedicated webmasters and bloggers who want to produce engaging pavzi.com material that is truthful, fascinating, and worth reading. We are more of a digital community where you can find various information, resources, and subjects about current events or news.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter