codeforces 372 Complete the Word(双指针)
题意:给出一个字符串,其中'?'代表这个字符是可变的,要求一个连续的26位长的串,其中每个字母都只出现一次
#include#include #include #include #include #include #include #define ll long long#define inf 1000000000using namespace std;inline int read(){ int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9') { if(ch=='-')f=-1; ch=getchar(); } while(ch>='0'&&ch<='9') { x=x*10+ch-'0'; ch=getchar(); } return x*f;}const int N=5e4+10;char a[N];int book[30];int main(){ while(~scanf("%s",a)) { int i=0,j=0,len=strlen(a); int u,v; memset(book,0,sizeof(book)); for(j=0;j