UOJ Logo CJ_leo的博客

博客

论常数

2024-10-15 06:27:16 By CJ_leo

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倍杀了......

有人可以帮我解释一下原因||卡常吗???

code

评论

CJ_leo
~~UOJ没有 $\Latex$?差评!!~~ 好吧,还是有 $O(n\log(n))$ 选手没有垫到......
CSQ
@CJ_leo 我的甚至比 O(nlogn) 更劣你都帮我垫到了

发表评论

可以用@mike来提到mike这个用户,mike会被高亮显示。如果你真的想打“@”这个字符,请用“@@”。