青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

posts - 74,  comments - 33,  trackbacks - 0
A Plug for UNIX
Time Limit: 1000MS Memory Limit: 65536K
Total Submissions: 5177 Accepted: 1628

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 and bureaucratic as possible.
Since the room was designed to accommodate reporters and journalists from around the world, it is equipped with electrical receptacles to suit the different shapes of plugs and voltages used by appliances in all of the countries that existed when the room was built. Unfortunately, the room was built many years ago when reporters used very few electric and electronic devices and is equipped with only one receptacle of each type. These days, like everyone else, reporters require many such devices to do their jobs: laptops, cell phones, tape recorders, pagers, coffee pots, microwave ovens, blow dryers, curling
irons, tooth brushes, etc. Naturally, many of these devices can operate on batteries, but since the meeting is likely to be long and tedious, you want to be able to plug in as many as you can.
Before the meeting begins, you gather up all the devices that the reporters would like to use, and attempt to set them up. You notice that some of the devices use plugs for which there is no receptacle. You wonder if these devices are from countries that didn't exist when the room was built. For some receptacles, there are several devices that use the corresponding plug. For other receptacles, there are no devices that use the corresponding plug.
In order to try to solve the problem you visit a nearby parts supply store. The store sells adapters that allow one type of plug to be used in a different type of outlet. Moreover, adapters are allowed to be plugged into other adapters. The store does not have adapters for all possible combinations of plugs and receptacles, but there is essentially an unlimited supply of the ones they do have.

Input

The input will consist of one case. The first line contains a single positive integer n (1 <= n <= 100) indicating the number of receptacles in the room. The next n lines list the receptacle types found in the room. Each receptacle type consists of a string of at most 24 alphanumeric characters. The next line contains a single positive integer m (1 <= m <= 100) indicating the number of devices you would like to plug in. Each of the next m lines lists the name of a device followed by the type of plug it uses (which is identical to the type of receptacle it requires). A device name is a string of at most 24 alphanumeric
characters. No two devices will have exactly the same name. The plug type is separated from the device name by a space. The next line contains a single positive integer k (1 <= k <= 100) indicating the number of different varieties of adapters that are available. Each of the next k lines describes a variety of adapter, giving the type of receptacle provided by the adapter, followed by a space, followed by the type of plug.

Output

A line containing a single non-negative integer indicating the smallest number of devices that cannot be plugged in.

Sample Input

4 
A 
B 
C 
D 
5 
laptop B 
phone C 
pager B 
clock B 
comb X 
3 
B X 
X A 
X D 

Sample Output

1
一個網路流的問題,如果說想通了就簡單了,我實現的時候,用了4xxms感覺很是郁悶,隨后想通了0ms通過的方法也懶得寫了
記下就行了沒主要部分是最大流,或者用二分匹配實現都行,代碼很爛,不值得發出來
posted on 2009-02-24 21:52 KNIGHT 閱讀(200) 評論(0)  編輯 收藏 引用

只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


<2009年8月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
303112345

常用鏈接

留言簿(8)

隨筆檔案

文章檔案

Friends

OJ

搜索

  •  

最新評論

閱讀排行榜

