# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
84463 | farukkastamonuda | Schools (IZhO13_school) | C++14 | 393 ms | 31472 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define lo long long
#define inf 1000000000
#define md 1000000007
#define pb push_back
#define li 300005
#define ii pair<lo int,lo int>
using namespace std;
lo int n,m,ss,cev;
pair<lo int,lo int> A[li];
priority_queue<lo int> q;
multiset< pair<lo int,lo int> > s,t;
int main(){
scanf("%lld %lld %lld",&n,&m,&ss);
for(int i=1;i<=n;i++){
scanf("%lld %lld",&A[i].fi,&A[i].se);
}
sort(A+1,A+n+1);
reverse(A+1,A+n+1);
for(int i=1;i<=m;i++){
cev+=A[i].fi;
q.push(A[i].se-A[i].fi);
}
for(int i=m+1;i<=n;i++){
s.insert(mp(A[i].fi,A[i].se));
t.insert(mp(A[i].se,A[i].fi));
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |