Submission #678398

#TimeUsernameProblemLanguageResultExecution timeMemory
678398ToxtaqJob Scheduling (CEOI12_jobs)C++17
0 / 100
166 ms4688 KiB
#include<bits/stdc++.h> using namespace std; int main() { int n, d, m; cin >> n >> d >> m; vector<int>v(m); for(int i = 0;i < m;++i)cin >> v[i]; int l = 1, r = m, ans = m; while(r >= l){ int mid = l + (r - l)/ 2; if((m + mid - 1)/ mid <= n){r = mid - 1;ans = min(ans, mid);} else l = mid + 1; } cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...