답안 #409889

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
409889 2021-05-21T18:34:35 Z Dan4Life 쌀 창고 (IOI11_ricehub) C++17
컴파일 오류
0 ms 0 KB
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long

ll besthub(ll n, ll m, ll a[], ll k)
{
    ll ans = 0;
    for(int i = 0; i < n; i++){
        multiset<int> S; S.clear();
        for(int j = 0; j < n; j++)
            S.insert(abs(a[i]-a[j]));
        ll K = k, cnt = 0;
        while(!S.empty() and K>=(*S.begin()))
            cnt++, k-=(*S.begin()), S.erase(S.begin());
        if(ans<cnt)ans=cnt;
    }
    return ans;
}

int main() {
	ll n, m, a[100], k; cin >> n >> m >> k;
	for(int i = 0; i < n; i++) cin >> a[i];
	cout << besthub(n,m,a,k);
}

Compilation message

ricehub.cpp:1:10: fatal error: grader.h: No such file or directory
    1 | #include "grader.h"
      |          ^~~~~~~~~~
compilation terminated.