2013年7月27日

poj 3295 Tautology(经典构造算法题)

摘要: 思路:1)使用递归模拟,用备忘录优化,否则超时 另外:学到了一个不用递归即可枚举构造0-1序列的方法for(i=0;i>j)%2;【源程序】:#include "stdio.h"#include "string.h"int arr[101],flag,note[101][101];int IsCorrect(char *s,int start,int end){ if(note[start][end]!=-1) return note[start][end]; int i; if(end==start) { if(s[start]='p&# 阅读全文

posted @ 2013-07-27 13:59 Gddxz 阅读(208) 评论(0) 推荐(0) 编辑

导航