Pagini recente » Cod sursa (job #3188929) | Cod sursa (job #1854082) | Cod sursa (job #346123) | Cod sursa (job #3181327) | Cod sursa (job #2194127)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("cmap.in");
ofstream fout("cmap.out");
vector<pair<int,int> >points;
int n,x,y;
bool cmp(pair<int,int>a,pair<int,int>b)
{
if(a.first==b.first)
return a.second<b.second;
return a.first<b.first;
}
long double divide(int pos1,int pos2)
{
if(pos2-pos1>3)
{
long double s=min(divide(pos1,(pos1+pos2)/2),divide((pos1+pos2)/2+1,pos2));
}
}
int main()
{
fin>>n;
for(int i=1;i<=n;i++)
{
fin>>x>>y;
points.push_back({x,y});
}
sort(points.begin(),points.end(),cmp);
fout<<divide(0,n-1);
return 0;
}