- 博客(10)
- 收藏
- 关注
原创 Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) B. The Meeting Place Cannot Be Change
The main road in Bytecity is a straight line from south to north. Conveniently, there are coordinates measured in meters from the southernmost building in north direction.At some points on the roa
2017-03-12 11:24:18 279
原创 Apple Catching POJ - 2385
It is a little known fact that cows love apples. Farmer John has two apple trees (which are conveniently numbered 1 and 2) in his field, each full of apples. Bessie cannot reach the apples when they a
2017-03-09 08:30:31 201
原创 Cow Exhibition POJ - 2184
"Fat and docile, big and dumb, they look so stupid, they aren't much fun..." - Cows with Guns by Dana Lyons The cows want to prove to the public that they are both smart and fun. In order to d
2017-03-08 16:31:15 218
原创 Stripies POJ - 1862
Our chemical biologists have invented a new very useful form of life called stripies (in fact, they were first called in Russian - polosatiki, but the scientists had to invent an English name to apply
2017-03-05 10:32:22 263
原创 小希的迷宫 HDU - 1272
上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给你,让你帮忙判断她的
2017-03-03 20:51:47 350
原创 How Many Answers Are Wrong HDU - 3038
T 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 humdrum game. To begin with, TT shoul
2017-03-03 09:38:57 241
原创 Silver Cow Party POJ - 3268
DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectio
2017-03-02 16:39:00 266
原创 单源最短路 Bellman-Ford
Bellman-Ford可以检测负圈,有些时候还是很有必要。现在理解的不是很深,等以后再回来加以完善,先放一段代码。struct edge{ int from; int to; int cost;};edge es[MXAN];int d[MXAN];int V, E; // V是顶点数,E是边数void shortest_path(int s){
2017-03-02 09:15:05 278
原创 Heavy Transportation POJ - 1797
Language:DefaultHeavy TransportationTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 32906 Accepted: 8734DescriptionBackground Hugo Heavy is happ
2017-03-01 23:14:07 324
原创 并查集的模版
写了个很简单的并查集的模版int rank1[MXAN];int par[MXAN];void init(int n){ for(int i = 1; i <= n; ++i){ rank1[i] = 0; par[i] = i; }}int find(int x){ if(par[x] == x) retur
2017-03-01 17:22:39 226
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人