# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
477089 | ogibogi2004 | 학교 설립 (IZhO13_school) | C++14 | 240 ms | 11312 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int MAXN=3e5+6;
int n,m,s;
struct city
{
ll a,b;
bool operator<(city const& other)const
{
if(a-b!=other.a-other.b)return a-b>other.a-other.b;
return make_pair(a,b)>make_pair(a,b);
}
};
city c[MAXN];
ll best1[MAXN],best2[MAXN];
priority_queue<ll>pq;
int main()
{
cin>>n>>m>>s;
for(int i=1;i<=n;i++)
{
cin>>c[i].a>>c[i].b;
}
sort(c+1,c+n+1);
best1[0]=0;
ll sum=0;
/*for(int i=1;i<=n;i++)
{
cout<<c[i].a<<" "<<c[i].b<<endl;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |