| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1215913 | kunzaZa183 | 쌀 창고 (IOI11_ricehub) | C++20 | 1093 ms | 992 KiB |
#include <bits/stdc++.h>
#include "ricehub.h"
using namespace std;
using ll = long long;
int besthub(int R, int L, int X[], long long B) {
int maxans = 1;
for (int i = 0; i < R; i++) {
vector<ll> vll;
for (int j = 0; j < R; j++)
if (j != i) vll.push_back(abs(X[i] - X[j]));
sort(vll.begin(), vll.end());
ll cur = 0;
for (int i = 0; i < vll.size(); i++)
if (cur + vll[i] > B) {
maxans = max(maxans, i + 1);
goto A;
} else
cur += vll[i];
maxans = max(maxans, R);
A:;
}
return maxans;
}
| # | 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... | ||||
