Pagini recente » Rating Nicol B (NicoletaB) | Cod sursa (job #2047239) | Monitorul de evaluare | Cod sursa (job #296331) | Cod sursa (job #1114064)
#include<fstream>
#include<set>
#include<algorithm>
using namespace std;
#define nmax 100010
ifstream f("lupu.in");
ofstream g("lupu.out");
struct oaie
{
int x;
int l;
} oi[nmax];
int n,x,d,k;
bool cmp(oaie a,oaie b)
{
return a.x<b.x;
};
struct comp
{
bool operator()(const int &a, const int &b)
{
return a>b;
}
};
multiset <int,comp> h;
long long ;
int main()
{
f>>n>>r>>d;
for(int i=1;i<=n;i++)
{
oaie a;
f>>a.x>>a.l;
if(a.x<=r)
oi[++k]=a;
}
sort(oi+1,oi+k+1);