[POJ 2482] Stars in Your Window(线段树+离散化+扫描线) Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11294 Accepted: 3091 Description Fleeting time does not blur my memory of you. Can it really be 4 years since I first saw you? I still remembe
题目不说了,可以用线段树或者单调队列,下面附上代码. 线段树: #include <iostream> #include <stdio.h> #include <algorithm> /* AC 线段树每个节点存储对应区间的最大值.最小值,然后直接查询即可.6594MS. */ using namespace std; ; const int INF=0x3f3f3f3f; int minans[maxn],maxans[maxn]; int small,bigger;
题目连接 http://poj.org/problem?id=2482 Description Fleeting time does not blur my memory of you. Can it really be 4 years since I first saw you? I still remember, vividly, on the beautiful Zhuhai Campus, 4 years ago, from the moment I saw you smile, as