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

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 閱讀(196) 評論(0)  編輯 收藏 引用
<2009年1月>
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

常用鏈接

留言簿(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>
            久久免费国产| 国产精品久久国产三级国电话系列| 欧美国产精品v| 免费在线亚洲| 欧美成va人片在线观看| 亚洲欧洲精品一区二区三区| 欧美激情中文不卡| 亚洲精品国产欧美| 中日韩美女免费视频网址在线观看| 亚洲无毛电影| 久久视频在线免费观看| 欧美激情一级片一区二区| 国产精品久久久91| 国内一区二区三区在线视频| 亚洲三级观看| 欧美一区在线看| 欧美aⅴ一区二区三区视频| 亚洲激情六月丁香| 亚洲一区二区三区久久| 久久中文欧美| 国产精品电影网站| 亚洲高清视频在线观看| 中文一区二区在线观看| 久久视频这里只有精品| 亚洲精品午夜精品| 欧美在线一区二区三区| 欧美日本三级| 狠狠色狠狠色综合日日小说| 中文日韩电影网站| 免费看的黄色欧美网站| 亚洲一区二区三区久久| 欧美一区二区私人影院日本| 美女精品在线观看| 亚洲一区二区黄色| 欧美日韩国产精品自在自线| 欧美久久成人| 一区视频在线播放| 欧美一区亚洲二区| 欧美一级专区免费大片| 欧美高清在线| 久久精品欧美| 国产欧美日韩高清| 亚洲视频自拍偷拍| 91久久黄色| 免费在线成人av| 国产一区在线看| 午夜精品在线观看| 一区二区免费在线视频| 欧美福利一区| 91久久精品国产91性色tv| 久久久久久久一区二区三区| 亚洲一级黄色av| 国产精品久久久久久亚洲毛片 | 欧美在线观看日本一区| 国产精品第一区| 亚洲在线网站| 在线亚洲国产精品网站| 欧美日韩的一区二区| 一区二区三区精品视频在线观看 | 一本一本a久久| 亚洲国产一二三| 欧美国产丝袜视频| 99视频一区二区| 亚洲精品少妇30p| 欧美日韩国语| 亚洲欧美日韩另类| 在线视频精品一区| 国产精品普通话对白| 久久av最新网址| 欧美在线视频免费播放| 一区国产精品| 亚洲国产清纯| 欧美日韩视频免费播放| 亚洲私人影院| 性做久久久久久久免费看| 极品少妇一区二区| 亚洲激情自拍| 国产精品国内视频| 久久久精品网| 麻豆国产精品777777在线| 日韩午夜在线观看视频| 亚洲网站在线观看| 曰韩精品一区二区| 日韩亚洲欧美精品| 国产日韩精品久久久| 免播放器亚洲一区| 欧美全黄视频| 国产精品久久久久久久久动漫| 亚洲欧美电影在线观看| 久久精品五月婷婷| 99视频在线观看一区三区| 亚洲特级毛片| 亚洲第一区色| 亚洲午夜女主播在线直播| 激情一区二区三区| a4yy欧美一区二区三区| 亚洲综合精品一区二区| 欧美一区在线直播| 亚洲九九精品| 亚洲中字在线| 亚洲精品一区二区三区av| 亚洲一二三区视频在线观看| 黄色成人av在线| 夜夜嗨av一区二区三区中文字幕 | 在线看片一区| 亚洲网站视频| 亚洲乱码国产乱码精品精| 亚洲无线视频| 亚洲精品自在在线观看| 欧美永久精品| 亚洲免费小视频| 欧美成人r级一区二区三区| 亚洲欧美在线磁力| 欧美激情在线狂野欧美精品| 久久精品首页| 国产精品视频免费观看www| 91久久精品日日躁夜夜躁欧美 | 欧美a一区二区| 国产精品在线看| 一区二区电影免费观看| 亚洲国产成人在线播放| 亚洲欧美综合| 欧美一区二区视频97| 国产精品v亚洲精品v日韩精品| 亚洲国产精品精华液网站| 一区二区在线观看视频在线观看| 亚洲女女做受ⅹxx高潮| 亚洲一区欧美一区| 欧美日韩一区在线| 99国产精品国产精品久久| 亚洲精品少妇30p| 免费看黄裸体一级大秀欧美| 欧美黄色免费网站| 亚洲区免费影片| 美国十次成人| 亚洲国产精品va| 亚洲美女视频网| 欧美日韩情趣电影| 一本到12不卡视频在线dvd| 一区二区免费看| 国产精品国产福利国产秒拍 | 99国产精品一区| 日韩一二三在线视频播| 欧美激情在线观看| 亚洲毛片在线观看| 亚洲欧美日韩国产中文| 国产美女精品视频免费观看| 欧美一区三区三区高中清蜜桃| 久久精品欧美日韩| 精品成人一区二区三区| 久久久97精品| 亚洲国产美女久久久久| 正在播放欧美视频| 国产精品乱子乱xxxx| 先锋影院在线亚洲| 免费不卡中文字幕视频| 亚洲乱码国产乱码精品精| 国产精品福利网站| 亚洲国产精品999| 欧美日本一区二区高清播放视频| 亚洲经典一区| 欧美日韩国产欧| 欧美一区国产在线| 亚洲盗摄视频| 亚洲欧美日韩一区二区在线| 国内精品模特av私拍在线观看| 欧美成人精品激情在线观看| 亚洲无限av看| 亚洲第一天堂无码专区| 亚洲欧美日韩精品综合在线观看| 狠狠做深爱婷婷久久综合一区| 欧美日韩1区| 久久久久久久久久久久久久一区| 亚洲精品永久免费精品| 久久嫩草精品久久久久| 一区二区三区视频免费在线观看| 国产日韩欧美日韩大片| 欧美日韩国产美| 久久久久久久精| 亚洲欧美日韩综合国产aⅴ| 欧美激情片在线观看| 久久精品人人做人人爽| 中文精品视频一区二区在线观看| 伊人精品在线| 国产视频在线一区二区| 欧美日韩国产999| 美女性感视频久久久| 欧美一级成年大片在线观看| 亚洲免费播放| 亚洲国产精品视频| 美女视频黄a大片欧美| 欧美在线精品一区| 中文在线资源观看视频网站免费不卡| 国产一区二区三区的电影| 国产精品久久久久毛片软件| 欧美日韩第一页| 欧美日本三区| 欧美美女bbbb| 牛夜精品久久久久久久99黑人| 欧美一区在线视频|