# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
676590 | QwertyPi | Schools (IZhO13_school) | C++14 | 224 ms | 17512 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 int long long
using namespace std;
struct area{
int a, b;
};
int32_t main(){
int N, M, S;
cin >> N >> M >> S;
vector<area> A;
for(int i = 0; i < N; i++){
int a, b; cin >> a >> b;
A.push_back({a, b});
}
sort(A.begin(), A.end(), [](area x, area y){
return x.a > y.a;
});
int ans = 0;
for(int i = 0; i < M; i++){
ans += A[i].a;
}
priority_queue<pair<int, int>> pq, pqe, pq1, pq1e, pq2, pq2e;
for(int i = M; i < N; i++){
pq.push({A[i].a, i});
}
for(int i = 0; i < M; i++){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |