update
This commit is contained in:
parent
c533973e8b
commit
a3eb484f6e
@ -25,7 +25,7 @@ int main(){
|
|||||||
|
|
||||||
for(const size_t i:range((size_t)1,s.size()+1)){
|
for(const size_t i:range((size_t)1,s.size()+1)){
|
||||||
for(const size_t j:range((size_t)1,p.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];
|
dp[i][j] = dp[i-1][j-1];
|
||||||
}else if(get_p(j)=='*'){
|
}else if(get_p(j)=='*'){
|
||||||
dp[i][j] = dp[i-1][j] || dp[i][j-1]; //01背包,查看是否使用这个字符
|
dp[i][j] = dp[i-1][j] || dp[i][j-1]; //01背包,查看是否使用这个字符
|
||||||
|
Loading…
Reference in New Issue
Block a user