acmicpc-asia-tokyo-regional-contestC-Shopping(贪心)
题目链接http://codeforces.com/gym/100803/attachments这道题的思路就是先按照第一个排序,把有重合的区间合并就好了AC代码#include
#include
#include
#include
usingnamespacestd;
#defineinf999999
structnode{
intx,y;
}p1[1010],p2[1010];
boolcmp