题目大意:
给出很多条分布在 x 轴上的线段。
然后给出很多点集,问这些点集分布在多少条不同的线段上。
思路分析:
把点集分散成若干条线段。
如果点集做出的线段包含了某一条给出的线段的话,也就是说这个点集上不会有点在这条线段上。
所以我们就是求出 点集做出的线段包含了多少个给出的线段就可以了。
那么也就是比较l r的大小,排序之后用BIT
#include
#in...
分类:
其他好文 时间:
2014-07-23 17:06:02
阅读次数:
193
A - Rewards 1 #include 2 #include 3 using namespace std; 4 int main(){ 5 int a[3], b[3], sum1 = 0, sum2 = 0; 6 int n; 7 for( int i = 0; i ...
分类:
其他好文 时间:
2014-07-23 14:46:36
阅读次数:
350
JS比较好用的一些方法搜集Math.ceil(x)-- 返回大于等于数字参数的最小整数(取整函数),对数字进行上舍入Math.floor(x)--返回小于等于数字参数的最大整数,对数字进行下舍入 join() 例:var a = ["a","b","c"]; 若要输出"a,b,c" 需要...
分类:
Web程序 时间:
2014-07-23 14:46:16
阅读次数:
325
题目大意:
n个女性中,如果有一个女性的三维比这个女性的三维...
分类:
其他好文 时间:
2014-07-23 13:39:06
阅读次数:
272
基本思路:使用定时器让物体向右运动,在运动的过程中再不是匀速运动,而是先快后慢,但是到达终点的时候,必须注意要使用向上取整函数Math.ceil()和向下取整函数Math.floor();这样才能够正确无误地到达终点,而不是有出入。
#div1{
width:100px;
height:100px;
background:red;
position:ab...
分类:
Web程序 时间:
2014-07-23 13:36:26
阅读次数:
224
Sunny Cup 2003 - Preliminary Round
April 20th, 12:00 - 17:00
Problem E: QS Network
In the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicate with each...
分类:
其他好文 时间:
2014-07-23 13:14:06
阅读次数:
288
1.Round(四舍六入五留双) 功能说明:对一个实数进行四舍五入。(按照银行家算法) 例: var ??? i, j: Integer; begin ??? i := Round(1.5); // i等于2 ??? j := Round(2.5); // j等于2 end; 在Delphi中...
分类:
其他好文 时间:
2014-07-23 00:34:38
阅读次数:
236
逃生反向拓扑+优先队列+逆序输出注意一个样例input:13 13 1answer:3 1 2而不是2 3 1#include#include#include#include#include#include#define MAXN 30005using namespace std;vector g....
分类:
其他好文 时间:
2014-07-22 23:36:57
阅读次数:
354
项目管理Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 738Accepted Submission(s): 260Problem Descript...
分类:
其他好文 时间:
2014-07-22 22:37:12
阅读次数:
210
A strange liftDescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 2 #include 3 #include 4....
分类:
Web程序 时间:
2014-07-22 22:36:54
阅读次数:
329