William Wei

Results 20 issues of William Wei

将 `{sys.executable}` 相关代码实现路径转义,保证 shell 解析不会错误

需要支持直接在 `Graph` 库中 shuffle,而不仅仅是在输出时 shuffle。

Update2: 另外,相关函数放在 math.py 中是否合理? --- + https://github.com/luogu-dev/cyaron/issues/163 算法不保证均匀随机,如果追求区间内每个质数被选中的概率相等,可以使用 `prime_sieve` 预处理质数表再使用 `random` 库中的 `choice` 函数。 具体流程如下: 1. 在区间内随机一个数字; 2. 判断这个数是否是质数,若是则立即返回; 3. 寻找这个数字的下一个质数,若在范围内则立即返回; 4. 寻找这个数字的上一个质数,若在范围内则立即返回; 5. 范围内没有质数,报告错误。 --- Update: 已经对函数进行测试,与暴力查找进行了对拍,似乎没有问题 --- 我为此实现的...

[反素数](https://oi-wiki.org/math/number-theory/prime/#%E5%8F%8D%E7%B4%A0%E6%95%B0) 即在数据中加入大量因数个数较多的数字。 被这样的数据卡了两次了,可见是会用到的。

示例: ```python import random random.seed(4) from cyaron import generate_maze for row in generate_maze(21, 21): print(*row, sep='') ``` 输出: ``` ##################### #.#.#.........#.....# #.#.###.###.#####.### #...#.....#...#.#...# #.#####.###.###.#.### #.#.#.....#...#.....# #.#.###.###.###.###.# #...#.....#.......#.# ###.###.###.#.#.###.# #.#.#..S..#.#.#.#...# #.#.###.#########.#.#...

增加输出高维列表: ```python from cyaron import IO table = [['#', 'S', '.', '.', '#'], ['#', '#', '#', '.', '#'], ['#', '.', '#', '.', '#'], ['#', 'T', '#', '.', '#'], ['#', '.',...

可以使用 `len(list(self.iterate_edges()))` 代替。

https://github.com/Yue-plus/hexo-theme-arknights/blob/4503d7a2d51a0db99db043e073d1d8b4b7aeeb15/_config.yml#L53-L65 有没有可能为每个文件单独设置 `code_fold`? 或者是否可以为每个代码块设置是否展开? 在本项目中未找到相关文档。

good first issue

+ https://judge.yosupo.jp/problem/primality_test It is well known that when using the Miller–Rabin primality test for 64-bit integers, we only need to test with the base set $\\{2, 325, 9375, 28178, 450775,...