| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1365793 | biserailieva | Data Centers (EGOI22_datacenters) | C++20 | 2091 ms | 6868 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, s;
cin >> n >> s;
multiset<long long> ms;
for (int i = 0; i < n; i++) {
long long x;
cin >> x;
ms.insert(x);
}
while (s--) {
long long m, c;
cin >> m >> c;
vector<long long> temp;
for (long long i = 0; i < c; i++) {
auto it = prev(ms.end());
long long val = *it;
ms.erase(it);
temp.push_back(val - m);
}
for (auto x : temp) ms.insert(x);
}
vector<long long> res(ms.begin(), ms.end());
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... | ||||
