Comments (1)
首先通过引入附加符号,把所有规则都改成A->BC这样的形式,
设f(i,L)表示初始为一个i, 通过规则得到一个长度为L的串,
这个串字典序最小为多少, f(j,p)+f(k,L-p)转移到f(i,L),
对应于规则i->jk,
0<=p<=L。注意到p可以等于L,实际计算的时候得用类似dijkstra的
写法做状态转移
Original comment by [email protected]
on 19 May 2013 at 2:08
- Changed state: Accepted
from aoapc-book.
Related Issues (20)
- 刘老师,请教一下uva 11740
- 感觉第一章DP习题2038中文描述有误 顺便问一下假设按书中中文描述 题目该如何解
- 刘老师您好,关于训练指南例题26的一点小疑问
- 能不能把《入门经典》的训练参考中CII的题目也加入到uva的那个列表上去。
- 刘老师,《入门经典》里程序3-6感觉有问题 HOT 1
- 《算法竞赛入门经典》第二版前言bug一枚
- 《算法竞赛入门经典》第二版 2.1 节错误一个
- 两道题在UVA一直在WA,但是发现在CF的gym上提交可以通过
- 请教第二版习题3-12(uva 11809)
- 入门经典(第2版)例题10-29魔法GCD(UVa1642)里面的一句求解 HOT 1
- 第二版 第7章7-11题uva1533 样例输出问题
- 请问刘老师uva上您书里面的练习有题解吗
- 求第二章概率联系题game(LA4049)具体思路
- LA3938或UVA1400 - "Ray, Pass me the dishes!"代码有bug
- 训练指南P47页错误
- 例题11-10的UVa题号有误
- 勘误 HOT 2
- [deleted issue]
- [deleted issue]
- 《入门经典(第二版)》例题9-1代码有误
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aoapc-book.