| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1330507 | hayford08 | 쌀 창고 (IOI11_ricehub) | C++20 | 1 ms | 344 KiB |
#include "ricehub.h"
using namespace std;
#include<bits/stdc++.h>
//solution to solve only subtask 1
int besthub(int R, int L, int X[], long long B)
{
int max_count = 0;
for(int i = 1; i <= L; i ++){
int count = 0;
int total = 0;
priority_queue<int,vector<int>,greater<int>> q;
for(int j = 0; j < R; j++){
q.push(abs(i-X[j]));
}
for(int m = 0; m < R; m++){
total += q.top();
q.pop();
if(total > B){
max_count = max(count, max_count);
break;
}
count ++;
}
}
return max_count;
}| # | 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... | ||||
