# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
206890 | tuna | Split the sequence (APIO14_sequence) | C++11 | 0 ms | 0 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;
#define int long long
typedef pair <int, int> ii;
const int N = 1e5 + 5, oo = 1e18, K = 200;
int a[N], suf[N], pref[N], n, dp[2][N], trace[N][K];
struct Line {
int a, b, id;
Line() {}
Line(int _a, int _b, int _id) : a(_a), b(_b), id(_id) {}
int val(int x) {
return a * x + b;
}
};
struct CHT {
vector <Line> st;
CHT() {st.clear();}
bool bad(Line a, Line b, Line c) {
@@@
Type :qa and press <Enter> to exit Vim 15,7-21 Top