??????????????? if (it == mmap.end()) {?
?
??????????????????? mask.reset();?
??????????????????? break;?
??????????????? }?
??????????????? else mask &= it->second;?????? //如果it里都有某位,则最后该子串必定包含在那个主串中?
??????????????? p = q;?
??????????? }?
?
??????????? ans = 0;?
??????????? for (j = 0; j < n; ++j)?
??????????????? if (mask[j]) ans += size[j];?
??????????? printf("%lld\n",ans);?
??????? }?
??? }?
}?
作者:woshi250hua