摘要: 题目链接题目大意是说:给你起个p*q的棋盘,然后让你用中国象棋的马去遍历棋盘,然后让你求出字典序最小的游历顺序。。这其实就是一个马的周游问题。同样的也是搜索,多的不说了。#include <iostream>#include <cstdio>#include <string>#include <cstring>using namespace std;string res; //保存答案int f[30][30]; //这里千万别开小了,开始的时候我就是开小了然后wa了几次int N;int a,b;int move[8][2]={{-1,-2}, 阅读全文
posted @ 2012-09-01 15:11 Amazing_Y 阅读(183) 评论(0) 推荐(0) 编辑