摘要: B - Discovering GoldYou are in a cave, a long cave! The cave can be represented by a 1 x N grid. Each cell of the cave can contai... 阅读全文
posted @ 2019-01-25 20:43 _年少有为 阅读(137) 评论(0) 推荐(0) 编辑
摘要: C - Race to 1 AgainRimi learned a new thing about integers, which is - any positive integer greater than 1 can be divided by its ... 阅读全文
posted @ 2019-01-25 20:43 _年少有为 阅读(206) 评论(0) 推荐(0) 编辑
摘要: A - A Dangerous MazeYou are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probabi... 阅读全文
posted @ 2019-01-25 20:42 _年少有为 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 程序设计挑战竞赛上156页说了枚举组合和子集的几种方法,我觉得挺好的,收藏一下都是利用二进制数的模型来进行枚举子集或者组合下面枚举集合都是在二进制位上进行枚举。##枚举k个数的子集void EunmSet(int k)//用k个二进制位数枚举k个状态{ ... 阅读全文
posted @ 2019-01-25 17:11 _年少有为 阅读(1967) 评论(0) 推荐(0) 编辑
摘要: ##CodeForces - 949B 题意:现在给你一个n,表示有2*n-1个方格,第奇数方格上会有一个数字 1-n按顺序放。第偶数个方格上是没有数字的。变动规则是排在最后一个位置的数字,移动到它前边最近的空位 。 直到数字之间没有空位。最终的数列是由n已... 阅读全文
posted @ 2019-01-25 17:10 _年少有为 阅读(130) 评论(0) 推荐(0) 编辑
摘要: nth_element() O(n)复杂度求第k+1小元素函数原型void nth_element(_RAIter, _RAIter, _RAIter);void nth_element(_RAIter, _RAIter, _RAIter, _Compar... 阅读全文
posted @ 2019-01-25 17:10 _年少有为 阅读(797) 评论(0) 推荐(0) 编辑