KID_XiaoYuan

导航

2017年2月12日 #

【算法设计】(综合)博弈树的了解与创建

摘要: 对博弈树的理解 简单而言就是对每一步可能的结果进行分析 之后对当前步骤的下一步的所有可能结果进行分析而创建的树 专业表示极大极小博弈树:极大极小博弈树是因描绘这种结构的一种简单算法而得名。我们来对ttt游戏的结果分配一下分值。如果叉(X)获胜,则分值为1。如果圈(O)获胜,则分值为-1。现在,叉将试 阅读全文

posted @ 2017-02-12 23:30 KID_XiaoYuan 阅读(1005) 评论(0) 推荐(0) 编辑

【搜索】Shuffle'm Up

摘要: 运用第i个s12和第i+1个s12中,每个位置具有的确定的映射关系: pos = pos * 2 + 1 (pos < c) pos = pos * 2 - c * 2 (pos >= c) 例如c =3, 则位置为 0 1 2 3 4 5 会映射成 3 0 4 1 5 2 从第1到第2c个位置依次 阅读全文

posted @ 2017-02-12 23:14 KID_XiaoYuan 阅读(138) 评论(0) 推荐(0) 编辑

【搜索】 Prime Path

摘要: #include #include #include #include #include using namespace std; int n, m; const int N = 1e4 + 100; int vis[N]; struct node { int x, step; }; queue Q; bool judge_prime(int x) //判断素数 { if(x... 阅读全文

posted @ 2017-02-12 22:59 KID_XiaoYuan 阅读(108) 评论(0) 推荐(0) 编辑

【搜索】 Find The Multiple

摘要: #include #include #include bool found; void DFS(unsigned __int64 t ,int n,int k) { if(found) return ;//如果已经发现了答案就没搜的必要了 if(t%n==0) {//发现答案,输出,标记变量该true printf("%I64u\n",t)... 阅读全文

posted @ 2017-02-12 22:57 KID_XiaoYuan 阅读(160) 评论(0) 推荐(0) 编辑

【搜索】Fliptile

摘要: #include #include #include const int maxn=20; const int inf=210000; typedef long long ll; int m,n; int opt[maxn][maxn]; int a[maxn][maxn]; int tmp[maxn][maxn]; int dx[]= {0,0,1,-1,0};... 阅读全文

posted @ 2017-02-12 22:53 KID_XiaoYuan 阅读(127) 评论(0) 推荐(0) 编辑

【搜索】C - Catch That Cow

摘要: 本题使用DFS搜索对当前点进行N*2 N+1 N-1三种操作进行搜索 阅读全文

posted @ 2017-02-12 22:48 KID_XiaoYuan 阅读(87) 评论(0) 推荐(0) 编辑