摘要: 简单模拟题,可以利用一下能被11整除的数的特点:奇数位的数字和与偶数位的数字和之差能被11整除。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const int N = 1000000; 8 ... 阅读全文
posted @ 2015-08-11 19:49 hxy_has_been_used 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 容易联想到利用manacher算法获得len数组,然后枚举第二段的长度判断能否和第三段对应上,能的话就更新答案。另外枚举长度的时候,小于等于当前答案的长度就没有必要枚举了,不然可能会超时。 1 #include 2 #include 3 #include 4 using namespace s... 阅读全文
posted @ 2015-08-11 18:47 hxy_has_been_used 阅读(384) 评论(3) 推荐(0) 编辑
摘要: 很显然是树形背包,注意m为0的情况。 阅读全文
posted @ 2015-08-11 09:49 hxy_has_been_used 阅读(149) 评论(0) 推荐(0) 编辑