Description “Farm Game” is one of the most popular games in online community. In the community each player has a virtual farm. The farmer can decide to plant some kinds of crops like wheat or paddy, and buy the corresponding crop seeds. After they gr…
Description Plain of despair was once an ancient battlefield where those brave spirits had rested in peace for thousands of years. Actually no one dare step into this sacred land until the rumor that “there is a huge gold mine underneath the plain” s…
Description Aliens on planet Pandora also write computer programs like us. Their programs only consist of capital letters (‘A’ to ‘Z’) which they learned from the Earth. On planet Pandora, hackers make computer virus, so they also have anti-virus sof…
Description     A new Semester is coming and students are troubling for selecting courses. Students select their course on the web course system. There are n courses, the ith course is available during the time interval (Ai,Bi). That means, if you wa…
Description Math Olympiad is called “Aoshu” in China. Aoshu is very popular in elementary schools. Nowadays, Aoshu is getting more and more difficult. Here is a classic Aoshu problem: ABBDE __ ABCCC = BDBDEIn the equation above, a letter stands for a…
A hard Aoshu Problem http://acm.hdu.edu.cn/showproblem.php?pid=3699 用深搜写排列,除法要注意,还有不能有前导零.当然可以5个for,但是如果有很多个,dfs还是好的. #include<cstdio> #include<cstring> #include<iostream> #include<map> #define mt(a,b) memset(a,b,sizeof(a)) using n…
Farm Game Problem Description “Farm Game” is one of the most popular games in online community. In the community each player has a virtual farm. The farmer can decide to plant some kinds of crops like wheat or paddy, and buy the corresponding crop se…
Description Could you imaging a monkey writing computer programs? Surely monkeys are smart among animals. But their limited intelligence is no match for our human beings. However, there is a theorem about monkeys, and it states that monkeys can write…
Hatsune Miku Problem's Link:   http://acm.hdu.edu.cn/showproblem.php?pid=5074 Mean: 有m种音符(note),现在要从这m种音符中选出n个来组成一首歌,相邻两个音符之间会有一个评分的方式,即score(i,j),而score(i,j)题目已经给出,现在要你按照题目的规定来选出n个音符来使得最终的分数最高. analyse: 鞍山赛区第二大水题,很简单的dp. 具体思路:dp[i][j]表示第i个音符选择的是第j种.…
Problem Description Josh Lyman is a gifted painter. One of his great works is a glass painting. He creates some well-designed lines on one side of a thick and polygonal glass, and renders it by some special dyes. The most fantastic thing is that it c…