摘要:
巴什博弈: 问题:给你一堆石子共n个,你最多只能拿走m个,问什么情况下先手胜 结论:当n%(m+1)==0的时候先手输,反之则赢 简而言之,谁先面对k*(m+1)(k是任意值),谁就输 题目 代码: 1 //巴什博弈 2 //谁先面对m+1(m是最多拿多少石子)那谁就输 3 //因为先手最多拿m个, 阅读全文
摘要:
Mr. Pote's shop sells beans now. He has N bags of beans in his warehouse, and he has numbered them with 1, 2, …, N according to their expired dates. T 阅读全文