地址：戳这里

地址：戳这里

1.There is only one entrance and one exit.

2.All the road in the maze are unidirectional.

3.For the entrance, its out-degree = its in-degree + 1.

4.For the exit, its in-degree = its out-degree + 1.

5.For other node except entrance and exit, its out-degree = its in-degree. Read More →

地址：戳这里

## Description

*n*行

*m*列的黑白棋盘，你每次可以交换两个相邻格子（相邻是指有公共边或公共顶点）中的棋子，最终达到目标状态。要求第

*i*行第

*j*列的格子只能参与

*m*次交换。

_{i,j}地址：戳这里

## Description

地址：戳这里

## Description

Blinker最近喜欢上一个奇怪的游戏。

这个游戏在一个 N*M 的棋盘上玩，每个格子有一个数。每次 Blinker 会选择两个相邻

的格子，并使这两个数都加上 1。

现在 Blinker 想知道最少多少次能使棋盘上的数都变成同一个数，如果永远不能变成同

一个数则输出-1。

地址：戳这里

ACM ICPC World Finals 2009, sponsored by IBM and hosted by KTH, Royal Institute of Technology will be held in Stockholm, Sweden. This contest will last for *N*(1<= *N* <= 1000) days. We need at least *A _{i}*volunteers in the

*i*-th day. Now there are

*M*(1<=

*M*<=10000) kind of volunteers. The

*i*-th type of volunteers will work from

*S*-th day to

_{i}*T*-th day, we will pay them $

_{i}*C*. Now your task is to minimize the money KTH pay for all the volunteers. Read More →

_{i}地址：戳这里

地址：戳这里

地址:戳这里

_{i}. If you want to carry x units of goods along this road, you should pay a

_{i}* x

^{2}dollars to hire guards to protect your goods. And what’s worse, for each road i, there is an upper bound C

_{i}, which means that you cannot transport more than C

_{i}units of goods along this road. Please note you can only carry integral unit of goods along each road.

You should find out the minimum cost to transport all the goods safely.

地址:戳这里

The Death Eaters are low on funds, and their leader Voldemort has asked them to get more money quickly, or face his wrath. They decide that the best way is to rob Gringotts Wizarding Bank.

By threatening one of the goblins in charge of the bank, the ‘M’ Death Eaters have discovered that Gringotts has ‘N’ vaults, with vault number ‘i’ containing X[i] gold items. The weights of the gold items in the ith vault are g[i][1],g[i][2],…,g[i][X[i]]. But as soon as a vault is robbed, the magical wards go off and alarm bells ring. Thus they have enough time to rob just one vault each, and all robberies have to take place at the same time. The Death Eaters have decided that no two of them will rob the same vault as this increases the chances of them being caught. Read More →