mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
21 lines
401 B
C++
21 lines
401 B
C++
#include<iostream>
|
|
#include<set>
|
|
#include<string>
|
|
using namespace std;
|
|
int main(){
|
|
set<string> Set;
|
|
int t,n,nc;
|
|
string str;
|
|
cin>>t;
|
|
while(t--){
|
|
cin>>n>>nc>>str;
|
|
int size=str.size();
|
|
for(int i=0;i<size-n+1;i++){
|
|
string tmp(str,i,n);
|
|
Set.insert(tmp);
|
|
}
|
|
cout<<Set.size()<<endl;
|
|
}
|
|
return 0;
|
|
}
|