Loading

摘要: Splay 是平衡树 \(Splay\) 是平衡树的一种 基本思想是, 对于查找频率较高的节点,使其处于离根节点相对较近的节点。 Spaly的基本操作有 rotate(旋转) splay (伸展) push_up push_down struct Node { int son[2], fa, val 阅读全文
posted @ 2020-11-10 20:02 —O0oO- 阅读(181) 评论(0) 推荐(0) 编辑
摘要: A - PERFECT NUMBER PROBLEM 题意 找到前五个因数之和(除了自己)是本身的数 思路 \(n\sqrt n\) 暴力打表 6, 28, 496, 8128, 33550336 M - Subsequence 题意 询问是否是子序列 思路 直接暴力 #include<bits/s 阅读全文
posted @ 2020-11-10 19:41 —O0oO- 阅读(146) 评论(0) 推荐(0) 编辑
摘要: D - Counting Sequences I 题意: 给 \(n\) , $1 \le n \le 3000$ 问满足 \(\sum_{i=1}^na_i = \prod_{i=1}^na_i\) 的方案数,对 $1e9+7$ 取模 思路: 可以暴力打表,用排列公式 \[ \dfrac {N!} 阅读全文
posted @ 2020-11-10 19:12 —O0oO- 阅读(136) 评论(0) 推荐(0) 编辑
摘要: F. Passing notes XL was very happy to see the satisfied faces of his classmates who ate the dog food. This time, he wanted to spread more dog food. Th 阅读全文
posted @ 2020-11-10 18:44 —O0oO- 阅读(124) 评论(0) 推荐(0) 编辑