Pagini recente » Cod sursa (job #1748203) | Cod sursa (job #2765858) | Cod sursa (job #2836789) | Cod sursa (job #818620) | Cod sursa (job #1982133)
#include <fstream>
#include <algorithm>
using namespace std;
ifstream fin("proc2.in");
ofstream fout("proc2.out");
int n,x,l;
int d,a;
pair <int,int> v[100005];
int nh;
bool cmp(pair a,pair b)
{
return (a.first<b.first?1:0);
}
void urca(int p)
{
while (p>1) {
if (h[p]<h[p/2]) {
swap(h[p],h[p/2]);
p/=2;
}
}
}
void adauga(int x)
{
h[++nh]=x;
urca(x);
}
int main()
{
fin>>n>>x>>l;
for (int i=1;i<=n;i++) {
fin>>v[i].first>>v[i].second;
}
sort(v+1,v+n+1,cmp);
}