# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1124690 | Marko2604 | Split the sequence (APIO14_sequence) | C++20 | 8 ms | 12864 KiB |
#include<bits/stdc++.h>
#define ll long long
#define MAXN 100007
using namespace std;
struct line
{
bool active=false;
ll k, n;
ll pos;
ll eval(ll x)
{
return k*x+n;
}
};
ll sz;
vector<ll>x;
line seg[4*MAXN+7];
void makeSeg(int n1)
{
sz=(1<<((int)ceil(log2(n1))));
while(x.size()<sz) x.push_back(0);
sort(x.begin(),x.end());
for(int i=1;i<2*sz;i++) seg[i].active=false;
}
void addLine(line l1, int node, int l, int r)
{
int mid=(l+r)/2;
if(!seg[node].active)
{
seg[node]=l1;
# | 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... |