# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
785962 | tosivanmak | Split the sequence (APIO14_sequence) | C++17 | 20 ms | 2588 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 ll int
#define ld long double
struct LINE{
ld m,c,ocpt;
bool operator !=(const LINE &l)const{
return m!=l.m||c!=l.c||ocpt!=l.ocpt;
}
};
deque<LINE>q[2];
pair<ld,ld> int_pt(LINE a, LINE b){
// a.mx+a.c=b.mx+b.c
ld x=(b.c-a.c)/(a.m-b.m);
ld y=(a.m*x+a.c);
return {x,y};
}
void insert(ll id, LINE a){
while(q[id].size()>1){
// cout<<"bruh\n";
if(a.m==q[id].front().m){
if(a.c<q[id].front().c){
break;
}
else{
q[id].pop_front();
}
}
else{
# | 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... |