上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 57 下一页
摘要: 记录一下打的比赛 阅读全文
posted @ 2019-08-21 18:20 heyuhhh 阅读(914) 评论(0) 推荐(0) 编辑
摘要: "传送门" A.Rikka with Quicksort 前来填坑= = 题解不想再码一遍了, "戳这看题解" )。 思路挺清晰的,推式子需要用到高中数列的技巧,还是有点巧妙。之后分段打表来搞就行。 注意一点就是最终推出来的式子中: $$ f(n)=\frac{n 1}{(n + 1)(n + 2) 阅读全文
posted @ 2019-08-20 19:30 heyuhhh 阅读(408) 评论(0) 推荐(1) 编辑
摘要: "传送门" A.Blackjack 题意: 现在有$n$张卡片,每张都有一个数值$x_i$。 给定$a,b$,现在有一个人每次随机抽出一张卡片出来,并且加上其数值,如果数值和在$(a,b]$的范围内他就胜利;如果超过了$b$,他就输了。 他会一直抽下去,直到胜利或者失败。 现在问他获胜的概率为多少? 阅读全文
posted @ 2019-08-19 19:57 heyuhhh 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 传送门 D.Acesrc and Hunting 将最上面两排作为中转站; 自底向下往上,之后又从上往下; 第三排开始每步长度为$2$或者$\sqrt{2}\(,上面两排步长可能为\)\sqrt{5}$。 E.Acesrc and String Theory 题意: 询问$k$循环的子串个数,$1\ 阅读全文
posted @ 2019-08-19 19:29 heyuhhh 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 2019牛客暑期多校训练营(第九场) "题目链接" A.The power of Fibonacci 注意到模数为合数,并且可以拆为$2^9,5^9$,这样就相当于将原问题拆解成了规模比较小的情况。 通过$2^9,5^9$分别求出循环节,找到问题的解,之后$CRT$合并即可。 Code cpp in 阅读全文
posted @ 2019-08-17 09:51 heyuhhh 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 记录平时遇到的一些知识点。 原根 阶:设$a,p$是整数且互质,那么满足$a^n=1\mod p$的最小整数$n$就称为$a$模$p$的阶。 原根:当$a$模$m$的阶为$\varphi(m)$时,就称$a$为模$m$的一个原根。 性质:假设$g$为模$m$的一个原根,那么满足$g1,g2,\cdo 阅读全文
posted @ 2019-08-16 21:24 heyuhhh 阅读(381) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round 579 (Div. 3) "传送门" A. Circle of Students 这题我是直接把正序、逆序的两种放在数组里面直接判断。 Code cpp include using namespace std; typedef long long ll; const 阅读全文
posted @ 2019-08-15 11:01 heyuhhh 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Comet OJ Contest 8 "传送门" A.杀手皇后 签到。 Code cpp include using namespace std; typedef long long ll; const int N = 1e5 + 5; int n; int w[N]; ll sumv, sum; 阅读全文
posted @ 2019-08-13 21:25 heyuhhh 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round 578 (Div. 2) "传送门" A. Hotelier 暴力即可。 Code cpp include using namespace std; typedef long long ll; const int N = 2e5 + 5; int t, n, m, 阅读全文
posted @ 2019-08-13 20:48 heyuhhh 阅读(256) 评论(2) 推荐(0) 编辑
摘要: 2019牛客暑期多校训练营(第八场) "传送门" A.All one Matrices 枚举每一行作为极大矩阵的底部,然后枚举列根据$up[i][j]$来确定矩阵高度,通过单调栈找到其左右最远扩展位置,之后通过预处理出行$1$个数的前缀和,判断一下下一行对应位置是否全为$1$即可。 Code cpp 阅读全文
posted @ 2019-08-13 20:32 heyuhhh 阅读(351) 评论(0) 推荐(0) 编辑
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 57 下一页