开学之后完全没时间写博客.... HDU 2089 不要62(vjudge) 数位DP 思路: 题目给出区间[n,m] ,找出不含4或62的数的个数 用一个简单的差分:先求0~m+1的个数,再减去0~n的个数. 但问题依旧不简单,再次简化为求0~i位数中不含4或62的数的个数. 所以第i位数中的吉利 ...
分类:
其他好文 时间:
2019-09-16 19:18:43
阅读次数:
90
http://acm.hdu.edu.cn/showproblem.php?pid=6514 Problem Description Xiaoteng has a large area of land for growing crops, and the land can be seen as a ...
分类:
其他好文 时间:
2019-09-16 09:42:38
阅读次数:
89
下面继续给出HDU 2033~2043的AC程序,供大家参考。2033~2043这10道题就被归结为“ACM程序设计期末考试(2006/06/07) ”和“2005实验班短学期考试 ”。 HDU 2033:人见人爱A+B 简单分支结构。 #include <stdio.h> int main() { ...
分类:
其他好文 时间:
2019-09-16 09:25:47
阅读次数:
93
KMP kmp处理题型总结 Manacher POJ - 3974 Palindrome (Manacher模板+讲解) 最大最小表示法 HDU-3374 String Problem (最小最大表示法) AC自动机 AC自动机总结 ...
分类:
其他好文 时间:
2019-09-15 19:00:54
阅读次数:
76
[TOC] 例题:hdu 4585 Treap树 是一种简单的平衡二叉搜索树。 二叉搜索树的每一个节点都有一个键值,除此之外Treap树为每个节点人为添加了一个称之为优先级的权值。对于键值来说,这是一棵二叉搜索树,对于权值来说这是一个堆。 1、Treap树的唯一性 Treap树的重要特性:另每个节点 ...
分类:
其他好文 时间:
2019-09-15 01:20:54
阅读次数:
104
[TOC] 例题:hdu 1213 c // include include include include include include include include include include include using namespace std; const int MAXN = 1 ...
分类:
其他好文 时间:
2019-09-15 01:05:38
阅读次数:
87
题目链接: "HDU 5119" Problem Description Matt has N friends. They are playing a game together. Each of Matt’s friends has a magic number. In the game, Mat ...
分类:
移动开发 时间:
2019-09-14 00:48:37
阅读次数:
116
HDU 5737 很明显能发现数据是随机的。 我们用set去维护值一样的段, 因为随机所以set里面线段的大小减少得很快, 平均大概30个左右。 每次查询暴力处理每一段相同的在主席树上查找累加答案就可以了。 但是这个好像不是标算, 标算复杂度(n + m) * log(n) 并且数据不是随机也可以。 ...
分类:
其他好文 时间:
2019-09-13 22:43:38
阅读次数:
97
Prime Ring Problem HDU - 1016 A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the ...
分类:
其他好文 时间:
2019-09-13 21:50:39
阅读次数:
128
汉诺塔III HDU - 2064 汉诺塔III 约19世纪末,在欧州的商店中出售一种智力玩具,在一块铜板上有三根杆,最左边的杆上自上而下、由小到大顺序串着由64个圆盘构成的塔。目的是将最左边杆上的盘全部移到右边的杆上,条件是一次只能移动一个盘,且不允许大盘放在小盘的上面。 现在我们改变游戏的玩法, ...
分类:
其他好文 时间:
2019-09-13 19:27:53
阅读次数:
95