牛客网多校第十场J

/*
2
2
lubenwei
niubi
3
aa
ab
abb

lubenweiubi
aabb
*/
#pragma GCC optimize(3)
#include 
using namespace std;
 
const int MAXL=1000005,SIGMA=26;
 
char s[MAXL],ans[MAXL];
set  pos[SIGMA];
 
void solve(){
    int n;
    scanf("%d%s",&n,s);
    memcpy(ans,s,sizeof(s));
    int l=strlen(s);
    for (int i=0;i

upper_bound

https://blog.csdn.net/naipp/article/details/52915573

你可能感兴趣的:(多校)