随笔分类 -  签到题

摘要:A. Amateur Chess Players 原题链接 题意 At the beginning, Cuber QQ, who has the white pieces, and Quber CC, who has the black pieces, place some of their pie 阅读全文
posted @ 2023-03-08 11:14 Keith- 阅读(44) 评论(0) 推荐(0)
摘要:H 阿宁讨伐虚空 原题链接 思路 $x≤L$时,脆皮都死完了,虚空蛇肯定不会被打到。 $x>R$时,脆皮怎么都死不玩,虚空蛇肯定会被打到。 $L≤x<R$时,如果$y \in [L, x)$,那么脆皮没有死完,区间$[L,x)$长度是$x−L$,因此概率是$\frac {x-L}{R-L+1} $ 阅读全文
posted @ 2023-02-04 11:31 Keith- 阅读(35) 评论(0) 推荐(0)
摘要:A 阿宁的签到题 原题链接 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<queue> usi 阅读全文
posted @ 2023-02-04 11:26 Keith- 阅读(28) 评论(0) 推荐(0)
摘要:A 清楚姐姐学信息论 原题链接 题意 给出$a,b$,问当$a,b$的值为多少时$a^b>b^a$ 思路 $a^b>b^a$ $blna>alnb$ $\frac{lna}{a}>\frac{lnb}{b}$ 令$f(x) = \frac{lnx}{x}$ $f'(x) = \frac{1-lnx} 阅读全文
posted @ 2023-01-31 18:39 Keith- 阅读(30) 评论(0) 推荐(0)
摘要:D 宿命之间的对决 原题链接 题意 现在给定一个正整数n,小红和小紫轮流操作,每次取n的一个因子x,使得n减去x。谁先将n减到0谁输。 小红先手操作,她想知道在双方足够聪明的情况下,谁会获得最终的胜利? 思路 奇偶相加减,(同偶异奇) 设奇数a为$2k_1 + 1$,奇数b为$2k_2 + 1$,偶 阅读全文
posted @ 2023-01-20 23:00 Keith- 阅读(71) 评论(0) 推荐(0)
摘要:F 迎接终结的寂灭 原题链接 宇宙终极答案 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<qu 阅读全文
posted @ 2023-01-20 21:58 Keith- 阅读(29) 评论(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- 阅读(31) 评论(0) 推荐(0)
摘要:H.本题主要考察了DFS 原题链接 题意 给出$n^2-1$个拼图及其状态,求出对于n*n整体中所缺失拼图的制作成本、 思路 由于拼图的完整性,那么缺失和多出来的数目应该是一致的,所以我们只需要记录$n^2-1$个拼图缺失和多出来的差值即可 代码 点击查看代码 #include<iostream> 阅读全文
posted @ 2023-01-18 18:56 Keith- 阅读(41) 评论(0) 推荐(0)
摘要:L.本题主要考察了运气 原题链接 题意 给出5个团体,每个团体4个人,猜出某个人的期望次数是多少? 思路 由于每个团和每个人并没有区别,因此最佳策略是先猜团后猜人 共5个团,第1次猜中的概率是0.2,第2次猜中的概率是0.2,第3次猜中的概率是0.2,第4次猜中的概率是0.4 //注意:第2次猜中的 阅读全文
posted @ 2023-01-18 17:45 Keith- 阅读(77) 评论(0) 推荐(0)
摘要:A.World Final? World Cup! (I) 原题链接 题意 AB两队ABABABABAB形式轮流罚球共10次,给出01串代表每次罚球的结果,问是否能在第x球后知道比赛结果,能则输出x,若10轮内没有分出胜负则输出-1 思路 胜利条件:胜球数多 如果第x球后就知道比赛结果,获胜的一队的 阅读全文
posted @ 2023-01-18 17:16 Keith- 阅读(40) 评论(0) 推荐(0)
摘要:#A. Greatest Convex You are given an integer $k$. Find the largest integer $x$, where $1≤x<k$, such that $x!+(x−1)!$† is a multiple of ‡ $k$, or deter 阅读全文
posted @ 2023-01-06 11:52 Keith- 阅读(84) 评论(0) 推荐(0)