# HDU 6041 I Curse Myself （仙人掌图）

Description There is a connected undirected graph with weights on its edges. It is guaranteed that each edge appears in at most one simple cycle. ...

# HDU 3594 Cactus （仙人掌图、Tarjan）

Description It is a Strongly Connected graph. Each edge of the graph belongs to a circle and only belongs to one circle. We call this ...

# HDU 6044 Limited Permutation （组合数+逆元）

Description As to a permutation p1,p2,⋯,pn from 1 to n, it is uncomplicated for each 1≤i≤n to calculate (li,ri) meeting the condition that min(pL,p...

# HDU 6047 Maximum Sequence （贪心）

Description Steph is extremely obsessed with “sequence problems” that are usually seen on magazines: Given the sequence 11, 23, 30, 35, what is the...

# HDU 6053 TrickGCD （莫比乌斯函数）

Description You are given an array AA , and Zhu wants to know there are how many different array BB satisfy the following conditions? 1≤Bi≤...

# HDU 6055 Regular polygon （找正方形）

Description On a two-dimensional plane, give you n integer points. Your task is to figure out how many different regular polygon these points can m...

# HDU 6050 Funny Function （规律+逆元）

Description Function Fx,yF_{x,y} satisfies: F1,1=F1,2=1F_{1,1}=F_{1,2}=1 F1,i=F1,i−1+2∗F1,i−2 (i>=3)F_{1,i}=F_{1,i-1}+2*F_{1,i-2}\ (i&...

# HDU 6040 Hints of sd0061 （技巧）

Description sd0061, the legend of Beihang University ACM-ICPC Team, retired last year leaving a group of noobs. Noobs have no idea how to deal with...

# codevs 2370 小机房的树 （LCA）

Description 小机房有棵焕狗种的树，树上有N个节点，节点标号为0到N-1，有两只虫子名叫飘狗和大吉狗，分居在两个不同的节点上。有一天，他们想爬到一个节点上去搞基，但是作为两只虫子，他们不想花费太多精力。已知从某个节点爬到其父亲节点要花费 c 的能量（从父亲节点爬到此节点也相同），他们...

# HDU 6035 Colorful Tree （树形dp）

Description There is a tree with n nodes, each of which has a type of color represented by an integer, where the color of node i is ci. The pa...

# HDU 6038 Function （数学）

Description You are given a permutation a from 0 to n−1 and a permutation b from 0 to m−1. Define that the domain of function f is the set of ...

# HDU 6034 Balala Power! （贪心）

Description Talented Mr.Tang has n strings consisting of only lower case characters. He wants to charge them with Balala Power (he could chan...

# codevs 1036 商务旅行 （LCA）

Description 某首都城市的商人要经常到各城镇去做生意，他们按自己的路线去做，目的是为了更好的节约时间。 假设有N个城镇，首都编号为1，商人从首都出发，其他各城镇之间都有道路连接，任意两个城镇之间如果有直连道路，在他们之间行驶需要花费单位时间。该国公路网络发达，从首都出发能到...

# POJ 1470 Closest Common Ancestors (LCA)

Description Write a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the close...

# POJ 1330 Nearest Common Ancestors (LCA)

Description A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, ...

# HDU 3966 Aragorn's Story （树链剖分）

Problem Description Our protagonist is the handsome human prince Aragorn comes from The Lord of the Rings. One day Aragorn finds a lot of enemies w...

# 『数据结构』RMQ 问题

RMQ (Range Minimum/Maximum Query)，即区间最值问题 对于长度为 n 的数列，回复若干次查询，返回某个区间的最大（小）值

个人资料
等级：
访问量： 36万+
积分： 1万+
排名： 2006
欢迎关注 <千与梦随> 哦！
博客专栏
 那些年,我们一起追过的算法 文章：6篇 阅读：23959
最新评论