摘要: http://poj.org/problem?id=3295题意:判断一个表达式的值是否都为1,p, q, r, s, and t 为取值为true或false的元素,K, A, N, C, E则为对应的运算法则;思路:从后往前递推,并且要尝试所有的取值可能;代码:View Code #include <cstdio>#include <cstring>#include <iostream>#include <algorithm>#include <cstdlib>#include <stack>using namespa 阅读全文
posted @ 2012-02-25 19:23 LT-blogs 阅读(180) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1328题意:在一个海岸线上按一些雷达,是雷达可以覆盖海面的小岛,问最少安装多少雷达;思路:快拍+贪心;代码:View Code #include <stdio.h>#include <iostream>#include <algorithm>#include <cstring>#include <cstdlib>#include <string.h>#include <cmath>using namespace std;struct node{ double 阅读全文
posted @ 2012-02-25 09:06 LT-blogs 阅读(144) 评论(0) 推荐(0) 编辑