From 16efd7b4b5b7fb5aee0e85a0f15d8337010fab56 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Wed, 20 Apr 2016 18:05:41 +0800 Subject: [PATCH] From CSDN From http://blog.csdn.net/z309241990/article/details/19566625 --- POJ/3190_csdn.cpp | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 POJ/3190_csdn.cpp diff --git a/POJ/3190_csdn.cpp b/POJ/3190_csdn.cpp new file mode 100644 index 0000000..af8f42a --- /dev/null +++ b/POJ/3190_csdn.cpp @@ -0,0 +1,63 @@ +#include +#include +#include +#include +#include +using namespace std; +const int maxn=60000; +int n,use[maxn]; +struct Node +{ + int l; + int r; + int pos; + bool operator <(const Node &a)const + { + if(r==a.r) + return l>a.l; + return r>a.r; + } +}a[maxn]; +priority_queue q; +bool cmp(Node a,Node b) +{ + if(a.l==b.l) + return a.r