摘要: /*这题应该属于水题吧,基本不用什么大的处理,看懂题意就行。直接n次dfs,找出最大的length*///My Code: 16MS#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int N = 30;int map[N][N];bool vis[N][N];int n;int ans;void dfs(int now, int t){ int f, i; for(f = 1, i = 0; i < n; i++){ if(vis[now][ 阅读全文
posted @ 2011-10-21 14:57 AC_Von 阅读(231) 评论(0) 推荐(0) 编辑
摘要: /*不明白为什么Ural把这题归到game里边,难到是因为这题是个游戏。。。很水的一道题,纠结了两天,以前没有接触过位压缩,估计学过位压缩的童鞋能够把这题直接秒掉,Orz各位做题神速的童鞋。。。 wwww wwww wwwb wwbb可以用二进制表示为:1100|1000|0000|0000;也就是说4*4方格里所有状态都可以用16位二进制表示,转成十进制后为0或者65535就完成了游戏。*///My Code:#include <iostream>#include <cstdio>#include <cstring>using namespace std; 阅读全文
posted @ 2011-10-21 10:37 AC_Von 阅读(392) 评论(0) 推荐(0) 编辑