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

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>
            午夜久久一区| 久久精品日产第一区二区| 欧美日韩精品一区二区在线播放 | 国产欧美精品va在线观看| 91久久精品国产91久久性色tv| 欧美在线一区二区三区| 欧美不卡一卡二卡免费版| 艳妇臀荡乳欲伦亚洲一区| 国产色综合网| 欧美日韩精品一区二区三区四区 | 亚洲欧美日韩视频一区| 在线欧美日韩| 国产精品一区二区在线观看不卡| 久久久水蜜桃| 亚洲女同同性videoxma| 亚洲精品久久视频| 麻豆国产精品777777在线| 午夜精品福利一区二区三区av| 亚洲国产日韩美| 在线欧美电影| 亚洲综合国产激情另类一区| 夜夜嗨av色一区二区不卡| 亚洲欧洲av一区二区| 久久亚洲综合| 久久九九久精品国产免费直播| 亚洲一区免费视频| 麻豆视频一区二区| 中国成人在线视频| 亚洲精品久久久久久久久久久| 一本色道久久加勒比88综合 | 亚洲无限乱码一二三四麻| 一本一道久久综合狠狠老精东影业 | 久久亚洲一区二区| 亚洲一区二区三区涩| 夜夜爽av福利精品导航| 亚洲国产高清一区二区三区| 欧美成人一二三| 你懂的视频一区二区| 9人人澡人人爽人人精品| 久久久久成人精品免费播放动漫| 欧美色视频在线| 国产精品美女www爽爽爽视频| 欧美特黄一级| 亚洲国产婷婷| 久久久噜噜噜久噜久久| 美国成人毛片| 欧美在线资源| 久久综合久久久久88| 日韩视频精品在线| 一区二区视频免费完整版观看| 欧美日韩123| 国产午夜精品视频| 亚洲香蕉成视频在线观看 | 亚洲一区影院| 亚洲蜜桃精久久久久久久| 免费视频一区| 国产精品swag| 国产综合av| 亚洲精品久久| 亚洲香蕉在线观看| 日韩视频免费在线| 欧美三级电影大全| 亚洲午夜一级| 国产精品99久久久久久宅男| 欧美日韩视频专区在线播放 | 午夜久久影院| 国产欧美日韩一区二区三区在线 | 国产精品有限公司| 校园春色国产精品| 亚洲第一网站| 久久综合久久88| 国产精品一卡二| 午夜亚洲影视| 亚洲欧美综合| 欧美日韩精品在线视频| 一个人看的www久久| 亚洲精品一区二区在线| 欧美在线观看视频一区二区三区 | 亚洲一区二区三区在线| 国产精品视频网| 亚洲激情电影中文字幕| 欧美成人日本| 欧美乱妇高清无乱码| 激情欧美亚洲| 亚洲电影中文字幕| 国产精品九九| 一级日韩一区在线观看| av不卡在线| 国产亚洲网站| 亚洲欧美日韩直播| 欧美中文字幕在线播放| 亚洲国产一区在线| 亚洲婷婷综合色高清在线| 国产在线精品成人一区二区三区 | 亚洲在线一区二区三区| 精品51国产黑色丝袜高跟鞋| 国产精品日韩在线| 99riav久久精品riav| 久久全球大尺度高清视频| 免费观看久久久4p| 午夜精品久久久久久久99热浪潮| 久久激情视频免费观看| 国产精品视频不卡| 亚洲福利视频在线| 国产女人精品视频| 亚洲狠狠丁香婷婷综合久久久| 久久久久国产精品一区二区| 日韩一二三在线视频播| 午夜精品久久| 亚洲一区二区免费看| 久色婷婷小香蕉久久| 香蕉免费一区二区三区在线观看| 免费高清在线视频一区·| 1024亚洲| 亚洲欧美另类中文字幕| 99re6热在线精品视频播放速度| 午夜视频在线观看一区| 一个色综合导航| 免费av成人在线| 久久色在线观看| 国产精品手机视频| 日韩午夜免费视频| 亚洲精品一级| 久久午夜av| 亚洲最黄网站| 久久天天狠狠| 久久免费99精品久久久久久| 国产精品亚洲综合色区韩国| 亚洲精品美女久久久久| 亚洲国产精品高清久久久| 亚洲日本激情| 亚洲高清电影| 久久天天躁狠狠躁夜夜av| 久久久综合网站| 国产情人节一区| 午夜国产欧美理论在线播放| 亚洲欧美日韩一区| 国产精品久久一级| 亚洲网站视频| 欧美一区二视频在线免费观看| 久久久久久久综合| 久久精品99国产精品日本| 麻豆精品传媒视频| 噜噜爱69成人精品| 在线看日韩av| 麻豆精品一区二区综合av| 免费永久网站黄欧美| 影音先锋欧美精品| 国产精品99久久久久久久女警| 亚洲在线中文字幕| 国产精品久久久久毛片软件 | 欧美电影在线免费观看网站 | 久久精品在线播放| 精品96久久久久久中文字幕无| 久久久久亚洲综合| 亚洲国产精品一区在线观看不卡| 日韩视频精品| 久久久久久久91| 欧美成人网在线| 久久九九国产精品| 在线播放亚洲| 欧美精品久久久久a| 欧美成人免费一级人片100| 日韩视频在线一区二区| 欧美日韩视频| 欧美在线观看视频在线| 亚洲缚视频在线观看| 亚洲综合色在线| 激情偷拍久久| 欧美欧美在线| 欧美一区二区免费观在线| 亚洲一区二区三区免费观看| 国产美女诱惑一区二区| 久久人人97超碰国产公开结果| 亚洲激情不卡| 欧美在线观看一二区| 亚洲激情自拍| 国产精品一区二区三区久久久 | 国产精品免费视频xxxx| 久久久久青草大香线综合精品| 亚洲美女视频在线免费观看| 久久成人免费视频| 最新中文字幕亚洲| 久久一区二区三区四区| 日韩午夜av在线| 久久婷婷丁香| 亚洲夜晚福利在线观看| 一区免费在线| 国产精品嫩草影院av蜜臀| 你懂的国产精品| 欧美影院精品一区| 亚洲私人黄色宅男| 亚洲成色精品| 日韩视频在线永久播放| 国产亚洲成av人片在线观看桃| 欧美啪啪一区| 欧美精品18videos性欧美| 久久久国产精品一区二区三区| 国产精品99久久久久久人| 亚洲三级电影全部在线观看高清|