Wrong Answer
/in/foo.cc: In function 'int main()': /in/foo.cc:26:33: warning: iteration 30003 invokes undefined behavior [-Waggressive-loop-optimizations] for(int i=1;i<=mx;i++) fa[i]=i,num[i]=1; ~~~~~^~ /in/foo.cc:26:18: note: within this loop for(int i=1;i<=mx;i++) fa[i]=i,num[i]=1; ^