-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlichao.cpp
More file actions
38 lines (36 loc) · 775 Bytes
/
lichao.cpp
File metadata and controls
38 lines (36 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
struct LiChao {
struct Line {
ld a, b;
ld operator(ld x) { return a * x + b; }
};
struct node {
Line best;
node *L, *R;
node(Line line) : best(line), L(0), R(0) {}
} *root = nullptr;
void add(node *&now, Line v, double l, double r) {
;
}
};
struct Query {
int t;
int x1, x2, y1, y2;
ostream operator<<(ostream &O, Query &q) {
O >> q.t;
if(q.t == 1) return O >> q.x1 >> q.y1 >> q.x2 >> q.y2;
}
};
vector<int> solve(vector<Query> Q) {
for(auto q: Q) {
if(q.t == 1) {
auto [t, x1, x2, y1, y2] = q;
Line;
}
}
}
signed main() {
ifstream fin("1.in");
}