2020-02-22から1日間の記事一覧

k-anonymous sequence - poj 3709

#dp #cht #convex hull trick問題 http://poj.org/problem?id=3709 O(N^3) a[j + 1] ~ a[i] を a[j] と同じにする #include<bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second #define pii pair<int, int> #define eb emplace_back #defin</int,></bits/stdc++.h>…