随笔分类 - 字符串 字典树
摘要:Query on A Tree Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others) Problem Description Monkey A lives on a tree, he
阅读全文
摘要:D. Acyclic Organic Compounds You are given a tree T with n vertices (numbered 1 through n) and a letter in each vertex. The tree is rooted at vertex 1
阅读全文
摘要:XOR 游戏 Problem Description 众所周知,度度熊喜欢XOR运算[(XOR百科)](http://baike.baidu.com/view/674171.htm)。今天,它发明了一种XOR新游戏,最开始,它有一个长度为N的数组,度度熊可以任意添加分割线,将数组划分为M段,且每段长
阅读全文
摘要:E. Beautiful Subarrays One day, ZS the Coder wrote down an array of integers a with elements a1, a2, ..., an. A subarray of the array a is a sequence
阅读全文
摘要:Remember the Word Since Jiejie can’t remember numbers clearly, he just uses sticks to help himself. Allowing for Jiejie’sonly 20071027 sticks, he can
阅读全文
摘要:Revenge of FibonacciProblem DescriptionThe well-known Fibonacci sequence is defined as following:Here we regard n as the index of the Fibonacci number...
阅读全文
摘要:Chip FactoryProblem DescriptionJohn is a manager of a CPU chip factory, the factory produces lots of chips everyday. To manage large amounts of produc...
阅读全文
摘要:POJ 3630Phone List: 模板///meek#includeusing namespace std;using namespace std ;typedef long long ll;#define mem(a) memset(a,0,sizeof(a))#define pb push...
阅读全文

浙公网安备 33010602011771号