Submission #343226

# Submission time Handle Problem Language Result Execution time Memory
343226 2021-01-03T14:41:31 Z Sprdalo Gift (IZhO18_nicegift) C++17
0 / 100
327 ms 22560 KB
#include <bits/stdc++.h>

using namespace std;

#define int ll
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<pi> vp;
typedef vector<pl> vpl;

signed main()
{
    ios_base::sync_with_stdio(false); 
    cin.tie(nullptr); 
    cout.tie(nullptr); 
    cerr.tie(nullptr);    

    int n, k;
    cin >> n >> k;

    vi a(n);
    for (auto& i : a)
        cin >> i;

    if (n%k) return cout << "-1\n", 0;

    cout << n/k << '\n';
    for (int i = 1; i <= n; i+=k){
        cout << a[0] << ' ';
        for (int j = i; j < i+k; ++j)
            cout << j << ' ';
        cout << '\n';
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 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 364 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 364 KB Not all heaps are empty in the end
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 327 ms 22560 KB n=1000000
2 Correct 201 ms 13420 KB n=666666
3 Correct 110 ms 7404 KB n=400000
4 Incorrect 45 ms 2540 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 364 KB Not all heaps are empty in the end
2 Halted 0 ms 0 KB -