Cod sursa(job #1114064)
Utilizator | Data | 21 februarie 2014 11:23:27 | |
---|---|---|---|
Problema | Lupul Urias si Rau | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.51 kb |
#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);