#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 ;
}
Compilation message
jobs.cpp: In function 'int main()':
jobs.cpp:14:10: warning: unused variable 'arr' [-Wunused-variable]
int arr[m];
^~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
75 ms |
2200 KB |
Output isn't correct |
2 |
Incorrect |
76 ms |
2104 KB |
Output isn't correct |
3 |
Incorrect |
74 ms |
2232 KB |
Output isn't correct |
4 |
Incorrect |
79 ms |
2172 KB |
Output isn't correct |
5 |
Incorrect |
75 ms |
2156 KB |
Output isn't correct |
6 |
Incorrect |
79 ms |
2120 KB |
Output isn't correct |
7 |
Incorrect |
74 ms |
2156 KB |
Output isn't correct |
8 |
Incorrect |
75 ms |
2140 KB |
Output isn't correct |
9 |
Incorrect |
334 ms |
2892 KB |
Output isn't correct |
10 |
Incorrect |
329 ms |
3052 KB |
Output isn't correct |
11 |
Partially correct |
64 ms |
2284 KB |
Partially correct |
12 |
Incorrect |
123 ms |
3956 KB |
Output isn't correct |
13 |
Partially correct |
186 ms |
6076 KB |
Partially correct |
14 |
Incorrect |
294 ms |
8028 KB |
Output isn't correct |
15 |
Incorrect |
309 ms |
9692 KB |
Output isn't correct |
16 |
Partially correct |
444 ms |
12356 KB |
Partially correct |
17 |
Partially correct |
505 ms |
14160 KB |
Partially correct |
18 |
Incorrect |
529 ms |
15440 KB |
Output isn't correct |
19 |
Incorrect |
854 ms |
18364 KB |
Output isn't correct |
20 |
Partially correct |
512 ms |
14288 KB |
Partially correct |