摘要: Problem DescriptionBob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad. Now he has the following problem. He must defend a medieval city, the roads of which form a tree. He has to put the minimum number of soldi 阅读全文
posted @ 2013-09-18 21:32 forevermemory 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Problem Descriptionthe second year of the university somebody started a study on the romantic relations between the students. The relation “romantically involved” is defined between one girl and one boy. For the study reasons it is necessary to find out the maximum set satisfying the condition: ther 阅读全文
posted @ 2013-09-18 17:48 forevermemory 阅读(276) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionJason买来了n米长的竹篱笆,打算将n米长的竹篱笆全部用来围成一个三角形的养鸡场。为方便起见,养鸡场三条边的长度都为正整数。同时,他想让自己的养鸡场看起来更美观一些,要求三条边的长度分别在一个区间范围内。现在,他想知道有多少种不同的方案使得围成的养鸡场满足要求? Input输入包含多组数据。输入数据第一行是一个正整数n,表示竹篱笆的长度。在接下来三行中,第i行的两个正整数为xi,yi。表示三角形的第i条边的边长ai的范围在[xi,yi]内。注意:Jason规定a1≤a2≤a3。 Output输出一个整数,表示满足要求的不同方案数。约定:对于第二行至第四行 阅读全文
posted @ 2013-09-18 10:46 forevermemory 阅读(199) 评论(0) 推荐(0) 编辑