As an $O(n)$ code,this one is worse than most $O(n log n)$ code, even becoming the worst solution and being killed by 10 times the best solution.As it ran so slowly,I wasn't sure if I could pass it.Can someone tell me why and help me reduce the constant???
我的常数最多只有当 $2 \nmid n$ 时再次计算的2......
但是将最优解10倍杀了......
有人可以帮我解释一下原因||卡常吗???