# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
343681 | _ani | K blocks (IZhO14_blocks) | C++17 | 656 ms | 82788 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.
#define BUGO(x) cerr << #x << " = " << (x) << '\n';
#include <iostream>
#include <algorithm>
#include <stack>
#include <vector>
using namespace std;
using ll = long long;
const int N = 100'002;
const int K = 20;
const ll inf = 1'000'000'000'000'000'000LL;
ll dp[N][102], a[N];
struct el {
ll x; int ind;
};
bool operator<(const el& a, const el& b) {
return a.x < b.x;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, k;
cin >> n >> k;
for (int i = 1; i <= n; i++)
cin >> a[i];
for (int i = 0; i <= n; i++)
for (int curk = 1; curk <= k; curk++)
dp[i][curk] = inf;
for (int curk = 1; curk <= k; curk++) {
# | 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... |