13263번: 나무 자르기 - DP(컨벡스 헐 트릭)
컨벡스 헐 트릭 기본 문제.#include using namespace std;typedef long long ll;typedef long double ld;typedef pair pii;typedef pair pll;typedef tuple tiii;const int MAXN = 100001;struct line{ ll gra, yi; //gra : 기울기, yi : y절편 ld x = 0.0; //해당 직선이 시작하는 x좌표 bool operator CHT;int main(){ ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); cin >> n; for(int i=1; i> a[i]; for(int i=1; i> b[i]; CHT.push_..
알고리즘/baekjoon
2024. 7. 11. 12:38