•  
  • Archives for HDU (21)

【HDU4046】Panda(36届北京赛区网络赛题,线段树)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 09 月 20 日

When I wrote down this letter, you may have been on the airplane to U.S.
We have known for 15 years, which has exceeded one-fifth of my whole life. I still remember the first time we went to the movies, the first time we went for a walk together.I still remember the smiling face you wore when you were dressing in front of the mirror. I love your smile and your shining eyes. When you are with me, every second is wonderful. (more...)

【HDU1754】I Hate It(线段树)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 09 月 20 日

很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。 (more...)

【HDU1166】敌兵布阵(线段树)

Categories: 数据结构和算法
Tags: ,
Comments: No Comments
Published on: 2011 年 09 月 17 日

C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。 (more...)

【HDU1005】Number Sequence(矩阵乘法)

Categories: 数据结构和算法
Tags: ,
Comments: 2 Comments
Published on: 2011 年 09 月 16 日

A number sequence is defined as follows:
f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.
Given A, B, and n, you are to calculate the value of f(n). (more...)

【HDU1004】Let the Balloon Rise(stl map水过,哈希表)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 09 月 15 日

Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color and find the result. (more...)

【HDU1003】Max Sum(最大子序列和)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 09 月 15 日

Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 14.
题目说的不清楚,按照自己弄的一些数据测试出最终要的结果是:最长最大子序列和,如果有多个结果输出第一组。题目中没有体现出 “最长” 这一字眼。
(more...)

【HDU1002】A + B Problem II(大数加法)

Categories: 数据结构和算法
Tags: ,
Comments: No Comments
Published on: 2011 年 09 月 15 日

本来退役考研了,但是此生有幸进入区域赛场地赛,所以复出几天以了没参加过真正ACM的遗憾。从水题开始练练编码,顺便写俩常用代码。
I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. (more...)

【HDU3706】Second My Problem First(单调队列)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 05 月 18 日

Give you three integers n, A and B.
Then we define Si = Ai mod B and Ti = Min{ Sk | i-A < = k <= i, k >= 1}
Your task is to calculate the product of Ti (1 < = i <= n) mod B. 题意:略了吧。。。结果是求Ti模B的乘积。 (more...)

【HDU2277】Change the ball(类似贪心策略,数学计算)

Categories: 数据结构和算法
Comments: No Comments
Published on: 2011 年 05 月 17 日

Garfield has three piles of balls, each pile has unique color of following: yellow, blue, and red. Now we also know Garfield has Y yellow balls, B blue balls, and R red balls. But Garfield just wants to change all the balls to one color. (more...)

【HDU2279】File Search Tool(JAVA正则匹配)

Categories: 数据结构和算法
Tags: ,
Comments: No Comments
Published on: 2011 年 05 月 17 日

WisKey downloaded much software in winter vacation, and the disk was in a state of confusion. He wastes many times to find the file everyday. So he wants a tool to help him do this work. (more...)

【HDU3350】#define is unsafe(前缀表达式求值)

Categories: 数据结构和算法
Tags: , ,
Comments: No Comments
Published on: 2011 年 05 月 12 日

Have you used #define in C/C++ code like the code below?
#include
#define MAX(a , b) ((a) > (b) ? (a) : (b)) (more...)

【HDU3349】lazy gege(计算几何)

Categories: 数据结构和算法
Tags: ,
Comments: No Comments
Published on: 2011 年 05 月 12 日

Gege hasn't tidied his desk for long,now his desk is full of things.
This morning Gege bought a notebook,while to find somewhise to put it troubles him. (more...)

【HDU3347】Calculate the expression(表达式求值变化)

Categories: 数据结构和算法
Tags: ,
Comments: No Comments
Published on: 2011 年 05 月 12 日

You may find it’s easy to calculate the expression such as:
a = 3 b = 4 c = 5 a + b + c = ?
Isn’t it? (more...)

page 1 of 2»
文章归档
日历
2017年十一月
« 七    
 1234
567891011
12131415161718
19202122232425
2627282930  
标签云
sina weibo
我的广告可能就是你的信息

Welcome , today is 星期日, 2017 年 11 月 19 日