摘要: 题意和2965差不多,思路也是一样的:链接:2965代码:View Code #include <iostream>#include <cstdio>#include <algorithm>#include <cstring>using namespace std;int s[16] ={ 0xc800,0xe400,0x7200,0x3100, 0x8c80,0x4e40,0x2720,0x1310, 0x08c8,0x04c4,0x0272,0x0131, 0x008c,0x004e,0x0027,0x0013};int result = 1 阅读全文
posted @ 2012-02-23 20:30 LT-blogs 阅读(150) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2965 位运算+搜索题意:将下图这样的图案都变成减号,规则每次改变一个,这一个的行和列都会发生转换;思路:总共有2^16的情况,全部都搜一遍,用位运算一次改变一行和一列;-+-----------+--搜索题解:View Code #include <iostream>#include <cstdio>#include <algorithm>#include <cstring>using namespace std;int result = 17;int path = 0;int s[16] 阅读全文
posted @ 2012-02-23 20:00 LT-blogs 阅读(138) 评论(0) 推荐(0) 编辑