博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PAT (Advanced Level) Practice 1040 Longest Symmetric String (25 分) 最长回文字符串 dp
阅读量:3903 次
发布时间:2019-05-23

本文共 294 字,大约阅读时间需要 1 分钟。

#include 
#include
#include
#include
using namespace std;const int maxn=1005;char s[maxn];int dp[maxn][maxn];int ans;void init(){ ans=1; memset (dp,0,sizeof(dp));}int main(){ init(); cin.getline(s,1005); int len=strlen(s); for (int i=0;i

 

转载地址:http://fxaen.baihongyu.com/

你可能感兴趣的文章
10. 正则表达式匹配
查看>>
23. 合并K个元素的有序链表
查看>>
32. 最长有效括号
查看>>
6. Z字形转换
查看>>
8. 字符串转整数(atoi)
查看>>
12. 整数转罗马数字
查看>>
15. 三数之和
查看>>
16. 最接近的三数之和
查看>>
18. 四数之和
查看>>
22. 括号生成
查看>>
24. 两两交换链表中的节点
查看>>
71. 简化路径
查看>>
77. 组合
查看>>
78. 子集
查看>>
89. 格雷编码
查看>>
刚开始学python,对脚本语言的一些理解
查看>>
matplotlib进行绘图——散点图
查看>>
matplotlib进行绘图——直方图
查看>>
需求文件requirements.txt的创建及使用
查看>>
300. 最长上升子序列
查看>>