diff --git a/3025. Find the Number of Ways to Place People I 1 b/3025. Find the Number of Ways to Place People I 1 new file mode 100644 index 0000000..69d6b94 --- /dev/null +++ b/3025. Find the Number of Ways to Place People I 1 @@ -0,0 +1,38 @@ +class compare +{ +public: + bool operator()(vector &x,vector &y) + { + if(x[0]==y[0]) return x[1]>y[1]; + return x[0]>& points) { + sort(points.begin(),points.end(),compare()); + int count=0; + for(int i=0;i=points[j][1]) + { + valid=true; + } + else continue; + for(int k=i+1;k=points[k][1] && points[k][1]>=points[j][1] ) + { + valid=false; + break; + } + } + if(valid) count++; + } + } + return count; + } +};