評論排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美日韩人人澡狠狠躁视频| 校园激情久久| 欧美亚洲三级| 午夜一区二区三区在线观看| 亚洲欧美另类国产| 午夜国产精品视频免费体验区| 亚洲一二三区视频在线观看| 亚洲视屏一区| 在线不卡中文字幕| 国产午夜精品久久久久久免费视| 国产视频一区在线| 在线不卡中文字幕播放| 日韩视频一区二区在线观看| 亚洲综合精品一区二区| 久久精品欧美日韩| 亚洲国产精品毛片| 亚洲深夜福利| 久久久999成人| 欧美喷潮久久久xxxxx| 欧美偷拍一区二区| 国产视频一区在线| 亚洲三级影院| 欧美一区二区成人6969| 嫩模写真一区二区三区三州| 亚洲精选久久| 久久久久久久久久看片| 欧美日韩亚洲一区二区三区| 国产在线视频欧美一区二区三区| 亚洲每日在线| 久久亚洲高清| 一区二区三区四区国产精品| 久久亚洲午夜电影| 国产精品免费网站在线观看| 亚洲韩国精品一区| 久久精品在线播放| 99精品国产99久久久久久福利| 久久国产精品久久精品国产| 欧美日韩在线观看一区二区| 亚洲大片一区二区三区| 久久av红桃一区二区小说| 亚洲品质自拍| 玖玖精品视频| 国产综合第一页| 性欧美大战久久久久久久久| 99视频有精品| 欧美国产日韩一区二区三区| 国产日韩欧美二区| 亚洲一区二区少妇| 亚洲人成7777| 欧美激情欧美狂野欧美精品 | 亚洲欧洲日产国产综合网| 亚洲欧美日韩中文播放| 欧美日韩国产首页| 99视频精品在线| 欧美黄色免费| 欧美~级网站不卡| 亚洲国产视频一区二区| 欧美aⅴ一区二区三区视频| 久久久欧美一区二区| 黄色免费成人| 欧美高清视频在线| 美女尤物久久精品| 亚洲精品国产精品乱码不99按摩| 亚洲一区综合| 欧美视频中文在线看 | 激情久久久久久久| 久久国产精品99国产精| 午夜精品理论片| 国产日韩久久| 免费看精品久久片| 老司机午夜免费精品视频| 亚洲电影毛片| 最新精品在线| 国产精品久久久久久久app| 亚洲欧美日韩视频二区| 午夜一区不卡| 亚洲黄色天堂| 亚洲精品国产精品久久清纯直播| 欧美日韩美女| 欧美在线播放| 模特精品在线| 99精品热6080yy久久 | 欧美国产日韩精品| 欧美激情在线狂野欧美精品| 一二三四社区欧美黄| 亚洲综合99| 亚洲国产欧美精品| 99精品欧美一区二区蜜桃免费| 国产精品日韩二区| 免费观看成人鲁鲁鲁鲁鲁视频 | 亚洲高清在线视频| 欧美图区在线视频| 噜噜爱69成人精品| 欧美三区美女| 免费久久99精品国产自在现线| 欧美日韩国产bt| 久久精品99| 欧美日本不卡高清| 久久视频在线视频| 欧美日韩日韩| 美日韩精品免费观看视频| 欧美日韩第一区| 久久青草久久| 欧美午夜一区二区福利视频| 美日韩在线观看| 国产精品入口福利| 亚洲精品永久免费精品| 精品91视频| 亚洲性av在线| 一本色道久久综合亚洲二区三区| 欧美在线观看视频| 亚洲欧美一区二区视频| 欧美成人国产一区二区| 久久精品日韩欧美| 国产精品99免视看9| 亚洲大胆女人| 狠狠网亚洲精品| 亚洲欧美国内爽妇网| 中文在线不卡| 欧美日本在线视频| 亚洲精品久久视频| 亚洲欧美日产图| 亚洲一区二区伦理| 欧美激情亚洲国产| 欧美国产欧美亚洲国产日韩mv天天看完整| 国产精品久久久一区麻豆最新章节| 欧美激情网友自拍| 亚洲国产成人一区| 久久久欧美精品sm网站| 久久这里只精品最新地址| 国产午夜精品美女视频明星a级| 亚洲午夜激情网页| 亚洲一区二区三区高清 | 日韩手机在线导航| 久久一区激情| 欧美a级大片| 亚洲国产日韩欧美在线99| 久久久国产一区二区| 久久亚洲风情| 亚洲国产欧美日韩精品| 久久久综合香蕉尹人综合网| 蜜臀av一级做a爰片久久| 伊人久久亚洲影院| 蜜桃久久精品一区二区| 亚洲激情网站| 一区二区三区成人精品| 国产精品成人观看视频国产奇米| 一本色道久久| 久久www成人_看片免费不卡| 国产亚洲人成网站在线观看| 久久av最新网址| 欧美粗暴jizz性欧美20| 日韩视频二区| 欧美亚男人的天堂| 欧美夜福利tv在线| 欧美chengren| 日韩一级免费| 国产精品一区二区三区久久 | 久久久噜噜噜久久久| 免费成人黄色| 一区二区三区色| 国产精品久久久久久福利一牛影视 | 91久久香蕉国产日韩欧美9色| 美女精品国产| 最近中文字幕日韩精品| 亚洲天堂黄色| 欧美日韩国产综合久久| 亚洲免费一级电影| 久久亚洲国产成人| 一区二区三区高清在线| 国产精品美女www爽爽爽| 性做久久久久久久久| 亚洲第一主播视频| 亚洲影院在线观看| 黄色日韩在线| 欧美日韩一区在线视频| 欧美一区二区三区在线观看| 欧美成人一品| 亚洲一区二区三区午夜| 黄色亚洲免费| 国产精品久久久久久久久久ktv | 久久久久久999| 免费不卡欧美自拍视频| 在线视频免费在线观看一区二区| 国产亚洲精品aa午夜观看| 蜜桃av综合| 欧美在线免费观看| 亚洲激情图片小说视频| 久久精品免费播放| 亚洲美女视频在线观看| 狠狠色丁香久久婷婷综合丁香| 欧美午夜视频在线观看| 免费在线成人av| 欧美在线一二三区| 亚洲一区二区三区四区在线观看| 亚洲成在人线av| 免费在线视频一区| 久久se精品一区二区| 亚洲欧美国产高清va在线播| 亚洲精选国产|