| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1365849 | biserailieva | Data Centers (EGOI22_datacenters) | C++20 | 2064 ms | 3104 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, s;
cin >> n >> s;
priority_queue<long long> pq;
for (int i = 0; i < n; i++) {
long long x;
cin >> x;
pq.push(x);
}
while (s--) {
long long m, c;
cin >> m >> c;
vector<long long> temp;
for (long long i = 0; i < c; i++) {
long long x = pq.top();
pq.pop();
temp.push_back(x - m);
}
for (auto x : temp) pq.push(x);
}
vector<long long> res;
while (!pq.empty()) {
res.push_back(pq.top());
pq.pop();
}
sort(res.rbegin(), res.rend());
for (auto x : res) cout << x << ' ';
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
