#include <iostream>
#include <map>
#include <deque>
#include <vector>
#define int long long int
using namespace std;
const int maxN = 1e6 + 326;
map<int, deque<int>> mp;
vector<vector<int>> ans;
int N, K, arr[maxN];
int sm[maxN];
struct Obj{
int num;
deque<int> poss;
Obj(){}
Obj(int num, deque<int> dq): num(num), poss(dq){}
};
deque<Obj> has[maxN];
signed main(){
cin >> N >> K;
for(int i = 1; i <= N; i++){
cin >> arr[i];
}
if(N % K){
cout << -1 << endl;
return 0;
}
cout << N / K << endl;
for(int i = 1; i <= N; i += K){
cout << arr[1] << " ";
for(int j = i; j < i + K; j++) cout << j << " ";
cout << endl;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
324 ms |
524292 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
324 ms |
524292 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
324 ms |
524292 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
315 ms |
524292 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
324 ms |
524292 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |