posted @ 2024-04-18 14:29 云起 阅读(33) 评论(0) 推荐(0) 编辑
摘要:
约瑟夫问题 N个人围成一圈,第一个人从1开始报数,报M的将被杀掉,下一个人接着从1开始报。如此反复,最后剩下一个,求最后的胜利者。 求解过程 单次求解过程 单独一人 直接返回1 通用过程 当前编号 执行后编号 1 n-m+1 2 n-m+2 ... ... m-1 n-1(n-m+m-1) m 0( 阅读全文
posted @ 2024-04-18 14:29 云起 阅读(33) 评论(0) 推荐(0) 编辑
posted @ 2024-04-18 12:05 云起 阅读(28) 评论(0) 推荐(0) 编辑
posted @ 2024-04-01 18:31 云起 阅读(8) 评论(1) 推荐(0) 编辑
posted @ 2024-03-27 16:11 云起 阅读(5) 评论(0) 推荐(0) 编辑
posted @ 2024-03-15 17:15 云起 阅读(71) 评论(0) 推荐(0) 编辑
posted @ 2024-02-05 15:44 云起 阅读(145) 评论(0) 推荐(0) 编辑
posted @ 2023-12-13 12:34 云起 阅读(57) 评论(0) 推荐(0) 编辑
posted @ 2023-09-20 18:25 云起 阅读(86) 评论(0) 推荐(0) 编辑
posted @ 2023-07-25 12:46 云起 阅读(43) 评论(0) 推荐(0) 编辑
posted @ 2023-07-13 10:21 云起 阅读(16) 评论(0) 推荐(0) 编辑
Copyright © 2025 云起
Powered by .NET 9.0 on Kubernetes