hdu 5823 color II 狀壓(2016多校第八場1003)

咱們直接狀壓表示最小值,而後咱們狀態裏面枚舉最後一個點所在的相同顏色的集合,複雜度爲3^17=10^8。ios #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; typedef unsigned un; const int maxn=1<<18; un uo[
相關文章
相關標籤/搜索