标签:ash scanf %s signed cpp type i+1 for int
typedef unsigned long long ull; ull xp[maxn],hash1[maxn]; void init() { xp[0]=1; for (int i=1; i<=maxn; i++) { xp[i]=xp[i-1]*175; } } ull get_hash(int i,int l) //以i开始长度为l的字串 { return hash1[i]-hash1[i+l]*xp[l]; } scanf("%s",str); int len=strlen(str); for (int i=len-1; i>=0; i--) { hash1[i]=hash1[i+1]*175+str[i]-‘a‘+1; }
标签:ash scanf %s signed cpp type i+1 for int
原文地址:https://www.cnblogs.com/Accpted/p/11356476.html