05 2016 档案
摘要:XOR 游戏 Problem Description 众所周知,度度熊喜欢XOR运算[(XOR百科)](http://baike.baidu.com/view/674171.htm)。今天,它发明了一种XOR新游戏,最开始,它有一个长度为N的数组,度度熊可以任意添加分割线,将数组划分为M段,且每段长
阅读全文
摘要:One hundred layer Problem Description Now there is a game called the new man down 100th floor. The rules of this game is: 1. At first you are at the 1
阅读全文
摘要:Dragon Ball Problem Description Sean has got a Treasure map which shows when and where the dragon balls will appear. some dragon balls will appear in
阅读全文
摘要:D Game Problem Description 众所周知,度度熊喜欢的字符只有两个:B 和D。今天,它发明了一个游戏:D游戏。度度熊的英文并不是很高明,所以这里的D,没什么高深的含义,只是代指等差数列[(等差数列百科)](http://baike.baidu.com/view/62268.ht
阅读全文
摘要:1001 区间的价值: RMQ+扫描法 我们预处理RMQ求任意区间的最大值 预处理出以a[i]为最小值 能向左延伸 向右延伸的 L[i], R[i] 那么对于 一个答案 (L[i], R[i]) *rmq(L[i],R[i]) 为此长度的答案,我们可以发现他是可以更新到小于其长度的所有长度答案的,更
阅读全文
摘要:Sitting in Line Problem Description 度度熊是他同时代中最伟大的数学家,一切数字都要听命于他。现在,又到了度度熊和他的数字仆人们玩排排坐游戏的时候了。游戏的规则十分简单,参与游戏的N个整数将会做成一排,他们将通过不断交换自己的位置,最终达到所有相邻两数乘积的和最大的
阅读全文
摘要:题目链接: http://bestcoder.hdu.edu.cn/contests/contest_show.php?cid=701 1001 : 矩阵快速幂 #include <iostream> #include <algorithm> #include <cstdio> #include <
阅读全文
摘要:zxa and leaf Problem Description zxa have an unrooted tree with n nodes, including (n−1) undirected edges, whose nodes are numbered from 1 to n. The d
阅读全文
摘要:D. Robin Hood We all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money from rich, and return
阅读全文
摘要:C. Recycling Bottles It was recycling day in Kekoland. To celebrate it Adil and Bera went to Central Perk where they can take bottles from the ground
阅读全文
摘要:F. Restore a Number Vasya decided to pass a very large integer n to Kate. First, he wrote that number as a string, then he appended to the right integ
阅读全文
摘要:Yada Number Problem Description: Every positive integer can be expressed by multiplication of prime integers. Duoxida says an integer is a yada number
阅读全文
摘要:How many integers can you find Problem Description Now you get a number N, and a M-integers set, you should find out how many integers which are small
阅读全文
摘要:To the moon Problem Description BackgroundTo The Moon is a independent game released in November 2011, it is a role-playing adventure game powered by
阅读全文
摘要:D. Bad Luck Island The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random in
阅读全文
摘要:E. Correct Bracket Sequence Editor Recently Polycarp started to develop a text editor that works only with correct bracket sequences (abbreviated as C
阅读全文
摘要:Park Visit Problem Description Claire and her little friend, ykwd, are travelling in Shevchenko's Park! The park is beautiful - but large, indeed. N f
阅读全文
摘要:关于欧拉通路、欧拉回路的一些定义: 无向图:G是一个连通的无向图(1)经过G的每条边一次并且仅一次的路径为欧拉通路(起点和终点不一定要一样)。(2)如果欧拉通路是回路(起点和终点是同一个),则为欧拉回路。(3)具有欧拉回路的无向图G称为欧拉图。 有向图:D是一个有向图,D的基图(把D的有向边改为无向
阅读全文
摘要:Air Hockey 无聊的过河船同学和无聊的胀鱼同学非常喜欢打桌上冰球(其实只是喜欢听球碰撞时的声音)。在无聊的一天,无聊的过河船同学想到了一个无聊的玩法:两人同时将两个球放桌面上,同时击出,然后听两颗球撞在一起时的声音。然而他们都对击球的精确度把握得不是很好,所以这两颗球并不一定能相撞。 现在假
阅读全文
摘要:D. World Tour A famous sculptor Cicasso goes to a world tour! Well, it is not actually a world-wide. But not everyone should have the opportunity to s
阅读全文
摘要:先来个板子 最长公共子序列问题: 给定2个字符串,求其最长公共子串。如abcde和dbada的最长公共字串为bd。 动态规划:dp[i][j]表示A串前i个和B串前j个的最长公共子串的长度。 则 若A[i] == B[j] , dp[i][j] = dp[i-1][j-1] + 1; 否则 dp[i
阅读全文

浙公网安备 33010602011771号