📄 2986101_tle.cc
字号:
#include <map>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
map <string,int> h;
char tmp[1000000];
int main()
{
int i, l;
int ans = 0;
string str, t;
int n, nc;
cin >> n >> nc;
scanf("%s",tmp);
str = tmp;
l = str.length();
for(i = 0; i <= l-n; i++)
{
t = str.substr(i,n);
if(h[t]==0)
{
h[t] = 1;
ans++;
}
}
cout << ans << endl;
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -