上一页 1 2 3 4 5 6 7 8 ··· 18 下一页
摘要: ##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 _年少有为 阅读(796) 评论(0) 推荐(0) 编辑
摘要: ##CodeForces - 949B 题意:现在给你一个n,表示有2*n-1个方格,第奇数方格上会有一个数字 1-n按顺序放。第偶数个方格上是没有数字的。变动规则是排在最后一个位置的数字,移动到它前边最近的空位 。 直到数字之间没有空位。最终的数列是由n已... 阅读全文
posted @ 2019-01-24 18:03 _年少有为 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下方格子,并瞬移过去(如从下图中的红色格子能直接瞬移到蓝色格子),求到第nn行第mm列的格子有几种方案,答案对1000000007取模。 Input多组测试数据。 两个整数n,m(2≤n,m... 阅读全文
posted @ 2019-01-24 18:00 _年少有为 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 杜教BM递推,据说可以输入矩阵,但是我还不太清楚,初始数据在初始化vector容器时候输入就ok ,输出第n项#include using namespace std;#define rep(i,a,n) for (long long i=a;i=a;i-... 阅读全文
posted @ 2019-01-23 08:57 _年少有为 阅读(554) 评论(0) 推荐(0) 编辑
摘要: M - God of WarAt 184~280 A.D ,there were many kingdoms in China. Three strongest among them are “Wei”, “Shu”, “Wu”. People call t... 阅读全文
posted @ 2019-01-23 08:56 _年少有为 阅读(168) 评论(0) 推荐(0) 编辑
摘要: L - Tiling Dominoes闲聊在大白书上383383383页,上面有详细讲解这道题的dpdpdp方法,第一次做这类状压dp的题时,用的dp的时间复杂度是O(2m∗2m∗n)O(2^m*2^m*n)O(2m∗2m∗n) 可以过另一个一模一样的题,当... 阅读全文
posted @ 2019-01-23 08:56 _年少有为 阅读(159) 评论(0) 推荐(0) 编辑
摘要: J - Hie with the PieThe Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possible. Unfortunately, d... 阅读全文
posted @ 2019-01-23 08:56 _年少有为 阅读(235) 评论(0) 推荐(0) 编辑
摘要: H - Imperishable NightAfter coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decide... 阅读全文
posted @ 2019-01-22 18:01 _年少有为 阅读(407) 评论(0) 推荐(0) 编辑
摘要: G - Corn FieldsFarmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M≤ 12; 1 ≤ N ≤ 12) square parcels... 阅读全文
posted @ 2019-01-22 17:59 _年少有为 阅读(118) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 18 下一页