# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
949663 | VinhLuu | Split the sequence (APIO14_sequence) | C++17 | 79 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>
#define int long long
#define ll long long
#define fi first
#define se second
#define pb push_back
#define all(lmao) lmao.begin(), lmao.end()
using namespace std;
typedef pair<int,int> pii;
typedef tuple<int,int,int> tp;
const int N = 2e5 + 5;
const int oo = -1e12;
const int K = 205;
const int mod = 998244353;
//const int base = 23;
int n, k, a[N], f[N][K], dp[N][K], s[N];
int cal(int i,int j){
return (s[j] - s[i]) * (s[n] - s[j]);
}
void solve(int j,int l,int r,int pl,int pr){
if(l > r) return;
int mid = (l + r) / 2;
for(int i = pl; i <= min(mid - 1, pr); i ++){
int val = dp[i][j - 1] + cal(i, mid);
if(val > dp[mid][j]){
Compilation message (stderr)
# | 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... |