# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
890608 | dwuy | Split the sequence (APIO14_sequence) | C++14 | 825 ms | 87736 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 fi first
#define se second
using namespace std;
typedef pair<int, int> pii;
const int MX = 100005;
int n, k;
int a[MX];
int sum[MX];
int pre[MX];
int cur[MX];
int32_t trace[MX][205];
void nhap(){
cin >> n >> k;
for(int i=1; i<=n; i++) cin >> a[i];
}
vector<pii> Line;
vector<int> id;
/// ax + b = ux + v;
/// ax - ux = v - b;
/// x(a - u) = (v - b)
/// x = (v - b)/(a - u);
bool bad(pii l1, pii l2, pii l3){
return (l2.se - l1.se)*(l2.fi - l3.fi) >= (l1.fi - l2.fi)*(l3.se - l2.se);
}
# | 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... |