2012年4月9日

HDU 1548 A strange lift(BFS)

摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1548玩了两天,差点写不出了。。。。。。。这题是由某个状态遍历其他状态的BFS对于某一状态下有---->所在层:now_floor,从开始到该层按了几次按钮:step。。。。。#include <queue>#include <algorithm>#include <iostream>using namespace std;const int INF = 1 << 30;int a[222];bool vis[222];int n;struct po 阅读全文

posted @ 2012-04-09 18:16 [S*I]SImMon_WCG______* 阅读(340) 评论(0) 推荐(0) 编辑

HDU 2616 Kill the monster(生成排列)

摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2616#include <queue>#include <algorithm>#include <iostream>using namespace std;const int INF = 1 << 30;struct ka{ int A, M;}a[11];int main(){ int i, j; int ans; int n, init_hp; int p[11]; while (~scanf("%d%d", &n, &am 阅读全文

posted @ 2012-04-09 17:01 [S*I]SImMon_WCG______* 阅读(205) 评论(0) 推荐(0) 编辑

导航