题目链接:http://poj.org/problem?id=3281 参考了某犇做的PPT。对于此题的解释有如下内容(我只是搬运工)。 【题目大意】 有F种食物和D种饮料,每种食物或饮料只能供一头牛享用,且每头牛只享用一种食物和一种饮料。现在有N头牛,每头牛都有自己喜欢的食物种类列表和饮料...
分类:
其他好文 时间:
2015-11-13 22:18:50
阅读次数:
241
分析:数学模型是三个集合A,B,C,(a,b,c)构成一个匹配。因为图一个点只能匹配一次,把a拆点a',a",在可以匹配的点上连边,s - b - a' - a" - c - t,然后最大流就好了。/**************************************************...
分类:
其他好文 时间:
2015-11-08 17:48:39
阅读次数:
179
DiningTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 11844Accepted: 5444DescriptionCows are such finicky eaters. Each cow has a preference f...
分类:
其他好文 时间:
2015-11-04 21:07:29
阅读次数:
188
题目传送门题意:求凸包 + (int)求面积 / 50/************************************************* Author :Running_Time* Created Time :2015/11/4 星期三 11:13:29* File...
分类:
其他好文 时间:
2015-11-04 12:49:58
阅读次数:
178
https://leetcode.com/problems/bulls-and-cows/Examples:Secret: 1807 Secret: 1123Guess: 7810 ====> "0A3B" Guess: 0111 ===...
分类:
其他好文 时间:
2015-11-04 07:05:48
阅读次数:
230
迪杰斯特拉哦,很挫哦A -Til the Cows Come HomeTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 2387DescriptionBessie is ...
分类:
其他好文 时间:
2015-11-03 22:50:40
阅读次数:
269
题意: 给出两个数字,输出(1)有多少位是相同的(2)有多少位不在正确的位置上。思路: 扫一遍,统计相同的,并且将两串中不同的数的出现次数分别统计起来,取小者之和就是第2个答案了。 1 class Solution { 2 public: 3 string getHint(string ...
分类:
其他好文 时间:
2015-11-03 21:11:02
阅读次数:
134
Bull MathTime Limit:1000MSMemory Limit:65536KTotal Submissions:13920Accepted:7192DescriptionBulls are so much better at math than the cows. They can m...
分类:
其他好文 时间:
2015-11-03 10:35:54
阅读次数:
190
You are playing the followingBulls and Cowsgame with your friend: You write a 4-digit secret number and ask your friend to guess it, each time your fr...
分类:
其他好文 时间:
2015-11-02 06:43:30
阅读次数:
246
1、题目名称 Bulls and Cows(猜数字游戏) 2、题目地址 https://leetcode.com/problems/bulls-and-cows/ 3、题目内容 英文:You are playing the following Bulls and Cows game with your friend: You write a...
分类:
其他好文 时间:
2015-11-01 00:30:51
阅读次数:
167