#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 time |
Memory |
Grader output |
1 |
Incorrect |
15 ms |
980 KB |
Output isn't correct |
2 |
Incorrect |
15 ms |
952 KB |
Output isn't correct |
3 |
Incorrect |
15 ms |
940 KB |
Output isn't correct |
4 |
Incorrect |
17 ms |
980 KB |
Output isn't correct |
5 |
Incorrect |
17 ms |
980 KB |
Output isn't correct |
6 |
Incorrect |
16 ms |
1100 KB |
Output isn't correct |
7 |
Incorrect |
17 ms |
980 KB |
Output isn't correct |
8 |
Incorrect |
15 ms |
936 KB |
Output isn't correct |
9 |
Incorrect |
15 ms |
824 KB |
Output isn't correct |
10 |
Incorrect |
15 ms |
852 KB |
Output isn't correct |
11 |
Incorrect |
19 ms |
1068 KB |
Output isn't correct |
12 |
Incorrect |
49 ms |
1716 KB |
Unexpected end of file - int32 expected |
13 |
Incorrect |
68 ms |
2344 KB |
Output isn't correct |
14 |
Incorrect |
84 ms |
2640 KB |
Unexpected end of file - int32 expected |
15 |
Incorrect |
92 ms |
3116 KB |
Output isn't correct |
16 |
Incorrect |
142 ms |
3404 KB |
Output isn't correct |
17 |
Incorrect |
152 ms |
3892 KB |
Output isn't correct |
18 |
Incorrect |
143 ms |
4168 KB |
Output isn't correct |
19 |
Incorrect |
166 ms |
4688 KB |
Output isn't correct |
20 |
Incorrect |
147 ms |
3792 KB |
Output isn't correct |