求助,4次CE

UVA11988 Broken Keyboard (a.k.a. Beiju Text)

代码 ```cpp #include<algorithm> #include<cstdio> #include<cstring> using namespace std; char a[100005]; int p,last,next[100005],n; int main() { while(scanf("%s",a+1)) { next[0]=0; last=p=0; n=strlen(a+1); for(int i=1;i<=n;i++) { if(a[i]=='[')p=0; else if(a[i]==']')p=last; else { next[i]=next[p]; next[p]=i; if(p==last)last=i; p=i; } } for(int i=next[0];i;i=next[i])printf("%c",a[i]); printf("\n"); } return 0; } ```
by 逆流之时 @ 2019-03-04 17:57:41


把next改成nex
by SSerxhs @ 2019-03-04 17:58:39


next大概是关键字qwq (好像index也是)
by 千华缭乱 @ 2019-03-04 18:02:04


这些关键字怎么判断?C++也没有加粗显示
by 逆流之时 @ 2019-03-04 18:06:30


@[逆流之时](/space/show?uid=144740) ~~在NOIPCE几次就知道了~~
by 千华缭乱 @ 2019-03-04 18:12:46


@[逆流之时](/space/show?uid=144740) 用vscode
by LJB00131 @ 2019-03-04 18:24:39


@[千华缭乱](/space/show?uid=67445) NOIP2018用了index而丢掉100分的我...
by Meatherm @ 2019-03-04 18:27:44


@[逆流之时](/space/show?uid=144740) 如果您不用 ```cpp using namespace std; ``` 也不会出现编译错误 QwQ
by 龙之吻—水货 @ 2019-03-04 18:57:55


@[兹磁洛谷](/space/show?uid=108949) ~~我过于菜而丢了1=~~
by 千华缭乱 @ 2019-03-05 14:23:37


|