校賽熱身 Problem C. Sometimes Naive (狀壓dp)

    題解:   列舉每一種3的倍數的組合,開始先求出3條邊的可行解,則   六條邊的可行解可以由兩個三條邊得來。  詳見代碼解析 #include<bits/stdc++.h> using namespace std; int a[22],n,cnt,ant,is[500007],dp[1050007]; struct node { int num,id; }a
相關文章
相關標籤/搜索