[GO] Thank you for registering 100,000 paiza.

What is this

There was a paiza 100,000 registration thank you special W campaign. It seems that it is popular to summarize, so both me and me. By the way, my uncle is only in C language.

algorithm

--Prepare a big array --Mark the loaded s_i * s_j --Count from p_i and output the number advanced to the mark

code

I wrote it down and didn't know which one I submitted (ぉ) Probably this one.

i,j,S[1<<20],F[4096];
main(X)
{
    for(;~scanf("%d",F+i++);)
        for(j=*S=*F+2;j<i;S[X<S-F?X:0]=1)
            X=F[i-1]*F[j++];

    for(i=1;++i-*S;printf("%d\n",j-X))
        for(X=j=F[i];!S[j];++j);
}

It's basically the same as fuyutsubaki.

A snake foot named commentary

Self-criticism

That's all from the field.

Recommended Posts

Thank you for registering 100,000 paiza.