- 博客(36)
- 收藏
- 关注
原创 【最小费用最大流】E - Minimum Cost POJ - 2516
Minimum CostTime Limit: 4000MS Memory Limit: 65536K Total Submissions: 18195 Accepted: 6417 DescriptionDearboy, a goods victualer, now comes to a big problem, and he needs your...
2018-07-31 20:17:44 228
原创 【最小费用最大流】D - Going Home POJ - 2195
Going HomeTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 24977 Accepted: 12517 DescriptionOn a grid map there are n little men and n houses. In each unit time, ever...
2018-07-31 17:40:25 196
原创 【费用流】 最小费用最大流 洛谷P3381
题目描述如题,给出一个网络图,以及其源点和汇点,每条边已知其最大流量和单位流量费用,求出其网络最大流和在最大流情况下的最小费用。输入输出格式输入格式: 第一行包含四个正整数N、M、S、T,分别表示点的个数、有向边的个数、源点序号、汇点序号。接下来M行每行包含四个正整数ui、vi、wi、fi,表示第i条有向边从ui出发,到达vi,边权为wi(即该边最大流量为wi),单位流量的...
2018-07-31 16:11:17 166
原创 【dinic最大流】C - A Plug for UNIX POJ - 1087
A Plug for UNIXTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 18411 Accepted: 6394 DescriptionYou are in charge of setting up the press room for the inaugural meeti...
2018-07-31 11:07:31 166
原创 【dinic最大流】 B - Dining POJ - 3281
DiningTime Limit: 2000MS Memory Limit: 65536K Total Submissions: 21934 Accepted: 9733 DescriptionCows are such finicky eaters. Each cow has a preference for certain foods and d...
2018-07-30 11:59:28 236
原创 【Dinic算法最大流】网络最大流 洛谷P3376
题目描述如题,给出一个网络图,以及其源点和汇点,求出其网络最大流。输入输出格式输入格式: 第一行包含四个正整数N、M、S、T,分别表示点的个数、有向边的个数、源点序号、汇点序号。接下来M行每行包含三个正整数ui、vi、wi,表示第i条有向边从ui出发,到达vi,边权为wi(即该边最大流量为wi) 输出格式: 一行,包含一个正整数,即为该网络的最大流。 ...
2018-07-30 10:17:10 152
原创 【匈牙利算法二分图匹配】 C - Courses HDU - 1083
CoursesTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10555 Accepted Submission(s): 4983 Problem DescriptionConsider a group of N ...
2018-07-28 13:16:39 125
原创 【树状数组求逆序对】Swaps and Inversions HDU6318 2018多校第二场
Swaps and InversionsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1489 Accepted Submission(s): 542 Problem DescriptionLong long ago...
2018-07-27 16:09:33 151
原创 【线段树区间更新】 Naive Operations HDU6315 2018多校第二场
Naive OperationsTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 502768/502768 K (Java/Others)Total Submission(s): 1977 Accepted Submission(s): 853 Problem DescriptionIn a galaxy far...
2018-07-27 13:56:32 187
原创 【贪心】 Balanced Sequence HDU6299 2018多校第一场
Balanced SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4423 Accepted Submission(s): 1148 Problem DescriptionChiaki has n st...
2018-07-26 20:18:42 148
原创 【博弈】Game HDU6312 2018多校第二场
GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 460 Accepted Submission(s): 326 Problem DescriptionAlice and Bob are playing a ga...
2018-07-26 16:37:28 154
原创 【矩阵快速幂】 Blocks POJ3746
3744:Blocks总时间限制: 1000ms 内存限制: 65536kB描述Panda has received an assignment of painting a line of blocks. Since Panda is such an intelligent boy, he start to think of a math problem of pain...
2018-07-25 21:11:27 193
原创 【状压DP】 Traveling by Stagecoach ZOJ2792
Traveling by StagecoachTime Limit: 2 Seconds Memory Limit: 32768 KB Special JudgeOnce upon a time, there was a traveler.He plans to travel using stagecoaches (horse wagons). His starti...
2018-07-24 15:08:19 254
原创 【贪心、双指针】 Distinct Values HDU6301 2018多校第一场
Distinct ValuesTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1620 Accepted Submission(s): 509 Problem DescriptionChiaki has an arra...
2018-07-24 10:36:20 135
原创 Maximum Multiple HDU6298 2018多校第一场
Maximum MultipleTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 21 Accepted Submission(s): 10 Problem DescriptionGiven an integer n, ...
2018-07-23 18:14:31 377
原创 【线段树区间更新+二分】 L - Vases and Flowers HDU - 4614
Vases and FlowersTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 4482 Accepted Submission(s): 1841 Problem Description Alice is so p...
2018-07-18 21:52:41 132
原创 【单调栈/离散化/树状数组】 Beautiful Pair 洛谷P4755
题目描述小D有个数列 {a}\{a\}{a} ,当一个数对 (i,j)(i≤j)(i,j)(i\le j)(i,j)(i≤j) 满足 aia_iai 和 aja_jaj 的积不大于 ai,ai+1,⋯,aja_i,a_{i+1},\cdots,a_jai,ai+1,⋯,aj 中的最大值时,小D认为这个数对是美丽的.请你求出美丽的数对的数量。输入输出格式输入格式: 第一...
2018-07-18 09:40:21 175
原创 [线段树 DFS序时间戳 区间更新及查询] J - Assign the task HDU - 3974
Assign the taskTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4809 Accepted Submission(s): 1909Problem DescriptionThere is a company that h...
2018-07-16 00:15:47 236
原创 [线段树 区间合并] I - Tunnel Warfare HDU - 1540
Tunnel WarfareTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11861 Accepted Submission(s): 4645Problem DescriptionDuring the War of Resistan...
2018-07-15 18:10:26 204
原创 [线段树 单点更新 区间查询多个值] G - Balanced Lineup POJ - 3264
Balanced LineupTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 61985 Accepted: 28950Case Time Limit: 2000MSDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line...
2018-07-14 15:18:28 152
原创 [线段树/区间更新] F - Count the Colors ZOJ - 1610
Count the ColorsTime Limit: 2 Seconds Memory Limit: 65536 KBPainting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones.Your task is coun...
2018-07-14 13:56:43 224
原创 [线段树 区间更新及查找] E - 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 metallic sticks which are of the same length. Now Pudge wa...
2018-07-14 11:42:17 123
原创 [线段树 区间更新及查询] C - A Simple Problem with Integers POJ - 3468
A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 133448 Accepted: 41395Case Time Limit: 2000MSDescriptionYou have N integers, A1, A2, ... , AN. You need to deal...
2018-07-14 00:27:53 96
原创 [线段树\离散化] D - Mayor's posters POJ - 2528
Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 74974 Accepted: 21627DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campa...
2018-07-13 15:00:24 237
原创 【线段树】 A - 敌兵布阵 HDU - 1166
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 115586 Accepted Submission(s): 48420Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Der...
2018-07-11 14:01:51 185
原创 [树状数组] C - A Simple Problem with Integers POJ - 3468
A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 133197 Accepted: 41317Case Time Limit: 2000MSDescriptionYou have N integers, A1, A2, ... , AN. You need to deal...
2018-07-10 15:35:34 216
原创 [折半枚举] 4 Values whose Sum is 0 POJ 2785
4 Values whose Sum is 0Time Limit: 15000MS Memory Limit: 228000KTotal Submissions: 27860 Accepted: 8383Case Time Limit: 5000MSDescriptionThe SUM problem can be formulated as follows: given four lists ...
2018-07-10 12:11:42 114
原创 [反转(开关问题)] Fliptile POJ3279
FliptileTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 15259 Accepted: 5610DescriptionFarmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has a...
2018-07-09 20:06:24 115
原创 [反转(开关问题)] Face The Right Way POJ 3276
Face The Right WayTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 6478 Accepted: 3006DescriptionFarmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a row and many of them are facing forwa...
2018-07-09 17:41:30 124
原创 [线段树] An easy problem 2015 ACM/ICPC Asia Regional Shanghai Online H
One day, a useless calculator was being built by Kuros. Let's assume that number X is showed on the screen of calculator. At first, X = 1. This calculator only supports two types of operation. 1. mult...
2018-07-09 15:13:52 128
原创 [快速幂] K - Can you find it 2015 ACM/ICPC Asia Regional Shanghai Online K
Given a prime number C(1≤C≤2×105)C(1≤C≤2×105), and three integers k1, b1, k2 (1≤k1,k2,b1≤109)(1≤k1,k2,b1≤109). Please find all pairs (a, b) which satisfied the equation ak1⋅n+b1ak1⋅n+b1 + bk2⋅n−k2+1bk...
2018-07-08 21:01:03 105
原创 [尺取法 (双指针)] Subsequence POJ 3061
SubsequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 19633 Accepted: 8401DescriptionA sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, a...
2018-07-08 19:23:00 98
原创 [扩展gcd] 清帝之惑之康熙 Vijos1009
背景康熙是中国历史乃至世界历史中最伟大的帝王之一,清除螯拜,撤除三藩,统一台湾,平定准葛尔叛乱;与此同时,出众的他也被世界各国遣清使臣所折服。康熙是历史上少有的全人,不仅文武兼得,而且在各各方面都有见地,比如说航海、数学、英语、构图、建筑等等。一个最好的例子可以证明:康熙当年演算代数题的草稿纸至今仍然保存完好。话说康熙掌权之后,每天都抽空做数学题,特别是无聊题。这些天,某某老师开始教他做一些奇怪的...
2018-07-07 20:28:59 308
原创 [最小树形图 边 超级汇点] Ice_cream’s world II HDU2121
G - Ice_cream’s world II HDU - 2121 #include <bits/stdc++.h>using namespace std;const int inf = 0x3f3f3f3f;const int mn = 1010, mm = 10010;int n, m;struct node{ int s, t, c;} e[mm + m...
2018-07-06 17:04:01 157
原创 【几何】 Pair Of Lines CF contest961 D
D. Pair Of Linestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n points on Cartesian plane. Every point is a lattice point (i. e. b...
2018-07-06 12:21:32 158
原创 [最小树形图(朱刘算法)] F - Teen Girl Squad UVA - 11183
You are part of a group of n teenage girls armed with cellphones. You have some news you wantto tell everyone in the group. The problem is that no two of you are in the same room, and you mustcommunic...
2018-07-03 14:20:54 208
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人