
字符串——简单
文章平均质量分 92
HARD_UNDERSTAND
Just try
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces 632C - The Smallest String Concatenation
题目:Codeforces 632C题意: 输入n个字符串,将这n个字符串加起来,求最小字典序的字符串 例: Input 5 x xx xxa xxaa xxaaa Output xxaaaxxaaxxaxxx 分析: 自己像个傻逼一样,写了半天写了个自定义排序函数,虽然过了,但是用时太长了,看了一下cf上别人的代码,我真是太蠢了。。。#include<bits/stdc+原创 2016-03-22 00:07:59 · 503 阅读 · 0 评论 -
hdu 5672 Strings 模拟
Problem Description There is a string S.S only contain lower case English character.(10≤length(S)≤1,000,000) How many substrings there are that contain at least k(1≤k≤26) distinct characters?原创 2016-04-24 13:16:38 · 669 阅读 · 0 评论 -
UVa 11584 划分回文串( 简单dp )
题意: 给一个字符串, 要求把它分割成若干个子串,使得每个子串都是回文串。问最少可以分割成多少个。 分析: d[i]表示以i结尾的串最少可以分割的串数。 d[i] = min{ d[j]+1, 串[j,i]是回文串&&1<=j<=i } 这题还是很简单的,不过值得学习的地方是预处理[i,j]是否为回文串那部分,代码给出了两种预处理方法。 代码:#include<iostream>原创 2016-09-05 10:40:02 · 405 阅读 · 0 评论