pojnbsp专题

POjnbsp;1159nbsp;nbsp;nbsp;Palindromenbsp;(dp)

http://acm.pku.edu.cn/JudgeOnline/problem?id=1159 这个题有两种基本解法,第1种方法: 设a[i][j]表示从第i个字符到第j个字符需要增加多少字母使得回文,初始化后,状态转移方程: if(s[i]==s[j])    a[i][j]=a[i+1][j-1]; else    a[i][j]=min(a[i+1][j],a[i][j-1])+1;

ZZULI_SummerPractice(4)nbsp;nbsp;POJnbsp;132…

棋盘问题 Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 12010Accepted: 5909 Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。

ZZULI_SummerPractice(4)nbsp;POJnbsp;3302…

Subsequence Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6570Accepted: 3829 Description Given a string s of length n, a subsequence of it, is defined as another string s' = su1su2...s

POJnbsp;nbsp;3278nbsp;nbsp;Catchnbsp;Thatnbsp;Cow

Catch That Cow Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 24664Accepted: 7604 Description Farmer John has been informed of the location of a fugitive cow and wants to catch her imm

POJnbsp;nbsp;1018nbsp;nbsp;Communicationnbsp;System

Poj_1018_Communication System 关键词:dp 贪心 枚举 题目描述:Communication System Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 8824   Accepted: 3095 Description We have re

ZZULI_SummerPractice(3)nbsp;POJnbsp;3984…

C - 迷宫问题 p Time Limit: 1000MSMemory Limit: 65536K64bit IO Format: %I64d & %I64u [Submit]   [Go Back]   [Status] Description 定义一个二维数组: int maze[5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0,

POJnbsp;3295nbsp;Tautology(似乎是模拟?…

题目链接:http://poj.org/problem?id=3295   题意:现规定K,A,N,C,E五种运算,p,q,r,s,t为五个只有0和1状态的变量,给定一个含有这几个字符的字符串,判断无论p,q,r,s,t的取值,结果是否均为真(即永真式)   哭死了,发现这个题目无论怎么写,用c和c++提交均WA,Gcc和G++就对了,郁闷,以为只是用了位运算才这样呢,没想到没用位运算也是W