问题
分析
使用二分法定界,然后使用对于不同的mid使用dp进行编辑距离的计算
还有分段,对于do[i][m]<=mid,就可以进行分段
解析:https://blog.csdn.net/accelerator_/article/details/24940849 这个链接里面使用的是刷表法,dp状态转移的过程更加符合思路
#include<iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;
const int maxn=5000+5,maxm=50+5,INF=0x3f3f3f3f;
int kase,len1,len2,dp[maxn][maxm];
char x[maxn],y