# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
17670 | Namnamseo | Split the sequence (APIO14_sequence) | C++14 | 692 ms | 85076 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 <cstdio>
typedef long long ll;
int n,k;
int d[100010];
ll prefix[100010];
ll dp[2][100010];
ll *dp_bef, *dp_cur;
int chosen[201][100010];
int* chosen_arr;
struct tp{
ll a,b,c;
tp cross(const tp& other) const {
return {b*other.c-c*other.b, c*other.a-a*other.c, a*other.b-b*other.a};
}
} l[100010];
int lind[100010];
int ln;
void addLine(ll a,ll c,int ind){
tp curl={a,-1,c};
tp pa, pb;
while(ln>=2){
pa=l[ln-2].cross(l[ln-1]);
pb=l[ln-1].cross(curl);
if(pa.a*pb.c < pa.c*pb.a) break;
# | 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... |