Replies: 9 comments
-
对数算法的代码好像有点问题 |
Beta Was this translation helpful? Give feedback.
-
在 |
Beta Was this translation helpful? Give feedback.
-
应该是递归爆栈了,我觉得可以考虑在n<k的时候即线性递推的时候改为for求解,这样应该不会考虑爆栈的情况了 |
Beta Was this translation helpful? Give feedback.
-
确实是这个原因QAQ |
Beta Was this translation helpful? Give feedback.
-
能否问下,它为啥res>0时,有个res+=res/(k-1)的操作 |
Beta Was this translation helpful? Give feedback.
-
这个貌似是递归的回溯过程吧 |
Beta Was this translation helpful? Give feedback.
-
这个不应该放在数学模块里面吗? |
Beta Was this translation helpful? Give feedback.
-
BTW,没有涉及到第 i 个被删除的人的位置的内容,代表题目:https://codeforces.ml/gym/101955/problem/K |
Beta Was this translation helpful? Give feedback.
-
对数递推有个地方没写清楚,补了个pr求过 |
Beta Was this translation helpful? Give feedback.
-
https://oi-wiki.org/misc/josephus/
OI Wiki 是一个编程竞赛知识整合站点,提供有趣又实用的编程竞赛知识以及其他有帮助的内容,帮助广大编程竞赛爱好者更快更深入地学习编程竞赛
Beta Was this translation helpful? Give feedback.
All reactions