#include<bits/stdc++.h> using namespace std; int t[1000005],cnt,T,n; string x,y[15]; int main(){ ios::sync_with_stdio(0); cin.tie(0),cout.tie(0); cin>>T; while(T--){ cin>>n; for(int i=1;i<=n;i++)cin>>y[i]; cin>>x; for(int i=1;i<=n;i++){ int fin=x.find(y[i]); while(fin!=string::npos){x[fin]='*';fin=x.find(y[i]);} } cout<<x<<endl; } }
为什么这个代码都能过T3?大样例都没过,还能AC?
全部评论
(2) 回帖