摘要:
这个题目 正解应该是 dp 吧 对18个数字进行2进制枚举放不放,,,可以这么理解 以当前状态 stu,他对应的余数是 h 进入下一个状态; 进行记忆画搜索就行了 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 char str[20]; bool vis[20]; 9 int dp[1000000][20],len; int res[20];10 int dfs( int stu,int h,int dep )11 {12 if( dep == len ){... 阅读全文
posted @ 2013-11-23 21:32
浪舟
阅读(314)
评论(0)
推荐(0)