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

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>
            激情综合激情| 欧美在线观看一区二区| 欧美成人69| 久久综合网络一区二区| 久久久精品一区二区三区| 亚洲人成网站777色婷婷| 亚洲一区二区在| 夜夜嗨av一区二区三区四区| 亚洲人成77777在线观看网| 在线看日韩欧美| 亚洲国产老妈| 一区二区电影免费在线观看| 亚洲免费av观看| 亚洲——在线| 久久亚洲精品伦理| 亚洲福利久久| 小处雏高清一区二区三区| 久久免费精品视频| 欧美亚洲成人精品| 亚洲乱码国产乱码精品精| 欧美韩日一区| 一本一本久久a久久精品综合麻豆| av不卡免费看| 欧美国产欧美亚洲国产日韩mv天天看完整| 国产精品一区二区久久| 亚洲精品欧美极品| 久久这里有精品视频| 欧美一级久久久久久久大片| 国产精品永久入口久久久| 亚洲欧美久久久| 亚洲欧美日本在线| 国产毛片一区| 亚洲深夜福利| 久久精品国产久精国产爱| 欧美日韩亚洲免费| 亚洲欧美在线一区| 有坂深雪在线一区| 欧美成人激情视频免费观看| 久久精品国产综合| 在线观看欧美黄色| 欧美激情精品久久久久久免费印度 | 国产一区日韩欧美| 欧美一二三视频| 欧美在线电影| 日韩亚洲精品视频| 亚洲免费观看在线观看| 国产精品九色蝌蚪自拍| 久久久久国内| 麻豆91精品| 午夜精品www| 老司机午夜精品视频| 亚洲丶国产丶欧美一区二区三区| 亚洲精品在线观看免费| 欧美一区二视频| 日韩亚洲欧美精品| 欧美日韩高清在线观看| 亚洲欧美日韩在线一区| 久久精品国产99国产精品澳门| 一色屋精品视频免费看| 亚洲国产精品热久久| 欧美日韩亚洲激情| 欧美 日韩 国产在线| 亚洲女ⅴideoshd黑人| 午夜欧美视频| 99视频精品免费观看| 亚洲一区二区免费在线| 狠狠色综合网| 亚洲第一网站免费视频| 国产精品第一区| 欧美高清日韩| 国产亚洲精品高潮| 一本大道久久a久久精二百| 亚洲国产91精品在线观看| 亚洲欧洲日本国产| 激情六月婷婷久久| 欧美国产先锋| 一区在线免费观看| 亚洲女人天堂成人av在线| 亚洲国产精品一区在线观看不卡 | 好吊妞这里只有精品| 一区二区三区www| 亚洲男女自偷自拍| 亚洲激情在线视频| 欧美在线亚洲一区| 亚洲欧美国产三级| 欧美金8天国| 亚洲精品乱码久久久久久按摩观| 国产三级欧美三级日产三级99| 久久久999精品免费| 欧美电影在线观看| 亚洲人成网站色ww在线| 亚洲午夜免费视频| 国产精品久久波多野结衣| 亚洲免费观看高清在线观看 | 欧美成人免费在线观看| 在线播放精品| 欧美日韩一区二区欧美激情 | 亚洲男人的天堂在线aⅴ视频| 亚洲尤物在线视频观看| 国产一区二区三区在线观看精品 | 国产精品免费小视频| 亚洲欧洲99久久| 91久久久久久久久久久久久| 亚洲无吗在线| 欧美在线欧美在线| 先锋影院在线亚洲| 国产精品久久看| 美女视频黄免费的久久| 午夜精品一区二区三区在线| 欧美激情国产日韩| 久热精品视频在线观看一区| 亚洲欧美韩国| 在线视频亚洲欧美| 亚洲美女性视频| 亚洲精品乱码久久久久久| 国产精品久久影院| 欧美日韩国产精品| 欧美日韩精选| 欧美顶级少妇做爰| 欧美/亚洲一区| 欧美成人69av| 欧美—级a级欧美特级ar全黄| 久久久久综合一区二区三区| 欧美一区二区精品久久911| 亚洲欧美电影院| 午夜日韩av| 免费在线视频一区| 欧美日韩一区二区三区在线观看免| 欧美精品三级| 国产精品萝li| 黑人一区二区| 亚洲人成网站999久久久综合| 一区二区免费看| 欧美一区二区大片| 亚洲国产一区二区a毛片| 亚洲免费大片| 久久久999精品视频| 欧美老女人xx| 海角社区69精品视频| 一区二区三区视频观看| 久久精品国产精品亚洲综合| 久久久噜噜噜久久中文字免| 欧美激情一区在线| 欧美亚洲一区二区三区| 欧美激情亚洲一区| 久久激情五月丁香伊人| 在线一区观看| 裸体女人亚洲精品一区| 欧美午夜视频网站| 1024成人| 老司机午夜免费精品视频| 亚洲精品综合在线| 久久九九免费视频| 国产欧美日韩麻豆91| 91久久香蕉国产日韩欧美9色| 久久久久国产精品午夜一区| 欧美一级视频精品观看| 欧美黄色一区| 亚洲区一区二区三区| 欧美一区二视频在线免费观看| 欧美一区二区三区四区夜夜大片| 亚洲人成高清| 欧美大片一区二区| 亚洲黄色性网站| 欧美国产免费| 免费在线国产精品| 一区二区久久| 亚洲在线观看视频| 国产麻豆精品视频| 另类天堂视频在线观看| 噜噜噜91成人网| 艳女tv在线观看国产一区| 亚洲激情自拍| 国产日韩欧美成人| 免费中文日韩| 欧美视频在线观看 亚洲欧| 午夜视频一区| 久久综合综合久久综合| 亚洲一区二区三区精品在线观看 | 欧美夜福利tv在线| 激情另类综合| 亚洲欧美国产视频| 日韩一级视频免费观看在线| 亚洲伊人伊色伊影伊综合网| 国产精品制服诱惑| 久久青草久久| 欧美亚洲第一页| 国产欧美视频一区二区| 亚洲成人在线网| 国产欧美日韩精品在线| 亚洲精品一区在线观看| 国内精品视频在线观看| 亚洲欧洲精品一区二区| 国内揄拍国内精品少妇国语| 日韩写真在线| 亚洲欧美日韩国产中文在线| 欧美成人亚洲成人| 亚洲国产一区二区在线| 在线观看日韩一区| 久久精品日产第一区二区|