POJ 1700 F(Contest #3)】的更多相关文章

Description A group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle arrangement must be arranged in order to row the boat back and forth so that all people may cross. Eac…
/* poj 2187 Beauty Contest 凸包:寻找每两点之间距离的最大值 这个最大值一定是在凸包的边缘上的! 求凸包的算法: Andrew算法! */ #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; struct Point{ Point(){} Point(int x, int y){ this->…
POJ 3660 Cow Contest / HUST 1037 Cow Contest / HRBUST 1018 Cow Contest(图论,传递闭包) Description N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has…
POJ 1719 Shooting Contest id=1719" target="_blank" style="">题目链接 题意:给定一个矩阵,每列有两个白点,其它都是黑点,如今要求每列选一个白点,使得每一行至少包括一个白点被选中 思路:二分图匹配,白点的位置行列建边,然后跑匹配,假设匹配数不等于行数,就是是无解,然后输出方案的时候注意,假设有位置是没匹配的,说明这个位置是多余的,可是还是要随意选一个白点来输出 代码: #include <…
题目: http://poj.org/problem?id=1113 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22013#problem/F Wall Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 26219   Accepted: 8738 Description Once upon a time there was a greedy King who…
Cow Contest POJ - 3660 :http://poj.org/problem?id=3660   参考:https://www.cnblogs.com/kuangbin/p/3140837.html   题意: n头牛,有m对牛进行了比赛,现在告诉你每队牛比赛的结果,A胜B,问有几头牛的排名可以确定. 思路: 题目给出了m对的相对关系,求有多少个排名是确定的. 使用floyed求一下传递闭包.如果这个点和其余的关系都是确定的,那么这个点的排名就是确定的. #include <al…
http://poj.org/problem?id=1700 题目大意就是一条船,有N个人需要过河,求N个人最短过河的时间 #include <stdio.h> int main() { ],T,j,i,n,sum; scanf("%d",&T); ;i<T;i++) { scanf("%d",&n); ;j<n;j++) scanf("%d",&t[j]); sum=; ) { ]+t[]+t[n…
链接:http://poj.org/problem?id=2187 Description Bessie, Farmer John's prize cow, has just won first place in a bovine beauty contest, earning the title 'Miss Cow World'. As a result, Bessie will make a tour of N (2 <= N <= 50,000) farms around the wor…
题目链接:http://poj.org/problem?id=3660 Cow Contest Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10066   Accepted: 5682 Description N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all kn…
http://poj.org/problem?id=1719 Shooting Contest Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 4135   Accepted: 1521   Special Judge Description Welcome to the Annual Byteland Shooting Contest. Each competitor will shoot to a target whi…