| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 165794 | reda | Job Scheduling (CEOI12_jobs) | C++14 | 854 ms | 18364 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define vct vector
#define pii pair<int,int>
#define all(a) a.begin(),a.end()
#define se second
using namespace std ;
vct <pii> v;
int main ()
{
int n , m , d ;
cin >> n >> d >> m ;
int arr[m];
for(int i =0 ;i <m;i++)
{
int k;
cin >>k;
v.pb(mp(k,i+1));
}
sort(all(v));
int ans = ceil(m/n +0.5);
cout<<ans<<endl;
for(int i= 0 ;i <n ;i++)
{
if(i<n-d){
for(int j=0;j<ans;j++)
{
cout<<v[i+j].se<<' ';
}
cout<<0<<endl;
}
else cout<<0<<endl;
}
return 0 ;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
