# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1114031 |
2024-11-18T06:34:07 Z |
Muhammet |
Gift (IZhO18_nicegift) |
C++17 |
|
183 ms |
22616 KB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define sz(v) (int)(v).size()
int main() {
ios::sync_with_stdio(false); cin.tie(nullptr);
ll n, k;
cin >> n >> k;
vector <ll> a(n+1);
for(int i = 1; i <= n; i++){
cin >> a[i];
}
if(n % k != 0){
cout << -1;
return 0;
}
cout << n/k << '\n';
for(int i = 1; i <= n; i += k){
cout << a[1] << " ";
for(int j = i; j < i+k; j++){
cout << j << ' ';
}
cout << '\n';
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Not all heaps are empty in the end |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Not all heaps are empty in the end |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Not all heaps are empty in the end |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
183 ms |
22616 KB |
n=1000000 |
2 |
Correct |
102 ms |
13352 KB |
n=666666 |
3 |
Correct |
57 ms |
7420 KB |
n=400000 |
4 |
Incorrect |
23 ms |
2640 KB |
Jury has the answer but participant has not |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Not all heaps are empty in the end |
2 |
Halted |
0 ms |
0 KB |
- |