竞赛讨论区 > T3数据有问题?
头像
PNNPNN
发布于 2022-10-11 22:20 湖南
+ 关注

T3数据有问题?

#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) 回帖
加载中...
话题 回帖

等你来战

查看全部

热门推荐