- 博客(34)
- 收藏
- 关注
原创 HDU - 6447 YJJ's Salesman(树状数组优化的dp+离散化)
YJJ's Salesman Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1996 Accepted Submission(s): 744 Problem Description ...
2018-08-31 21:20:42 206
原创 HDU - 1520 Anniversary party (树形dp)
There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the supervisor relation forms a tr...
2018-08-26 20:29:21 116
原创 CodeForces - 767C Garland (dfs)
Once at New Year Dima had a dream in which he was presented a fairy garland. A garland is a set of lamps, some pairs of which are connected by wires. Dima remembered that each two lamps in the garland...
2018-08-26 18:25:43 324
原创 HDU - 6214 Smallest Minimum Cut(最小割边集的最小数量)
Consider a network G=(V,E)G=(V,E) with source ss and sink tt. An s-t cut is a partition of nodes set VV into two parts such that ss and tt belong to different parts. The cut set is the subset of EE wi...
2018-08-24 19:08:57 274
原创 HDU - 1686 Oulipo(kmp计数)
The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mais tout s’...
2018-08-17 09:55:30 152
原创 2017 CCPC网络赛 A Secret
Today is the birthday of SF,so VS gives two strings S1,S2 to SF as a present,which have a big secret.SF is interested in this secret and ask VS how to get it.There are the things that VS tell: Suff...
2018-08-16 20:31:30 409
原创 HDU - 6386 Age of Moyu
Mr.Quin love fishes so much and Mr.Quin’s city has a nautical system,consisiting ofNN ports and MM shipping lines. The ports are numbered 11 to NN. Each line is occupied by a Weitian. Each Weitian has...
2018-08-15 23:37:33 208
原创 HDU - 6383 p1m2 百度之星(二分)
度度熊很喜欢数组!! 我们称一个整数数组为稳定的,若且唯若其同时符合以下两个条件: 1. 数组里面的元素都是非负整数。 2. 数组里面最大的元素跟最小的元素的差值不超过 11。 举例而言,[1,2,1,2][1,2,1,2] 是稳定的,而 [−1,0,−1][−1,0,−1] 跟 [1,2,3][1,2,3] 都不是。 现在,定义一个在整数数组进行的操作: * 选择数组中两个不同的元素...
2018-08-13 09:39:18 169
原创 HDU - 6351 Beautiful Now (暴力dfs枚举)
Anton has a positive integer nn, however, it quite looks like a mess, so he wants to make it beautiful after kk swaps of digits. Let the decimal representation of nn as (x1x2⋯xm)10(x1x2⋯xm)10 satisfy...
2018-08-12 01:16:50 391
原创 HDU - 3081 Marriage Match II (最大流+二分+并查集+(*你*别忘了别再建重边了))
Presumably, you all have known the question of stable marriage match. A girl will choose a boy; it is similar as the game of playing house we used to play when we are kids. What a happy time as so man...
2018-08-10 11:53:55 190
原创 HDU - 3605 Escape
2012 If this is the end of the world how to do? I do not know how. But now scientists have found that some stars, who can live, but some people do not fit to live some of the planet. Now scientists wa...
2018-08-09 20:05:42 135
原创 UVA - 10480 Sabotage 最大流最小割+ 输出割边集
因为是pdf形式我就不把题目弄上来了,就写主要需要注意的两点: 1.输出割边集。正确的写法是先按照源点开始dfs,如果某一边得剩余流量大于0就继续向下探索另一个点并标记,等于零就跳过这一边。最后把所有的边找出来,看看如果有两个点标记不一样(一个标记了一个没标记),就输出这个边就好了(因为我们建立的是双向便所以别忘了遍历时每次加2)。 但是我在没看这种做法得时候,我是想把所有得剩余流量...
2018-08-09 16:42:02 170
原创 HDU - 4289 Control(拆点+网络流||最小割)
Control Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4578 Accepted Submission(s): 1890 Problem Description Yo...
2018-08-09 10:39:37 223
原创 HDU - 4280 Island Transport (双向图中最大流)
In the vast waters far far away, there are many islands. People are living on the islands, and all the transport among the islands relies on the ships. You have a transportation company there. Some...
2018-08-08 23:33:33 419
原创 POJ - 2516 Minimum Cost (最小费用最大流)
Minimum CostTime Limit: 4000MS Memory Limit: 65536K Total Submissions: 18305 Accepted: 6465 DescriptionDearboy, a goods victualer, now comes to a big problem, and he needs your...
2018-08-08 19:27:24 168
原创 最小费用最大流的模板spfa
#include<iostream>#include<cstdio>#include<queue>#include<algorithm>using namespace std;const int maxn = 100005;const int maxm = 1000500;const int inf = 0x3f3f3f3f;str...
2018-08-08 16:31:52 423
原创 POJ - 2195 Going Home (最小费用最大流)
Going HomeTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 25156 Accepted: 12597 DescriptionOn a grid map there are n little men and n houses. In each unit time, ever...
2018-08-08 16:30:41 119
原创 POJ - 3436 ACM Computer Factory (拆点+网络流)
ACM Computer FactoryTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 9241 Accepted: 3412 Special Judge DescriptionAs you know, all the computers used for ACM ...
2018-08-08 08:56:21 285
原创 POJ - 3281 Dining (拆点+dinic最大流)
DiningTime Limit: 2000MS Memory Limit: 65536K Total Submissions: 22184 Accepted: 9851 DescriptionCows are such finicky eaters. Each cow has a preference for certain foods and d...
2018-08-07 19:19:42 145
原创 Dinic+弧优化模板
#include<iostream>#include<cstdio>#include<cstring>#include<queue>#include<algorithm>using namespace std;#define inf 0x3f3f3f3fconst int maxn = 100010;const int ...
2018-08-07 16:00:58 303 2
原创 HDU - 3488 Tour(KM)
In the kingdom of Henryy, there are N (2 <= N <= 200) cities, with M (M <= 30000) one-way roads connecting them. You are lucky enough to have a chance to have a tour in the kingdom. The route...
2018-08-07 09:26:24 170
原创 POJ - 2112 Optimal Milking(floyd传递闭包+二分枚举+二分图多重匹配)
Optimal MilkingTime Limit: 2000MS Memory Limit: 30000K Total Submissions: 19622 Accepted: 7022 Case T...
2018-08-06 23:57:37 153
原创 POJ - 3189 Steady Cow Assignment(二分+二分图多重匹配)
Steady Cow AssignmentTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 7289 Accepted: 2506 DescriptionFarmer John's N (1 <= N <= 1000) cows each reside in one of...
2018-08-06 20:25:51 333
原创 HDU - 2255 奔小康赚大钱 (二分图的最佳完美匹配)
奔小康赚大钱 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 13366 Accepted Submission(s): 5827 Problem Description 传说在遥远的地方...
2018-08-06 18:36:32 120
原创 POJ - 2289 Jamie's Contact Groups
Jamie's Contact GroupsTime Limit: 7000MS Memory Limit: 65536K Total Submissions: 8667 Accepted: 2941 DescriptionJamie is a very popular girl and has quite a lot of friends, so ...
2018-08-06 10:27:31 491
原创 HDU - 3829 Cat VS Dog (最大独立集)
Cat VS Dog Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others) Total Submission(s): 4539 Accepted Submission(s): 1670 Problem Description The ...
2018-08-05 20:38:48 167
原创 CodeForces 967F. Aztec Catacombs(思维建树图)
F. Aztec Catacombstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIndiana Jones found ancient Aztec catacombs containing a golde...
2018-08-03 14:12:50 251
原创 POJ - 2594 Treasure Exploration(floyd传递闭包+最小路径覆盖)
Treasure ExplorationTime Limit: 6000MS Memory Limit: 65536K Total Submissions: 9490 Accepted: 3871 DescriptionHave you ever read any book about treasure exploration? Have you e...
2018-08-02 20:02:20 168
原创 HDU - 1151 Air Raid(最小路径覆盖)
Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through town's stre...
2018-08-02 16:31:15 191
转载 顺便记下kuangbin巨巨的HK
#include<cstdio>#include<iostream>#include<vector>#include<queue>using namespace std;#define inf 0x3f3f3f3fconst int maxn = 3005;vector<int>G[maxn];int un;int m...
2018-08-02 11:20:54 168
原创 HDU - 2389 Rain on your Parade(HK函数)
Rain on your Parade Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 655350/165535 K (Java/Others) Total Submission(s): 5383 Accepted Submission(s): 1775 Problem Descri...
2018-08-02 11:19:28 256
原创 HDU - 1281 棋盘游戏
棋盘游戏 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6370 Accepted Submission(s): 3699 Problem Description 小希和Gardon在玩一...
2018-08-01 16:51:05 274
原创 HDU - 2444 The Accomodation of Students (判断二分图+匈牙利算法)
The Accomodation of Students Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8705 Accepted Submission(s): 3830 Problem Des...
2018-08-01 14:20:43 127
原创 HDU - 1045 Fire Net (缩点建图+二分图)
Fire Net Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 14784 Accepted Submission(s): 8936 Problem Description Suppos...
2018-08-01 09:51:09 460
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人