摘要:
Problem Description在魔方风靡全球之后不久,Rubik先生发明了它的简化版——魔板。魔板由8个同样大小的方块组成,每个方块颜色均不相同,可用数字1-8分别表示。任一时刻魔板的状态可用方块的颜色序列表示:从魔板的左上角开始,按顺时针方向依次写下各方块的颜色代号,所得到的数字序列即可表... 阅读全文
摘要:
1 #include 2 #include 3 const int N = 100; 4 int a[N]; 5 int dp[N][33]; 6 inline int min(const int &a, const int &b) 7 { 8 return a < b ? a : b... 阅读全文