Coldfresh的博客

keeeeeep!~

Proving Equivalences HDU - 2767(强连通)

Consider the following exercise, found in a generic linear algebra textbook. Let A be an n × n matrix. Prove that the following statements are equiva...

2017-07-31 18:22:22

阅读数:127

评论数:0

迷宫城堡 HDU - 1269 (强连通)

为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10000)和M条通道(M<=100000),每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房间,但并不说明通过它可以由B房间到达A房间。Gardon需要请你写个程...

2017-07-31 14:24:49

阅读数:132

评论数:0

More Divisors ZOJ - 2562 (反素数)

Everybody knows that we use decimal notation, i.e. the base of our notation is 10. Historians say that it is so because men have ten fingers. Maybe t...

2017-07-29 14:03:37

阅读数:160

评论数:0

Cow Sorting POJ - 3270 (置换)

Farmer John’s N (1 ≤ N ≤ 10,000) cows are lined up to be milked in the evening. Each cow has a unique “grumpiness” level in the range 1…100,000. Sinc...

2017-07-28 20:32:39

阅读数:131

评论数:0

How far away ? HDU - 2586 (LCA)

There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this “How far is it if I want...

2017-07-26 19:00:39

阅读数:120

评论数:0

Binary Apple Tree URAL - 1018 (树形dp)

Let’s imagine how apple tree looks in binary computer world. You’re right, it looks just like a binary tree, i.e. any biparous branch splits up to ex...

2017-07-26 14:50:17

阅读数:121

评论数:0

How Many Answers Are Wrong HDU - 3038(种类并查集)

TT and FF are … friends. Uh… very very good friends -__-b FF is a bad boy, he is always wooing TT to play the following game with him. This is a very...

2017-07-23 19:38:12

阅读数:122

评论数:0

食物链 POJ - 1182(种类并查集)

动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说法是”1 X Y”,表示X和Y是同...

2017-07-23 19:35:35

阅读数:120

评论数:0

Genghis Khan the Conqueror HDU - 4126(MST)

Genghis Khan(成吉思汗)(1162-1227), also known by his birth name Temujin(铁木真) and temple name Taizu(元太祖), was the founder of the Mongol Empire and the gre...

2017-07-22 11:48:11

阅读数:113

评论数:0

HDU 4135 Co-prime(容斥原理)

Given a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N. Two integers are said to...

2017-07-19 14:44:36

阅读数:208

评论数:0

GCD HUD 1695(容斥原理)

Given 5 integers: a, b, c, d, k, you’re to find x in a…b, y in c…d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x and y. Since ...

2017-07-18 23:18:09

阅读数:137

评论数:0

Mondriaan's Dream POJ - 2411(插头做法带更新)

Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his ‘toilet series’ (where he h...

2017-07-17 21:47:49

阅读数:119

评论数:0

Most Powerful ZOJ - 3471

Recently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms ...

2017-07-17 17:21:14

阅读数:115

评论数:0

Travelling HDU - 3001

After coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seeing a...

2017-07-17 14:34:13

阅读数:111

评论数:0

Hie with the Pie POJ - 3311(wa)

The Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possible. Unfortunately, due to cutbacks, they can afford to hire ...

2017-07-17 10:49:52

阅读数:121

评论数:0

炮兵阵地 POJ - 1185(状态压缩)

司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用”H” 表示),也可能是平原(用”P”表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示: 如果...

2017-07-16 15:25:06

阅读数:181

评论数:0

Corn Fields POJ - 3254(状态压缩dp入门)

Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn...

2017-07-06 12:37:51

阅读数:383

评论数:0

Just a Hook HDU - 1698(线段树的懒惰标记)

In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metalli...

2017-07-02 14:40:15

阅读数:289

评论数:0

Mishka and Interesting sum CodeForces - 703D(离线处理)

Little Mishka enjoys programming. Since her birthday has just passed, her friends decided to present her with array of non-negative integers a1, a2, ...

2017-07-02 14:21:21

阅读数:167

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