| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1327191 | vahagng | 쌀 창고 (IOI11_ricehub) | C++20 | 0 ms | 332 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 = 0; i < R - 1; i++) {
int pos = (X[i] + X[i + 1]) / 2;
priority_queue<long long>pq;
for (int j = 0; j < R; j++) {
pq.push({ -abs(X[j] - pos) });
}
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... | ||||
