# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1101724 | vanea | Split the sequence (APIO14_sequence) | C++14 | 63 ms | 131072 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>
using namespace std;
using ll = long long;
using ld = long double;
const int mxN = 1e5+10;
const int mxK = 215;
ll m[mxN], dp[mxN][mxK];
int last[mxN][mxK];
ld intercept(int x, int y, int k) {
return (ld)(dp[y][k]-dp[x][k])/(ld)(m[x]-m[y]);
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
vector<ll> v(n+1), pref(n+5);
for(int i = 1; i <= n; i++) {
cin >> v[i];
pref[i] = pref[i-1]+v[i];
}
vector<deque<int>> q(k+5);
q[0].push_back(0);
for(int i = 1; i < n; i++) {
for(int j = min(k, i); j >= 1; j--) {
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |