POJ1087 A Plug of UNIX】的更多相关文章

题目链接:https://vjudge.net/problem/POJ-1087 A Plug for UNIX Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 17861   Accepted: 6172 Description You are in charge of setting up the press room for the inaugural meeting of the United Nations In…
A Plug for UNIX 题目链接:https://vjudge.net/problem/POJ-1087 Description: You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an international mandate to make the free flow o…
                                   A Plug for UNIX Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 16083   Accepted: 5513 Description You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet…
A Plug for UNIX Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 13855   Accepted: 4635 Description You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an int…
A Plug for UNIX Description You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an international mandate to make the free flow of information and ideas on the Internet as…
题目描述 Description You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an international mandate to make the free flow of information and ideas on the Internet as cumbersome…
http://poj.org/problem?id=1087 好久没遇见过这么坑的题了这个题真是挫的够可以的.题目大意:你作为某高管去住宿了,然后宾馆里有几种插座,分别有其对应型号,你携带了几种用电器(手机,电脑一类的), 也有其对应型号:可是不一定用电器就能和插座匹配上,于是宾馆的商店里提供了一些转换器,这些转换器可以将某一型号电源转换成另一型号的.问,你的用电器最少会有多少种无 法充电.也就是问可以用上电的用电器的最大数目,之后用电器总数减去此可用电最大数目即可得到最小不能用电数目. 一开始…
读题比做题难系列…… poj1087 输入n,代表插座个数,接下来分别输入n个插座,字母表示.把插座看做最大流源点,连接到一个点做最大源点,流量为1. 输入m,代表电器个数,接下来分别输入m个电器,字符串表示.把电器看做最大流终点,连接到一个点做最大汇点,流量为1. 输入k,代表转换器个数,接下来分别输入k个转换器,每个插座输入两个字母a,b表示a可以连在b上.把转换器看做流,b->a,因为转换器无限提供,流量为无限大 代码: #include <iostream> #include &…
题意:给定n个插座,m个插头,k个转换器(x,y),转换器可以让插头x转成插头y.问最少有多少个插头被剩下. 题解: 最大流或者二分图匹配.然而我不知道怎么打二分图匹配..打了最大流.这题字符串比较坑爹,我就先把所有字符串编号(去重),然后给每个点编两个号,一个代表它作为插头的编号,一个代表它作为插座的编号.最坑的是uvaWA了好久最后发现结尾要有一个回车..... 还有数据范围也是个坑点,点起码要开500. 代码如下:(poj上是单组数据,uva和hdu都是多组) #include<cstdi…
思路 电器数1 ~ 100,附带100种接口,注意题目:You notice that some of the devices use plugs for which there is no receptacle. 墙上接口1 ~ 100,还有1 ~ 100转接口,转接口有两个接口.假设所有的接口类型都不相同,接口就有400种.所以汇点值 >= 501. 读入电器的时候,它的接口可能在墙上并没有,所以要判断在此之前是否已经给该接口分配过标号. 读入转接口的时候,先读入两个转接口,然后分别判断是否…