当前位置:网站首页>ZOJ - 4114 flipping game DP, reasonable state representation
ZOJ - 4114 flipping game DP, reasonable state representation
2022-07-25 15:35:00 【Brother Tazi is here】
The main idea of the topic :
Here are two lengths for you n ( n ≤ 100 ) n(n \leq 100) n(n≤100) Of 01 character string . You need to k ( k ≤ 100 ) k(k \leq 100) k(k≤100) Wheel operation , Select each operation m ( m ≤ n ) m(m\leq n) m(m≤n) Characters , Reverse it .
Ask how many schemes you have to make k k k After the round, the first string is transformed into the second string .
Topic ideas :
K After the round , Two strings are equal . Then we only need to record the current rounds and several strings are not equal .
So define d p ( i , j ) dp(i,j) dp(i,j) For the former i i i round , The current situation is just k k k The number of schemes of characters different from the second string .
d p ( i , j − k + m − k ) + = C j k C n − j m − k d p ( i − 1 , j ) dp(i,j-k+m-k)+=C_{j}^{k}C_{n-j}^{m-k}dp(i-1,j) dp(i,j−k+m−k)+=CjkCn−jm−kdp(i−1,j)
边栏推荐
猜你喜欢

Delayed loading source code analysis:

JVM知识脑图分享

Pytorch学习笔记--常用函数总结3

Take you to create your first C program (recommended Collection)

Are you ready to break away from the "involution circle"?

Phased summary of the research and development of the "library management system -" borrowing and returning "module

盒子躲避鼠标

Distributed principle - what is a distributed system

小波变换--dwt2 与wavedec2

Brain racking CPU context switching
随机推荐
我想问下变量配置功能是只能在SQL模式下使用吗
ML - natural language processing - Introduction to natural language processing
CF888G-巧妙字典树+暴力分治(异或最小生成树)
数据系统分区设计 - 请求路由
matlab 优化工具 manopt 安装
BPSK调制系统MATLAB仿真实现(1)
The difference between Apple buy in and apple pay
C # fine sorting knowledge points 9 Set 2 (recommended Collection)
C#精挑整理知识要点11 委托和事件(建议收藏)
Geogle Colab笔记1--运行Geogle云端硬盘上的.py文件
Pytorch学习笔记--SEResNet50搭建
No tracked branch configured for branch xxx or the branch doesn‘t exist. To make your branch trac
Spark memory management mechanism new version
Instance tunnel use
Spark AQE
Is it safe to open futures online? Which company has the lowest handling charge?
Games101 review: Transformation
Get the ask code corresponding to the key pressed by the keyboard
SVD奇异值分解推导及应用与信号恢复
ML - 图像 - 深度学习和卷积神经网络