摘要: D 宿命之间的对决 原题链接 题意 现在给定一个正整数n,小红和小紫轮流操作,每次取n的一个因子x,使得n减去x。谁先将n减到0谁输。 小红先手操作,她想知道在双方足够聪明的情况下,谁会获得最终的胜利? 思路 奇偶相加减,(同偶异奇) 设奇数a为$2k_1 + 1$,奇数b为$2k_2 + 1$,偶 阅读全文
posted @ 2023-01-20 23:00 Keith- 阅读(54) 评论(0) 推荐(0) 编辑
摘要: F 迎接终结的寂灭 原题链接 宇宙终极答案 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<qu 阅读全文
posted @ 2023-01-20 21:58 Keith- 阅读(15) 评论(0) 推荐(0) 编辑
摘要: A 不断减损的时间 原题链接 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<queue> us 阅读全文
posted @ 2023-01-20 21:31 Keith- 阅读(20) 评论(0) 推荐(0) 编辑