05 2016 档案
摘要:Description You all must know the puzzle named "The Towers of Hanoi". The puzzle has three pegs and N discs of different radii, initially all disks ar
阅读全文
摘要:Description Little frog Georgie likes to jump. Recently he have discovered the new playground that seems the perfect place to jump. Recently the new j
阅读全文
摘要:Description During the programming classes Vasya was assigned a difficult problem. However, he doesn't know how to code and was unable to find the sol
阅读全文
摘要:HDU 2577 Description Pirates have finished developing the typing software. He called Cathy to test his typing software. She is good at thinking. After
阅读全文
摘要:HDU 2159 Description 最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的
阅读全文
摘要:NEFU专项训练十和十一——树链剖分 Description 一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式来要求你对这棵树完成一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节点的最大权值 I
阅读全文
摘要:HDU 1069 Description A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building,
阅读全文
摘要:Description Dasha decided to bake a big and tasty layer cake. In order to do that she went shopping and bought n rectangular cake layers. The length a
阅读全文
摘要:Description Polycarp has quite recently learned about email aliases. Of course, he used to suspect that the case of the letters doesn't matter in emai
阅读全文
摘要:HDU 5694 Problem Description 众所周知,度度熊喜欢的字符只有两个:B和D。今天,它发明了一种用B和D组成字符串的规则:S(1)=BS(2)=BBDS(3)=BBDBBDD…S(n)=S(n−1)+B+reverse(flip(S(n−1))其中,reverse(s)指将字
阅读全文
摘要:HDU 5687 Problem Description 度熊手上有一本神奇的字典,你可以在它里面做如下三个操作: 1、insert : 往神奇字典中插入一个单词 2、delete: 在神奇字典中删除所有前缀等于给定字符串的单词 3、search: 查询是否在神奇字典中有一个字符串的前缀等于给定的字
阅读全文
摘要:HDU 2955 Description The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often
阅读全文
摘要:HDU 2546 Description 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。 某天,食堂中有n种菜出售,每
阅读全文
摘要:BNUOJ 51636 最近,无聊的过河船同学在玩一种奇怪的名为“小Q的恶作剧”的纸牌游戏。 现在过河船同学手有张牌,分别写着,打乱顺序之后排成一行,位置从左往右按照标号。 接下来小Q同学会给出个操作,分为以下两种: 1.给定,交换从左往右数的第和第张牌, 2.给定,对从左往右数的第张牌,记下位置是
阅读全文
摘要:POJ 1743 Description A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a k
阅读全文
摘要:POJ 3261 Description Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovere
阅读全文
摘要:Description Given a string, we need to find the total number of its distinct substrings. Input T- number of test cases. T<=20; Each test case consists
阅读全文
摘要:51Nod 在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序。一个排列中逆序的总数就称为这个排列的逆序数。 如2 4 3 1中,2 1,4 3,4 1,3 1是逆序,逆序数是4。给出一个整数序列,求该序列的逆序数。 在一个排列中,如果一对数的前后位置与
阅读全文
摘要:Description Today is Christmas day. There are n single boys standing in a line. They are numbered form 1 to n from left to right. The i-th single boy
阅读全文

浙公网安备 33010602011771号