rt.
test.in:
5
1 2 3 4
freopen("test.in","r",stdin);
freopen("test.out","w",stdout);
n=read();for(int i=1;i<=n;i++)a=read();
这样写会使得没有读入完而无法输出。
freopen("test.in","r",stdin);
freopen("test.out","w",stdout);
n=read();for(int i=1;i<=n;i++)a[i]=read();
而这样写却可以读入完,当然 an=0。
为什么???