| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1368330 | hahaha | Data Centers (EGOI22_datacenters) | C++20 | 259 ms | 1584 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ff first
#define ss second
#define pb push_back
const int N=1e5+7;
int n,s,m,c;
vector<int> hea;
signed main(){
cin>>n>>s;
make_heap(hea.begin(), hea.end());
for(int i=0; i<n; i++){
int x;
cin>>x;
hea.pb(x);
}
int mx=0;
queue<int>q;
while(s--){
int m,c;
cin>>m>>c;
for(int i=c; i>0; i--){
q.push(hea.front()-m);
pop_heap(hea.begin(), hea.end());
hea.pop_back();
}mx+=c;
while(!q.empty()){
hea.pb(q.front());
push_heap(hea.begin(), hea.end());
q.pop();
}
}
for(auto i: hea)
cout<<i<<" ";
cout<<endl;
}| # | 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... | ||||
