This commit is contained in:
Zengtudor 2024-10-07 23:29:33 +08:00
parent c533973e8b
commit a3eb484f6e

View File

@ -25,7 +25,7 @@ int main(){
for(const size_t i:range((size_t)1,s.size()+1)){
for(const size_t j:range((size_t)1,p.size()+1)){
if(get_p(j) == get_s(j) || get_p(j)=='?'){
if(get_s(i) == get_p(j) || get_p(j)=='?'){
dp[i][j] = dp[i-1][j-1];
}else if(get_p(j)=='*'){
dp[i][j] = dp[i-1][j] || dp[i][j-1]; //01背包查看是否使用这个字符