# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1114030 |
2024-11-18T06:33:50 Z |
Muhammet |
Gift (IZhO18_nicegift) |
C++17 |
|
206 ms |
35660 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 |
206 ms |
35660 KB |
n=1000000 |
2 |
Correct |
123 ms |
22480 KB |
n=666666 |
3 |
Correct |
62 ms |
12872 KB |
n=400000 |
4 |
Incorrect |
28 ms |
6516 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 |
- |