0_0_22905164_29965.cpp:17:1: error: stray '\241' in program
void cdfs(int s) { if (vis[s]) return; vis[s] = true; for(int t=1; t<=size; ++t) if (G[s][eps][t]) cdfs(t); } long long closure(int s) { if (clos[s] == 0) { memset(vis,0,sizeof(vis)); cdfs(s); for(int i=1; i<=size; ++i) if (vis[i]) clos[s] |= 1LL<<i; } return clos[s]; } long long where(int s, int e) { long long ans = 0; for(int i=1; i<=size; ++i) if (G[s][e][i]) ans |= closure(i); return ans; } bool contain_final(long long s) { return ((s>>fa.second)&1)==1; } PII concat(PII l, PII r) { G[l.second][eps][r.first] = true; return mp(l.first, r.second); } PII star(PII a) { int s = ++size; int t = ++size; G[s][eps][a.first] = true; G[s][eps][t] = true; G[a.second][eps][a.first] = true; G[a.second][eps][t] = true; return mp(s,t); } PII merge(vector macs) { int s = ++size; int t = ++size; for(int i=0; i<macs.size(); ++i) { G[s][eps][macs[i].first] = true; G[macs[i].second][eps][t] = true; } return mp(s,t); } int nstar[N]; PII parse(char*s, int l, int r) { if (l>r) { ++size; return mp(size,size); } if (l==r) { if (s[l] == ¡®*¡¯) { return parse(s,1,0); //È¥µôÕâ¾ä¾ÍWAÁË¡£¡£ÈÕ£¡ } PII fa = mp(size+1, size+2); G[size+1][s[l]-¡®0¡¯][size+2] = true; size += 2; return fa; } if (s[l] == ¡®(¡¯ && s® == ¡®)¡¯ && par[l]==r) return parse(s, l+1, r-1); if (del[l] < r) { vector macs; while(del[l] < r) { macs.push_back(parse(s, l, del[l]-1)); l = del[l]+1; } if (l<=r) macs.push_back(parse(s, l, r)); return merge(macs); } if (s[par[l]+1] == ¡®*¡¯) { if (par[l]+1 == r) return star(parse(s, l, par[l])); return concat(parse(s, l, par[l]1), parse(s, par[l]2, r)); } return concat(parse(s, l, par[l]), parse(s, par[l]+1, r)); } void parse(char*s) { memset(clos,0,sizeof(clos)); memset(G,0,sizeof(G)); size = 0; int l = strlen(s); del[l] = par[l] = nstar[l] = l; stack left; for(int i=0; i<l; ++i) { if (s[i] == ¡®(¡¯) { left.push(i); continue; } if (s[i] == ¡®)¡¯) { par[left.top()] = i; left.pop(); continue; } par[i] = i; } for(int i=l-1; i>=0; ¡ªi) switch(s[i]) { case ¡®|¡¯: del[i] = i; nstar[i] = nstar[i+1]; break; case ¡®(¡¯: del[i] = del[par[i]+1]; nstar[i] = nstar[par[i]+1]; break; case ¡®*¡¯: del[i] = del[i+1]; nstar[i] = i; break; default: del[i] = del[i+1]; nstar[i] = nstar[i+1]; } fa = parse(s, 0, l-1); }
^
0_0_22905164_29965.cpp:17:1: error: stray '\256' in program
0_0_22905164_29965.cpp:17:1: error: stray '\241' in program
0_0_22905164_29965.cpp:17:1: error: stray '\257' in program
0_0_22905164_29965.cpp:110:1: error: stray '\241' in program
if (enfa.contain_final(it¡úfirst))
^
0_0_22905164_29965.cpp:110:1: error: stray '\372' in program
0_0_22905164_29965.cpp:111:1: error: stray '\241' in program
accept[it¡úsecond] = true;
^
0_0_22905164_29965.cpp:111:1: error: stray '\372' in program
0_0_22905164_29965.cpp:124:1: error: stray '\241' in program
scanf(¡°%d¡±,&T);
^
0_0_22905164_29965.cpp:124:1: error: stray '\260' in program
0_0_22905164_29965.cpp:124:1: error: stray '\241' in program
0_0_22905164_29965.cpp:124:1: error: stray '\261' in program
0_0_22905164_29965.cpp:125:1: error: stray '\241' in program
while(T¡ª)
^
0_0_22905164_29965.cpp:125:1: error: stray '\252' in program
0_0_22905164_29965.cpp:127:1: error: stray '\241' in program
scanf(¡°%s¡±,line);
^
0_0_22905164_29965.cpp:127:1: error: stray '\260' in program
0_0_22905164_29965.cpp:127:1: error: stray '\241' in program
0_0_22905164_29965.cpp:127:1: error: stray '\261' in program
0_0_22905164_29965.cpp:130:1: error: stray '\241' in program
scanf(¡°%s¡±,line);
^
0_0_22905164_29965.cpp:130:1: error: stray '\260' in program
0_0_22905164_29965.cpp:130:1: error: stray '\241' in program
0_0_22905164_29965.cpp:130:1: error: stray '\261' in program
0_0_22905164_29965.cpp:134:1: error: stray '\241' in program
printf(¡°%s\n¡±, dfa3.empty()?¡°YES¡±:¡°NO¡±);
^
0_0_22905164_29965.cpp:134:1: error: stray '\260' in program
0_0_22905164_29965.cpp:134:1: error: stray '\' in program
0_0_22905164_29965.cpp:134:1: error: stray '\241' in program
0_0_22905164_29965.cpp:134:1: error: stray '\261' in program
0_0_22905164_29965.cpp:134:1: error: stray '\241' in program
0_0_22905164_29965.cpp:134:1: error: stray '\260' in program
0_0_22905164_29965.cpp:134:1: error: stray '\241' in program
0_0_22905164_29965.cpp:134:1: error: stray '\261' in program
0_0_22905164_29965.cpp:134:1: error: stray '\241' in program
0_0_22905164_29965.cpp:134:1: error: stray '\260' in program
0_0_22905164_29965.cpp:134:1: error: stray '\241' in program
0_0_22905164_29965.cpp:134:1: error: stray '\261' in program
0_0_22905164_29965.cpp:17:746: error: 'vector' is not a type
void cdfs(int s) { if (vis[s]) return; vis[s] = true; for(int t=1; t<=size; ++t) if (G[s][eps][t]) cdfs(t); } long long closure(int s) { if (clos[s] == 0) { memset(vis,0,sizeof(vis)); cdfs(s); for(int i=1; i<=size; ++i) if (vis[i]) clos[s] |= 1LL<<i; } return clos[s]; } long long where(int s, int e) { long long ans = 0; for(int i=1; i<=size; ++i) if (G[s][e][i]) ans |= closure(i); return ans; } bool contain_final(long long s) { return ((s>>fa.second)&1)==1; } PII concat(PII l, PII r) { G[l.second][eps][r.first] = true; return mp(l.first, r.second); } PII star(PII a) { int s = ++size; int t = ++size; G[s][eps][a.first] = true; G[s][eps][t] = true; G[a.second][eps][a.first] = true; G[a.second][eps][t] = true; return mp(s,t); } PII merge(vector macs) { int s = ++size; int t = ++size; for(int i=0; i<macs.size(); ++i) { G[s][eps][macs[i].first] = true; G[macs[i].second][eps][t] = true; } return mp(s,t); } int nstar[N]; PII parse(char*s, int l, int r) { if (l>r) { ++size; return mp(size,size); } if (l==r) { if (s[l] == ¡®*¡¯) { return parse(s,1,0); //È¥µôÕâ¾ä¾ÍWAÁË¡£¡£ÈÕ£¡ } PII fa = mp(size+1, size+2); G[size+1][s[l]-¡®0¡¯][size+2] = true; size += 2; return fa; } if (s[l] == ¡®(¡¯ && s® == ¡®)¡¯ && par[l]==r) return parse(s, l+1, r-1); if (del[l] < r) { vector macs; while(del[l] < r) { macs.push_back(parse(s, l, del[l]-1)); l = del[l]+1; } if (l<=r) macs.push_back(parse(s, l, r)); return merge(macs); } if (s[par[l]+1] == ¡®*¡¯) { if (par[l]+1 == r) return star(parse(s, l, par[l])); return concat(parse(s, l, par[l]1), parse(s, par[l]2, r)); } return concat(parse(s, l, par[l]), parse(s, par[l]+1, r)); } void parse(char*s) { memset(clos,0,sizeof(clos)); memset(G,0,sizeof(G)); size = 0; int l = strlen(s); del[l] = par[l] = nstar[l] = l; stack left; for(int i=0; i<l; ++i) { if (s[i] == ¡®(¡¯) { left.push(i); continue; } if (s[i] == ¡®)¡¯) { par[left.top()] = i; left.pop(); continue; } par[i] = i; } for(int i=l-1; i>=0; ¡ªi) switch(s[i]) { case ¡®|¡¯: del[i] = i; nstar[i] = nstar[i+1]; break; case ¡®(¡¯: del[i] = del[par[i]+1]; nstar[i] = nstar[par[i]+1]; break; case ¡®*¡¯: del[i] = del[i+1]; nstar[i] = i; break; default: del[i] = del[i+1]; nstar[i] = nstar[i+1]; } fa = parse(s, 0, l-1); }
^
0_0_22905164_29965.cpp:137:1: error: expected '}' at end of input
}
^
0_0_22905164_29965.cpp: In member function 'PII eNFA::merge(int)':
0_0_22905164_29965.cpp:17:813: error: request for member 'size' in 'macs', which is of non-class type 'int'
void cdfs(int s) { if (vis[s]) return; vis[s] = true; for(int t=1; t<=size; ++t) if (G[s][eps][t]) cdfs(t); } long long closure(int s) { if (clos[s] == 0) { memset(vis,0,sizeof(vis)); cdfs(s); for(int i=1; i<=size; ++i) if (vis[i]) clos[s] |= 1LL<<i; } return clos[s]; } long long where(int s, int e) { long long ans = 0; for(int i=1; i<=size; ++i) if (G[s][e][i]) ans |= closure(i); return ans; } bool contain_final(long long s) { return ((s>>fa.second)&1)==1; } PII concat(PII l, PII r) { G[l.second][eps][r.first] = true; return mp(l.first, r.second); } PII star(PII a) { int s = ++size; int t = ++size; G[s][eps][a.first] = true; G[s][eps][t] = true; G[a.second][eps][a.first] = true; G[a.second][eps][t] = true; return mp(s,t); } PII merge(vector macs) { int s = ++size; int t = ++size; for(int i=0; i<macs.size(); ++i) { G[s][eps][macs[i].first] = true; G[macs[i].second][eps][t] = true; } return mp(s,t); } int nstar[N]; PII parse(char*s, int l, int r) { if (l>r) { ++size; return mp(size,size); } if (l==r) { if (s[l] == ¡®*¡¯) { return parse(s,1,0); //È¥µôÕâ¾ä¾ÍWAÁË¡£¡£ÈÕ£¡ } PII fa = mp(size+1, size+2); G[size+1][s[l]-¡®0¡¯][size+2] = true; size += 2; return fa; } if (s[l] == ¡®(¡¯ && s® == ¡®)¡¯ && par[l]==r) return parse(s, l+1, r-1); if (del[l] < r) { vector macs; while(del[l] < r) { macs.push_back(parse(s, l, del[l]-1)); l = del[l]+1; } if (l<=r) macs.push_back(parse(s, l, r)); return merge(macs); } if (s[par[l]+1] == ¡®*¡¯) { if (par[l]+1 == r) return star(parse(s, l, par[l])); return concat(parse(s, l, par[l]1), parse(s, par[l]2, r)); } return concat(parse(s, l, par[l]), parse(s, par[l]+1, r)); } void parse(char*s) { memset(clos,0,sizeof(clos)); memset(G,0,sizeof(G)); size = 0; int l = strlen(s); del[l] = par[l] = nstar[l] = l; stack left; for(int i=0; i<l; ++i) { if (s[i] == ¡®(¡¯) { left.push(i); continue; } if (s[i] == ¡®)¡¯) { par[left.top()] = i; left.pop(); continue; } par[i] = i; } for(int i=l-1; i>=0; ¡ªi) switch(s[i]) { case ¡®|¡¯: del[i] = i; nstar[i] = nstar[i+1]; break; case ¡
|