2015 Multi-University Training
文章平均质量分 72
kingsirre
fighting
展开
-
hdu5399 Too Simple
Problem Description Rhason Cheung had a simple problem, and asked Teacher Mai for help. But Teacher Mai thought this problem was too simple, sometimes naive. So she ask you for help. Teacher Mai h原创 2015-08-24 15:10:33 · 246 阅读 · 0 评论 -
hdu 5406 CRB and Apple
题目:点击打开链接 题意: 样例: 1 5 1 1 2 3 3 2 4 3 5 1 第一行代表有几组数据,接下来代表有几颗苹果,然后接下来每一行是苹果的高度和甜度,问这个人和他女朋友最多能吃到多少个苹果,每个人吃的甜度要一个比一个甜。 因为一个苹果可以选择不吃,所以可以不用考虑高度的问题,直接挨着摘苹果,仅考虑甜度问题,而且两个人分开吃,所以dp有两个变量。 dp[转载 2015-09-02 20:27:25 · 596 阅读 · 0 评论 -
hdu 5323 Solve this interesting problem
题目:点击打开链接 给一对数[l,r],问找出最小的n使得线段树的根节点的左右范围是[0,n],且该线段树中有左右范围为[l,r]的节点 由于l/(r-l+1)≤2015,可以直接暴力搜索以[l,r]为节点的其父亲节点的情况,然后比较其最小值 搜索,线段树区间的分配方法决定了向上反推的时候可能有四种情况,这样就要向四个方向搜索分别是 [l,r+len] [原创 2015-08-29 10:56:15 · 290 阅读 · 0 评论 -
hdu5325 Crazy Bobo
Problem Description Bobo has a tree,whose vertices are conveniently labeled by 1,2,...,n.Each node has a weight wi. All the weights are distrinct. A set with m nodes v1,v2,...,vm is a Bobo Set转载 2015-08-29 15:40:53 · 362 阅读 · 0 评论 -
hdu 5411 CRB and Puzzle
Sample Input 1 3 2 1 2 1 3 0 Sample Output 6 Hintpossible patterns are ∅, 1, 2, 3, 1→2, 2→3 解释样例: 第一行是t,有t组样例。 接下来n和m,n代表有n个点,然后m是满足点的个数小于等于的数, 接下来n行,第一行代表点1后面有1个点,这个点是2 第二转载 2015-08-27 09:10:55 · 343 阅读 · 0 评论 -
hdu5317 RGCDQ
Problem Description Mr. Hdu is interested in Greatest Common Divisor (GCD). He wants to find more and more interesting things about GCD. Today He comes up with Range Greatest Common Divisor Query (RG转载 2015-08-29 09:10:14 · 254 阅读 · 0 评论 -
hdu5319 Painter
Problem Description Mr. Hdu is an painter, as we all know, painters need ideas to innovate , one day, he got stuck in rut and the ideas dry up, he took out a drawing board and began to draw casually.转载 2015-08-28 15:37:08 · 298 阅读 · 0 评论 -
hdu 5326
#include #include #include #include #include #include using namespace std; const int N=105; vector G[N]; int in[N],sub[N]; bool vis[N]; int cas=1; int T,n,m,k,tot; void init() { for(int i=0原创 2015-08-28 16:37:18 · 239 阅读 · 0 评论 -
hdu 5373 The shortest problem
Problem Description In this problem, we should solve an interesting game. At first, we have an integer n, then we begin to make some funny change. We sum up every digit of the n, then insert it to th原创 2015-08-26 10:47:59 · 319 阅读 · 0 评论 -
hdu 5389 Zero Escape
Problem Description Zero Escape, is a visual novel adventure video game directed by Kotaro Uchikoshi (you may hear about ever17?) and developed by Chunsoft. Stilwell is enjoying the first chapter转载 2015-08-26 09:14:21 · 230 阅读 · 0 评论 -
hdu5375 Gray code
代码有问题,编译出错。希望大家看出错误私信我,谢谢 #include #include #include #include #include #define INF 0xf3f3f3f using namespace std; int main() { int t; char s[200001]; int num[200001]; int dp[20原创 2015-08-26 16:16:21 · 230 阅读 · 0 评论 -
hdu 5387 Clock
Problem Description Give a time.(hh:mm:ss),you should answer the angle between any two of the minute.hour.second hand Notice that the answer must be not more 180 and not less than 0 Input The原创 2015-08-25 17:35:15 · 302 阅读 · 0 评论 -
hdu5384 Danganronpa
Problem Description Danganronpa is a video game franchise created and developed by Spike Chunsoft, the series' name is compounded from the Japanese words for "bullet" (dangan) and "refutation" (ronpa转载 2015-08-25 16:03:42 · 305 阅读 · 0 评论 -
hdu 5407CRB and Candies
Problem Description CRB has N different candies. He is going to eat K candies. He wonders how many combinations he can select. Can you answer his question for all K(0 ≤ K ≤ N)? CRB is too转载 2015-08-24 17:11:14 · 357 阅读 · 0 评论 -
hdu5400 Arithmetic Sequence
Problem Description A sequence b1,b2,⋯,bn are called (d1,d2)-arithmetic sequence if and only if there exist i(1≤i≤n) such that for every j(1≤ji),bj+1=bj+d1 and for every j(i≤jn),bj+1=bj+d2.转载 2015-08-22 16:54:12 · 343 阅读 · 0 评论 -
hdu 5414 CRB and String
Problem Description CRB has two strings s and t. In each step, CRB can select arbitrary character c of s and insert any character d (d ≠ c) just after it. CRB wants to convert s to t.转载 2015-08-22 11:05:27 · 377 阅读 · 0 评论 -
hdu5402 Travelling Salesman Problem
Problem Description Teacher Mai is in a maze with n rows and m columns. There is a non-negative number in each cell. Teacher Mai wants to walk from the top left corner (1,1) to the bottom ri原创 2015-08-24 15:56:51 · 276 阅读 · 0 评论 -
hdu5410 CRB and His Birthday
Problem Description Today is CRB's birthday. His mom decided to buy many presents for her lovely son. She went to the nearest shop with M Won(currency unit). At the shop, there are N kinds of p原创 2015-08-22 17:22:32 · 312 阅读 · 0 评论