Submission #874471

# Submission time Handle Problem Language Result Execution time Memory
874471 2023-11-17T06:41:20 Z vjudge1 Job Scheduling (CEOI12_jobs) C++17
0 / 100
190 ms 3940 KB
#include <bits/stdc++.h>
using namespace std;
const int mxn=1e6+5;
int n,m,d,a[mxn];
int main(){
	cin>>n>>d>>m;
	for(int i=1;i<=m;i++){
		cin>>a[i];
	}
	a[m+1]=1e9;
	sort(a+1,a+m+1);
	int l=0,r=m;
	while(r-l>1){
		//cout<<r<<" "<<l<<endl;
		int mid=(l+r)/2,p=1;
		for(int i=1;i<=n;i++){
			int cnt=0;
			while(cnt<mid && a[p]<=i){
				cnt++;
				p++;
			}
		}
		if(p>m){
			r=mid;
		}
		else{
			l=mid;
		}
	}
	cout<<r<<endl;
}
# Verdict Execution time Memory Grader output
1 Incorrect 16 ms 2652 KB Output isn't correct
2 Incorrect 15 ms 2652 KB Output isn't correct
3 Incorrect 15 ms 2652 KB Output isn't correct
4 Incorrect 15 ms 2672 KB Output isn't correct
5 Incorrect 15 ms 2652 KB Output isn't correct
6 Incorrect 15 ms 2652 KB Output isn't correct
7 Incorrect 15 ms 2652 KB Output isn't correct
8 Incorrect 14 ms 2652 KB Output isn't correct
9 Incorrect 16 ms 2652 KB Output isn't correct
10 Incorrect 17 ms 2652 KB Output isn't correct
11 Incorrect 20 ms 2672 KB Unexpected end of file - int32 expected
12 Incorrect 43 ms 2808 KB Unexpected end of file - int32 expected
13 Incorrect 58 ms 2648 KB Unexpected end of file - int32 expected
14 Incorrect 97 ms 2900 KB Unexpected end of file - int32 expected
15 Incorrect 95 ms 2652 KB Unexpected end of file - int32 expected
16 Incorrect 138 ms 2652 KB Unexpected end of file - int32 expected
17 Incorrect 163 ms 3156 KB Unexpected end of file - int32 expected
18 Incorrect 154 ms 3416 KB Output isn't correct
19 Incorrect 190 ms 3940 KB Output isn't correct
20 Incorrect 166 ms 3180 KB Unexpected end of file - int32 expected