题:https://codeforces.com/contest/1311/problem/F 题意:给定x轴上的点以及他们的速度v,只在x轴上运动,求最小的dis之和,注意,这里的时间是可随意的,比如对于其中一个点 i 来说,只要其他点运动到离自己距离最小即可,而不是同步运动 分析:对于一对点 i 和 j 来说,以点 i 为基准,要是xj<xi,那么只要vj>xi就可以让dis为0,要是xj>xi,,那么只要vj<vi就可以让dis为0,其他情况就俩者不动就能保持dis最小为ab…
题目链接:http://acdream.info/problem?pid=1197 题意:给出三维空间n个点,m个查询,每次查询某个立方体内的点的个数. 思路:按照一维排序,根据查询插入,其他两位用二位树状数组维护.由于这个坐标太大,二位数组开不出来.这时候就是hash,对于一个位置(x,y),哈希成一个数,作为下标.查询的时候不存在的数字为0. const int mod=4000007; const int INF=1000000005; const int N=100005; const…
Problem Description Now I am leaving hust acm. In the past two and half years, I learned so many knowledge about Algorithm and Programming, and I met so many good friends. I want to say sorry to Mr, Yin, I must leave now ~~>.<~~. I am very sorry, we…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1892 See you~ Time Limit: 5000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 4178 Accepted Submission(s): 1317 Problem Description Now I am leaving hust acm. I…
描述 Now I am leaving hust acm. In the past two and half years, I learned so many knowledge about Algorithm and Programming, and I met so many good friends. I want to say sorry to Mr, Yin, I must leave now ~~>.<~~. I am very sorry, we could not advanc…
Stars Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8938 Accepted Submission(s): 3551 Problem Description Astronomers often examine star maps where stars are represented by points on a plan…