#include #include #include using namespace std; const int maxn=105; struct Node { double L,R; }; inline bool operator<(const Node &a,const Node &b) { return a.L0&&a[q[cnt-1]].R>=a[i].R) cnt--; q[cnt++]=i; } double last=-10000000; for(int i=0;ilast) { res++; last=a[q[i]].R; } printf("%d\n",res); return 0; }