Shirlies
宁静专注认真的程序媛~
摘要: 写的程序运行时间不给力~_~……我用二进制表示状态做的……代码中解释……代码如下: 1 #include <iostream> 2 using namespace std; 3 4 struct spell 5 { 6 int ai,mi; 7 }ss[12]; 8 int n,HP; 9 int minn;10 11 void dfs(int x,int hp)12 {13 if(hp <= 0)//当hp值要小于等于0时,查看x中有多少个1,即用了多少个spell14 {15 int res = 0;16 for(int i = 0... 阅读全文
posted @ 2012-08-03 16:20 Shirlies 阅读(281) 评论(0) 推荐(0) 编辑