zl程序教程

hdu 3398 String

  • hdu 3336 Count the string(kmp应用)

    hdu 3336 Count the string(kmp应用)

    大家好,又见面了,我是你们的朋友全栈君。 Problem Description It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty p

    日期 2023-06-12 10:48:40     
  • hdu 3336 Count the string 用心写的题解

    hdu 3336 Count the string 用心写的题解

    大家好,又见面了,我是你们的朋友全栈君。 Problem Description It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty pr

    日期 2023-06-12 10:48:40     
  • HDU3336-Count the string(KMP)

    HDU3336-Count the string(KMP)

    Count the string Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4449    Accepted Submission(s): 20

    日期 2023-06-12 10:48:40     
  • HDU 4641 K-string

    HDU 4641 K-string

    K-string Time Limit: 2000ms Memory Limit: 131072KB This problem will be judged on HDU. Original ID: 464164-bit integer IO format: %I64d      Java class name:&

    日期 2023-06-12 10:48:40     
  • HDU 4455 Substrings

    HDU 4455 Substrings

    Substrings Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2340    Accepted Submission(s): 731 Problem

    日期 2023-06-12 10:48:40     
  • HDU3336  Count the string  一道KMP的巧解

    HDU3336 Count the string 一道KMP的巧解

    http://acm.hdu.edu.cn/showproblem.php?pid=3336 题目 这是喵呜大神用KMP做的,46MS  #include stdio.h #define MOD 10007 char b[200005]; int dp[200005]; int p[200005]; int n; int Pre() int s,i,j; dp[0]=

    日期 2023-06-12 10:48:40     
  • HDU 6096 String (AC自动机)

    HDU 6096 String (AC自动机)

    题意:给出n个字符串和q个询问,每次询问给出两个串 p 和 s 。要求统计所有字符串中前缀为 p 且后缀为 s (不可重叠)的字符串的数量。 析:真是觉得没有思路啊,看了官方题解,真是好复杂。 假设原始的字符串 数组为A,首先将A中的每个字符串都进行翻转,得到字符串数组B,然后,将A和B按字典序排序。   对于一个查询来说有一个前缀p和后缀s, 所有包含前缀p的字符串在A中是连续的,可

    日期 2023-06-12 10:48:40     
  • HDU 2476 String painter (区间DP)

    HDU 2476 String painter (区间DP)

    题意:给定两个串,问你从第一个串刷成第二个串最少要几次。 析:我们可以先求一个空串变成第二个串,然后再求第一个串的,dp[i][j] 表示 i-j 这个区间已经和第二个串相同了,最少要几次,区间dp么, 然后再求和第一个的。 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio>

    日期 2023-06-12 10:48:40     
  • HDU 5842 Lweb and String (水题)

    HDU 5842 Lweb and String (水题)

    题意:给定一个字符串,问你有多少种字母。 析:用set即可。 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include

    日期 2023-06-12 10:48:40     
  • hdu5414(2015多校10)--CRB and String(字符串匹配)

    hdu5414(2015多校10)--CRB and String(字符串匹配)

    题目链接:点击打开链接 题目大意:有A。B两个字符串。如今有一种操作能够在A的随意一个字符x后面添加一个字符y(x。=y)。问能不能将A变为B。 首先假设A能够变成B,那么A就一定是B的一个子序列,这个能够在O(n+m)的时间内算出。 假设A是B的子序列之后,推断添加的字符中是不是含有不能添加的情况,我们仅仅须要推断B从開始的一段连续的同样的字符串。是不是在A的开头也存在。假设存在,那么就是

    日期 2023-06-12 10:48:40