This article mainly introduces related information about PHP implementation of text-based Moss code generator. For more information, see a recent requirement for generating Moss code audio files based on input text. After several unsuccessful searches, I decided to write a generator myself.
I decided to use PHP as my
Jsoi to the players zyx a task, the production of a "text generator" computer software: The user of the software is some low-young people,They are now using the GW Text Generator version V6. The software can generate a number of random articles---always generate a fixed length and completely random textChapter-that is,
DescriptionJsoi to the players zyx a task, the production of a "text generator" computer software: The user of the software is some low-young people,They are now using the GW Text Generator version V6. The software can generate a number of random articles---always generate a fixed length and completely random textChapt
[BZOJ1030] [JSOI2007] Text generatorQuestion DescriptionJsoi to the players zyx a task, the production of a "text generator" computer software: The user of the software is some low-young people, they are now using the GW Text Generator V6 version. The software can generate s
DescriptionJsoi to the players zyx a task, the production of a "text generator" computer software: The user of the software is some low-young people, they are now using the GW Text Generator V6 version. The software can generate some random articles----always generate a fixed length and completely random article--that
http://www.lydsy.com/JudgeOnline/problem.php?id=1030DescriptionJsoi to the players zyx a task, the production of a "text generator" computer software: The user of the software is some low-young people,They are now using the GW Text Generator version V6. The software can generate a number of random articles---always gen
Title DescriptionJsoi to the players zyx a task, the production of a "text generator" computer software: The user of the software is some low-young people, they are now using the GW Text Generator V6 version.The software can generate some random articles----always generate a fixed length and completely random article--
PHP implementation of the text-based Moss code generator
Introduced
I recently encountered a requirement to generate Morse code audio files based on input text. After a few searches, I decided to write a generator myself.
Download source Codes –2.63 KB
Because I wanted to access my Morse code audio files through th
Recently encountered a requirement to generate Morse code audio files based on input text. After a few searches, I decided to write a generator myself.
Because I wanted to access my Morse code audio files through the web, I decided to use PHP as my main programming language. The above shows a webpage that starts to generate Moss code. In the downloaded zip file, contains the Web page for submitting the
AC automata.F[I][J] is expressed as the number of scenarios in the text string that match the J node in the dictionary tree for length i.1#include 2 using namespacestd;3typedefLong Longll;4 Const intn=6005, mod=10007;5ll ans1,ans2,f[ the][n];6 Chars[ the];intcnt,n,m;7queueint>Q;8 structnode9 {Ten ints,v[ -],f; One }t[n]; A voidbuild () - { - intN=strlen (s);intnow=0; the for(intI=0; ii) - { - if(t[now].v[s[i]-'A']) now=t[now].
Always do not understand how to do ah, think for a long time $twt$Finally understand why find the first $fail$ to meet the criteria to calculate, because avoid repetition, this answer,,,Then $root$ below to connect to 26 nodes, here 26 letters are not in the dictionary is replaced with $f[i][0]$, this also thought for a long time, $==$ I still go Home farm.#include Finally made it out, because looking at someone else's template, which also,,,"Bzoj 1030" "Jsoi 2007"
Very old topic, a long time ago to learn AC automata when the A onceIt's a review today.We can turn the problem into a string that does not appear in a given string.We set up AC automata, set DP[I][J] to show that I have walked the current on the J-nodeThe word node is not transferred during DP#include Bzoj 1030 Text Generator
"Topic link" http://www.lydsy.com/JudgeOnline/problem.php?id=1030"The main topic"Find the number of strings that contain any given stringExercisesWe find the quantity that does not contain any given string, and use the complete set to reduce it,For a given string set up AC automata, with 1 nodes as the root, 0 nodes to 1 even full character set transfer as a super-source,So 0->match can match all strings that don't contain a given string,DP[I][J] Indicates the number of strings matched to the I
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.