签到题
404-unkown
这个作者很懒,什么都没留下…
展开
-
hiho1227--The Cats' Feeding Spots
题目大意:给出M个喂食点,现在我们只能保留N个喂食点。以任意一个喂食点为圆心,任意半径作圆,在圆以内的点都可以留下,但是不能在圆上的出现点,因为管理者不好划分?求最小半径分析:2015北京网赛签到题?直接暴力,枚举半径,然后枚举每个点为圆心时的情况,记录圆内的点以及圆上的点。代码:#include #include #include using namespace原创 2015-09-29 11:28:15 · 329 阅读 · 0 评论 -
UVa10763--Foreign Exchange(水题)
题目大意:有n个学生分别想从学校a[i]交换到b[i],但是,只有当所有人都有自己partner时,才能成功交换分析:对两组数据进行排序即可,只有当排序后,两组数据一模一样才输出YES代码:#include #include #include #include #include using namespace std;const int maxn = 55原创 2015-10-21 23:47:04 · 311 阅读 · 0 评论 -
UVa11054--Wine trading in Gergovia(贪心)
题目:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=461&problem=1995&mosmsg=Submission+received+with+ID+16310698分析:每一个村庄必定要和相邻的进行交易,所以直接进行计算新的数量并累原创 2015-10-22 21:13:09 · 444 阅读 · 0 评论