Submission #743105

#TimeUsernameProblemLanguageResultExecution timeMemory
743105vjudge1Rice Hub (IOI11_ricehub)C++17
0 / 100
22 ms2892 KiB
#include "ricehub.h" #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 1; priority_queue<long long, vector<long long>, greater<long long>> q; int besthub(int R, int L, int X[], long long B) { for(int i=0;i<R;i++) { q.push(abs(X[i] - X[R/2])); } long long ans = 0 , cou = 0; while (!q.empty()) { long long t = q.top(); q.pop(); cou += t; if (cou>B) break; ans++; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...