| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1327190 | vahagng | Rice Hub (IOI11_ricehub) | C++20 | 1094 ms | 432 KiB |
#include "ricehub.h"
#include <bits/stdc++.h>
using namespace std;
int besthub(int R, int L, int X[], long long B){
if (R == 1) {
return 1;
}
int ans = 0;
for (int i = 1; i <= L; i++) {
priority_queue<long long>pq;
for (int j = 0; j < R; j++) {
pq.push({ -abs(X[j] - i) });
}
long long cur = B;
int c = 0;
while (!pq.empty()){
auto C = pq.top();
pq.pop();
if(cur + C < 0) break;
cur += C;
c++;
}
ans = max(ans, c);
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
