![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
UVA
文章平均质量分 60
liyingshou
这个作者很懒,什么都没留下…
展开
-
uva 1608 Non-boring sequences
解题思路: 不无聊的序列,这是刘汝佳紫书上的一道题,首先先找出一个独一无二的数字,那么只要跨越了这个数字的序列就是不无聊的,这个时候,再去找这个数字左边的序列和这个数字右边的序列,看是否是无聊的 代码: #include #include #include #include using namespace std; const int MAX = 200010; int N,T; in原创 2017-07-30 08:35:12 · 130 阅读 · 0 评论 -
uva12627 Erratic Expansion
解题思路: 观察可得,其实后一个状态是三个一样的前一个状态和全是蓝色的球的部分组成,这里要求a到b,那么就去求1到b减去1到a,这是很重要的思想,然后,根据a的大小,是在中线以上还是中线一下,如果是在中线以上,其实就是前一个状态的两倍,因为是两个一样的部分的组合,如果是在中线以下,就是两倍的前一个状态加上向上迁移之后的前一个状态,写出递推公式,可以求解 代码: #include #inclu原创 2017-07-30 08:20:37 · 171 阅读 · 0 评论 -
uva12034 Race
Description Tamim and Lina, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded and wandered around, even in their holidays. They passed several months in this wa原创 2017-07-29 08:30:25 · 196 阅读 · 0 评论 -
I Can Guess the Data Structure! uva11995
I Can Guess the Data Structure! There is a bag-like data structure, supporting two operations: 1 x Throw an element x into the bag. 2 Take out an element from the bag. Given a sequence原创 2017-07-27 08:04:00 · 264 阅读 · 0 评论