for(int i=0;i<=10000000;++i){ for(int j=i;j<=10000000;++j){ long long x=j*j-i*i; if(x>10000000) break; f[x]=1; } }
把所有数都筛完只用300多ms 而且没有这样的题解