随笔分类 - 签到题
摘要: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
阅读全文
摘要:A 阿宁的签到题 原题链接 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<queue> usi
阅读全文
摘要:D 宿命之间的对决 原题链接 题意 现在给定一个正整数n,小红和小紫轮流操作,每次取n的一个因子x,使得n减去x。谁先将n减到0谁输。 小红先手操作,她想知道在双方足够聪明的情况下,谁会获得最终的胜利? 思路 奇偶相加减,(同偶异奇) 设奇数a为 ,奇数b为 ,偶
阅读全文
摘要:F 迎接终结的寂灭 原题链接 宇宙终极答案 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<qu
阅读全文
摘要:A 不断减损的时间 原题链接 代码 点击查看代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<vector> #include<queue> us
阅读全文
摘要:H.本题主要考察了DFS 原题链接 题意 给出 个拼图及其状态,求出对于n*n整体中所缺失拼图的制作成本、 思路 由于拼图的完整性,那么缺失和多出来的数目应该是一致的,所以我们只需要记录 个拼图缺失和多出来的差值即可 代码 点击查看代码 #include<iostream>
阅读全文
摘要:L.本题主要考察了运气 原题链接 题意 给出5个团体,每个团体4个人,猜出某个人的期望次数是多少? 思路 由于每个团和每个人并没有区别,因此最佳策略是先猜团后猜人 共5个团,第1次猜中的概率是0.2,第2次猜中的概率是0.2,第3次猜中的概率是0.2,第4次猜中的概率是0.4 //注意:第2次猜中的
阅读全文
摘要:A.World Final? World Cup! (I) 原题链接 题意 AB两队ABABABABAB形式轮流罚球共10次,给出01串代表每次罚球的结果,问是否能在第x球后知道比赛结果,能则输出x,若10轮内没有分出胜负则输出-1 思路 胜利条件:胜球数多 如果第x球后就知道比赛结果,获胜的一队的
阅读全文
摘要:#A. Greatest Convex You are given an integer . Find the largest integer , where , such that † is a multiple of ‡ , or deter
阅读全文