| 记录编号 | 
        19100 | 
        评测结果 | 
        AAAAAAAAAAAAAAAA | 
    
    
        | 题目名称 | 
        90.翻译玛雅著作 | 
        最终得分 | 
        100 | 
            
    
    
        | 用户昵称 | 
         苏轼 | 
        是否通过 | 
        通过 | 
    
    
        | 代码语言 | 
        C++ | 
        运行时间 | 
        0.324 s  | 
    
    
        | 提交时间 | 
        2010-09-28 20:52:08 | 
        内存使用 | 
        3.12 MiB  | 
        
    
    
    
    		显示代码纯文本
		
		#include <cstdio>
#include <string>
#include <cstring>
#include <algorithm>
using namespace std;
const int MAXS=3000005;
int g,s;
int t[259],tt[259];
char str[MAXS];
int re;
int main()
{
	freopen("writing.in","r",stdin);
	freopen("writing.out","w",stdout);
	scanf("%d%d",&g,&s);
	for(int i=0;i<g;i++)
	{
		char ch;
		do
		{
			ch=getchar();
		}while(!((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z')));
		t[ch-'A']++;
	}
	scanf("\n");
	scanf("%s",str);
	memcpy(tt,t,sizeof(t));
	for(int i=0;i<s;i++)
	{
		int tmp=str[i]-'A';
		t[tmp]--;
		if (i-g>=0)
			t[str[i-g]-'A']++;
		if (t[tmp]<0)
			continue;
		bool flag=true;
		for(int i=0;i<26&&flag;i++)
			if (t[i]!=0)
				flag=false;
		if (!flag)
			continue;
		for(int i='a'-'A';i<='z'-'A'&&flag;i++)
			if (t[i]!=0)
				flag=false;
		if (!flag)
			continue;
		re++;
	}
	printf("%d\n",re);
	return 0;
}