<题目链接> 题目大意:有m个宾客,n把雨伞,预计时间t后将会下大雨,告诉你每个宾客的位置和速度,每把雨伞的位置,问你最多几个宾客能够拿到伞. 解题分析: 本题就是要我们求人与伞之间的最大匹配,但是数据量较大,匈牙利算法复杂度为$O(n*m)$,会超时,所以这里用的是复杂度为$O(sqrt(n)*m)$的HK算法. 当然,本题也可以用Dinic最大流来求解最大匹配,并且这种方法求得到最大匹配的时间复杂度也为$O(sqrt(n)*m)$ #include <bits/stdc++.h>…
HDU 2389 Rain on your Parade / HUST 1164 4 Rain on your Parade(二分图的最大匹配) Description You're giving a party in the garden of your villa by the sea. The party is a huge success, and everyone is here. It's a warm, sunny evening, and a soothing wind send…
Rain on your Parade Time Limit:3000MS     Memory Limit:165535KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 2389 Description You’re giving a party in the garden of your villa by the sea. The party is a huge success, and everyone is h…
Rain on your Parade Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 655350/165535 K (Java/Others)Total Submission(s): 2154    Accepted Submission(s): 662 Problem Description You’re giving a party in the garden of your villa by the sea. The pa…
大意:在一个二维坐标系上有nx个人和ny把伞,每个人都有自己的移动速度,问有多少人可以再 time 时间内移动到不同的雨伞处(不允许两个人共用一把伞).   输入数据: 第一行是一个T代表T组测试数据. 开始是一个数字  time (1 <=time<= 5) 代表还有t时间就开始下雨了.  接下来是一个数字m代表宾客的数量. 接下来m行每行一个x,y 代表宾客所在的坐标, s代表宾客移动的速度 然后是一个数字n  代表伞的数量. 接下来n行就是伞的坐标.(所有坐标的绝对值是小于10000的)…
题目链接: Hdu 3289 Rain on your Parade 题目描述: 有n个客人,m把雨伞,在t秒之后将会下雨,给出每个客人的坐标和每秒行走的距离,以及雨伞的位置,问t秒后最多有几个客人可以拿到雨伞? 解题思路: 数据范围太大,匈牙利算法O(n*m)果断华丽丽的TLE,请教了一下度娘,发现还有一种神算法—— Hopcroft-Karp,然后就get√新技能,一路小跑过了,有一点不明白的是hdu上竟然有人0ms过,这又是什么神姿势(吓哭!!!!!),额.........,扯远了.  H…
 HK.... Rain on your Parade Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 655350/165535 K (Java/Others)Total Submission(s): 2229    Accepted Submission(s): 696 Problem Description You're giving a party in the garden of your villa by the sea…
读题显然是二分图匹配,看成guest与umbrella的匹配.匈牙利果断TLE了,其实时间卡的相当紧.HK过的,750ms. /* 2389 */ #include <iostream> #include <string> #include <map> #include <queue> #include <set> #include <stack> #include <vector> #include <algori…
题目链接:https://vjudge.net/problem/HDU-2389 Rain on your Parade Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 655350/165535 K (Java/Others)Total Submission(s): 4889    Accepted Submission(s): 1612 Problem Description You’re giving a party in t…
Rain on your Parade Problem Description You’re giving a party in the garden of your villa by the sea. The party is a huge success, and everyone is here. It’s a warm, sunny evening, and a soothing wind sends fresh, salty air from the sea. The evening…