摘要: Codeforces Round448 D 题目大意 有两个长度相同的字符串a,b(长度不超过1e6),构造一个字符串c,使得c是a的重排序,并且c的字典序大于a,c的字典序小于b,问共有多少种构造的方法,答案对1e9+7取模 思路 若只考虑c a,那么从前往后遍历,如果当前取了一个$c_i a_i 阅读全文
posted @ 2017-11-30 22:25 CRAZYC4T 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round448 C 题目大意 n个数(n include include include include include include include include include define N 100005 const int inf=0x3f3f3f3f; def 阅读全文
posted @ 2017-11-28 19:38 CRAZYC4T 阅读(460) 评论(3) 推荐(0) 编辑
摘要: 状压DPhdu6006 c++ include include using namespace std; int h[1 阅读全文
posted @ 2017-11-28 16:06 CRAZYC4T 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 计蒜客计算之道初赛第六场 微软大楼设计方案(困难) 近日,微软新大楼的设计方案正在广泛征集中,其中一种方案格外引人注目。在这个方案中,大楼由 n 栋楼组成,这些楼从左至右连成一排,编号依次为 1 到 n,其中第 ii 栋楼有 $h_i$ 层。每栋楼的每一层为一个独立的 办公区域 ,可以步行 直达同层 阅读全文
posted @ 2017-06-06 09:51 CRAZYC4T 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Big is Better 题目大意:用火柴拼数字,每个数字需要的火柴如下图,共有n(n include include define N 3003 const int inf=0xfffffff; using namespace std; int f[]={6,2,5,5,4,5,6,3,7,6} 阅读全文
posted @ 2017-05-26 19:42 CRAZYC4T 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Beautiful numbers 题意:挑选出数字,这些数字能被他们的非0位整除。 思路:数位DP,由于1~9的最大公倍数是2520, ,再对有可能用到的余数进行离散化。 代码如下: Cpp include include include include define N 3000 typedef 阅读全文
posted @ 2017-05-24 08:37 CRAZYC4T 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 状压DPhdu6006 c++ include include using namespace std; int h[1 阅读全文
posted @ 2017-04-21 11:44 CRAZYC4T 阅读(111) 评论(0) 推荐(0) 编辑
摘要: CONTAINING_RECORD Containing record 是一个在C++编程中用处很大的一种技巧,它的功能为已知结构体或类的 某一成员 、 对象中该成员的地址 以及 这一结构体名或类名 ,从而得到 该对象的基地址 。 由于写法简单,它被当做一个宏来使用,写法是这样的。 这个宏运用的是地 阅读全文
posted @ 2017-04-19 08:13 CRAZYC4T 阅读(3155) 评论(0) 推荐(2) 编辑
摘要: E. Subordinates time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There are n workers in a 阅读全文
posted @ 2016-11-22 22:46 CRAZYC4T 阅读(306) 评论(0) 推荐(0) 编辑
摘要: D. Sea Battle time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D. Sea Battle time limit pe 阅读全文
posted @ 2016-11-22 22:33 CRAZYC4T 阅读(419) 评论(0) 推荐(0) 编辑