(2)b>c>=a 形成ABAB,记录之
(3)c>=b 不知道(a,b) (c,d) 该取哪个 那么都存下先,等着下一个数读入作处理
//#pragma comment(linker, "/STACK:102400000,102400000")#include <cstdio>#include <cstring>#include <algorithm>#include <string>#include <iostream>#include <map>#include <vector>using namespace std;#define ls(rt) rt*2#define rs(rt) rt*2+1#define ll long long#define ull unsigned long long#define rep(i,s,e) for(int i=s;i<e repe for i="s;i<=e;i++)#define" cl memset in freopen out ll ll_inf="((ull)(-1))">>1;const double EPS = 1e-8;const int INF = 100000000;const int MAXN = 500000+100;struct Node{ int l,r; int x;}nodes[MAXN];map<int int>pos,cnt;vector<int>b;int num[MAXN],n,top;void read(){ b.clear(); top=0; for(int i=1;i0) { int bl=nodes[top-1].l, br=nodes[top-1].r, bx=nodes[top-1].x; if(l>bl && l <br> <br> <p></p> <p><br> </p> <p><br> </p> </int></int></e></vector></map></iostream></string></algorithm></cstring></cstdio>