# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
290344 | ngotienhung | K blocks (IZhO14_blocks) | C++14 | 197 ms | 42872 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define pb push_back
using namespace std;
const int maxN = 1e5 + 5;
const int maxK = 105;
const int inf = 1e9 + 10;
int n,k;
int a[maxN], L[maxN], minn[maxN], f[maxK][maxN];
int main()
{
ios_base::sync_with_stdio(false); cin.tie(); cout.tie();
cin >> n >> k;
for (int i = 1; i <= n; ++i)
cin >> a[i];
memset(f, inf, sizeof f);
f[1][0] = 0;
for (int i = 1; i <= n; ++i)
f[1][i] = max(f[1][i - 1], a[i]);
int tmp;
for (int i = 2; i <= k; ++i) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |