
搜索
范晓天
给我一片蓝天,让我飞得更高……
展开
-
Timus 1016. A Cube on the Walk (bfs)
/* * File: 1016. A Cube on the Walk * Author: xiaotian @ hnu * Created on 2010年9月28日, 上午9:26 * 解题:bfs,很基础的。可以看作在一个图上跑最短路, * 关健是建图,本人愚拙,手打整个图。 */原创 2010-09-28 20:33:00 · 305 阅读 · 0 评论 -
Herbin 1004 Power Stations
<br /> File: Herbin 1004 Power Stations<br /> Author: xiaotian @ hnu<br /> Created on 2010年9月29日, 下午12:24<br /> <br /> Dancing Links,相对于其他的 DLX 来说,这道题目应该还算简单的。<br /><br /> 题解:经典的 Dancing Links 精确覆盖题目。题目挂在杭电。<br /> 以每一个 town 的每一天分别为行和列去建图。见图应该是比较容易想原创 2010-09-29 21:23:00 · 260 阅读 · 0 评论 -
Dancing Links 精确覆盖模板
Dancing Links 精确覆盖模板#include#include#include#include#include#define inf 0x3fffffffusing namespace std;const int N = 305; /*列数*/const int M = 4000; /*点数*/int map[N][N]; /* 01矩阵表 */int U[M], D[M], R[M], L[M], rs[N];int size[N], head, r原创 2010-10-02 11:43:00 · 803 阅读 · 0 评论 -
Dancing Links 重复覆盖模板
<br />Dancing Links 重复覆盖模板<br /> <br />#include<iostream>#include<cstdio>#include<string.h>#include<vector>#include<math.h>#define inf 0x3fffffffusing namespace std;const int N = 1005;const int M = 4000;int U[M], D[M], R[M], L[M], rs[N];原创 2010-10-02 16:38:00 · 925 阅读 · 0 评论 -
Timus 1040. Airline company
<br />/* <br /> * File: Timus 1040. Airline company<br /> * Author: xiaotian @ hnu<br /> * Created on 2010年10月2日, 上午9:34<br /> * 题解:一次找极长路(即两边不能再加边),将他们依次编号,然后删掉这些边。直至图中没有边为止。输出解即可。<br /> * 不会出现没有解的情况。<br /> */<br /> <br />#include <iostream>原创 2010-10-02 10:14:00 · 478 阅读 · 0 评论 -
Timus 1096. Get the right route plate!
<br />/* * File: Timus 1096. Get the right route plate! * Author: xiaotian @ hnu * Created on 2010年10月5日, 下午6:55 * 题解:简单的bfs,可以预先建一个表,bfs起来就很方便 */#include<stdio.h>#include<iostream>#include<string.h>#include<queue>#include<map>#inc原创 2010-10-05 19:35:00 · 315 阅读 · 0 评论 -
HNU 11072 && PKU 3635 Full Tank?
优先队列广搜/* * File: PKU 3635 Full Tank? * Author: xiaotian @ hnu * Created on 2010年10月8日, 下午4:27 * 题解:优先队列bfs */#include#include#include#include#include#include#includeusing namespace std;#define N 1008#define inf 0x7fffffffs原创 2010-10-08 17:06:00 · 555 阅读 · 0 评论 -
ZOJ 3059 Die Board Game
<br />/*<br /> * File: ZOJ 3059 Die Board Game<br /> * Author: xiaotian @ hnu<br /> * Created on 2010年11月2日, 上午9:26<br /> * 解题:骰子宽搜索问题,写的猥琐了一点,手动打表量很少。<br /> * 一般情况下骰子的两个相邻的面确定一个状态,再加上位置(x,y)就是三维的状态<br /> * 状态空间为 N*M*24 ,实际上开的是 N*M*36 的数组<br原创 2010-11-02 17:01:00 · 633 阅读 · 0 评论