崇明区建设镇网站,做近代史纲要题的网站,建设个人网站需要备案吗,南昌seo搜索排名题意#xff1a;给你三个字符串#xff0c;让你计算1 2 串和3 串是否匹配#xff0c;就是3串可以分解为 1 2 串#xff0c;字母顺序必须是按照1 2 串的字母前后顺序。 DP代码太深奥 看不太透#xff0c;这个代码比较好理解一点#xff1a; #includestdio.h
#inc…题意给你三个字符串让你计算1 2 串和3 串是否匹配就是3串可以分解为 1 2 串字母顺序必须是按照1 2 串的字母前后顺序。 DP代码太深奥 看不太透这个代码比较好理解一点 #includestdio.h
#includestring.h
#includemath.h
#includetime.h
#includeiostream
#includectype.h
#includemap
#includeset
#includestring
#includevector
#includealgorithm
#includestdlib.h
#includequeue
#includestack
using namespace std;
mapchar,intma,mc;
int main()
{int i,j,k;string a,b,c;while(cinabc){ma.clear();mc.clear();int leaa.size();int lebb.size();int lecc.size();for(i0;ilea;i)ma[a[i]];for(i0;ileb;i)ma[b[i]];int x0;int y0;for(i0;ilec;i){mc[c[i]];if(xleac[i]a[x])x;if(ylebc[i]b[y])y;}int fl1;mapchar,int::iterator tt;for(ttmc.begin();tt!mc.end();tt){if(mc[tt-first]!ma[tt-first]){fl0;break;}}if(fl){if(xleayleb)printf(Yes\n);elseprintf(No\n);}elseprintf(No\n);}
} 转载于:https://www.cnblogs.com/nr1999/p/8997251.html