JZ高中OJ 6274. [NOIP提高组模拟1]梦境
input: dream.in output: dream.out Time Limits: 1000 ms Memory Limits: 262144 KB Detailed Limits Description Input Output Sample Input 2 2 1 3 2 4 1 3 Sample Output 2 Data Constraint Hint 1 #include<bits/stdc++.h> 2 using namespace std; 3 struct A 4 { 5 long l,r; 6 bool operator < (A w) const 7 { 8 return r>w.r; 9 } 10 }b[200010]; 11 priority_queue<A>q; 12 long n,m,a[200010],now=1,tot=0,ans=0; 13 bool ss (A t1,A t2) 14 { 15 return t1.l<t2.l; 16 } 17 int main() 18 { 19 freopen("dream.in","r",stdin); 20 freopen("dream.out","w",stdout); 21 scanf("%ld %ld",&n,&m); 22 for(int i=1;i<=n;i++) scanf("