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

posts - 74,  comments - 33,  trackbacks - 0
Friendship
Time Limit: 2000MS Memory Limit: 20000K
Total Submissions: 1403 Accepted: 294

Description

In modern society, each person has his own friends. Since all the people are very busy, they communicate with each other only by phone. You can assume that people A can keep in touch with people B, only if
1. A knows B's phone number, or
2. A knows people C's phone number and C can keep in touch with B.
It's assured that if people A knows people B's number, B will also know A's number.

Sometimes, someone may meet something bad which makes him lose touch with all the others. For example, he may lose his phone number book and change his phone number at the same time.

In this problem, you will know the relations between every two among N people. To make it easy, we number these N people by 1,2,...,N. Given two special people with the number S and T, when some people meet bad things, S may lose touch with T. Your job is to compute the minimal number of people that can make this situation happen. It is supposed that bad thing will never happen on S or T.

Input

The first line of the input contains three integers N (2<=N<=200), S and T ( 1 <= S, T <= N , and S is not equal to T).Each of the following N lines contains N integers. If i knows j's number, then the j-th number in the (i+1)-th line will be 1, otherwise the number will be 0.

You can assume that the number of 1s will not exceed 5000 in the input.

Output

If there is no way to make A lose touch with B, print "NO ANSWER!" in a single line. Otherwise, the first line contains a single number t, which is the minimal number you have got, and if t is not zero, the second line is needed, which contains t integers in ascending order that indicate the number of people who meet bad things. The integers are separated by a single space.

If there is more than one solution, we give every solution a score, and output the solution with the minimal score. We can compute the score of a solution in the following way: assume a solution is A1, A2, ..., At (1 <= A1 < A2 <...< At <=N ), the score will be (A1-1)*N^t+(A2-1)*N^(t-1)+...+(At-1)*N. The input will assure that there won't be two solutions with the minimal score.

Sample Input

3 1 3
1 1 0
1 1 1
0 1 1

Sample Output

1
2

Source

POJ Monthly
這道題目,不知道怎么搞的我的最大流一直是超時,有點郁悶,TLM了
郁悶,代碼 ac后更新
posted on 2009-02-26 09:46 KNIGHT 閱讀(100) 評論(0)  編輯 收藏 引用

只有注冊用戶登錄后才能發(fā)表評論。
網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


<2009年4月>
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

常用鏈接

留言簿(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>
            鲁大师影院一区二区三区| 亚洲视频一区在线| 中日韩美女免费视频网站在线观看| 午夜精品理论片| 91久久精品一区二区别| 亚洲视频一起| 欧美三区在线视频| 亚洲激情一区| 免费看成人av| 久久精品国产一区二区三区| 国产精品草莓在线免费观看| 一区二区三区久久久| 亚洲欧洲日产国码二区| 欧美成人综合网站| 最近中文字幕mv在线一区二区三区四区 | 久久se精品一区二区| 亚洲最新中文字幕| 欧美肉体xxxx裸体137大胆| 夜夜嗨网站十八久久| 亚洲激情第一页| 欧美人牲a欧美精品| 亚洲精品中文字幕女同| 亚洲国产精品久久人人爱蜜臀| 久久裸体艺术| 亚洲黄色一区| 亚洲人成网站影音先锋播放| 欧美日韩成人综合在线一区二区| 一级日韩一区在线观看| 一区二区三区黄色| 国产精品乱码一区二三区小蝌蚪| 午夜视频一区| 久久岛国电影| 91久久在线观看| 99re成人精品视频| 国产欧美一区二区三区久久人妖| 国产精品蜜臀在线观看| 欧美日韩岛国| 亚洲综合精品自拍| 亚洲一区二区三区午夜| 国产亚洲一区二区在线观看| 久久婷婷麻豆| 欧美精品导航| 欧美一区二区三区另类| 久久久久久久久久久一区 | 黄色成人免费观看| 亚洲福利国产精品| 欧美手机在线| 久久综合狠狠综合久久激情| 免费观看一级特黄欧美大片| 一区二区三区欧美在线观看| 亚洲先锋成人| 亚洲高清不卡| 一区二区三区四区在线| 国内精品久久久久久影视8| 欧美顶级艳妇交换群宴| 国产精品99免视看9| 久久久久在线观看| 欧美日韩国产二区| 久久精品国产69国产精品亚洲 | 欧美在线日韩| 亚洲激情在线观看| 亚洲一区精品视频| 亚洲精品乱码久久久久久| 亚洲一级在线观看| 最新中文字幕亚洲| 欧美一区二区精品久久911| 99精品视频免费观看| 久久xxxx| 欧美在线免费一级片| 欧美日韩国产免费| 免费亚洲一区| 国产亚洲成年网址在线观看| 亚洲精品一区二区三区在线观看 | 亚洲激情社区| 欧美在线观看一区| 亚洲欧美亚洲| 欧美日韩三级| 亚洲国产精品va在线观看黑人| 欧美日一区二区在线观看| 亚洲高清在线观看一区| 影音先锋中文字幕一区| 香蕉国产精品偷在线观看不卡| 亚洲开发第一视频在线播放| 久久久久久久一区二区三区| 欧美在线视频a| 国产精品亚洲а∨天堂免在线| 亚洲精品美女在线| 日韩视频一区二区三区| 蜜臀av在线播放一区二区三区| 久久在线免费| 一区二区亚洲精品| 欧美中文字幕视频在线观看| 亚洲免费在线观看| 欧美三级日本三级少妇99| 夜夜嗨av一区二区三区免费区| 亚洲欧美日韩高清| 亚洲自拍都市欧美小说| 欧美日韩一区二区在线观看| 亚洲高清免费在线| 欧美xxx成人| 亚洲第一二三四五区| 久久精品国语| 久久亚洲精品一区二区| 一色屋精品视频在线看| 久久精品国产77777蜜臀| 久久免费视频在线| 一区二区视频在线观看| 美腿丝袜亚洲色图| 91久久精品国产91久久性色| 99re6这里只有精品| 欧美日韩一区二区在线观看| 中文亚洲免费| 久久久久久久尹人综合网亚洲| 狠狠色狠狠色综合日日91app| 久久久久久久综合色一本| 老牛影视一区二区三区| 亚洲国产精品一区在线观看不卡| 免费欧美网站| 夜夜嗨av一区二区三区网站四季av| 亚洲视频在线观看三级| 国产精品自拍在线| 久久国产精品免费一区| 欧美激情精品久久久| 一区二区三区高清视频在线观看| 国产精品成人一区二区三区吃奶| 性娇小13――14欧美| 欧美成人69av| 一区二区电影免费观看| 国产精品一二三| 久久看片网站| 99国产精品| 老司机久久99久久精品播放免费| 亚洲精品影视在线观看| 国产精品久久一区二区三区| 久久九九热免费视频| 亚洲人在线视频| 久久av一区二区三区| 亚洲欧洲精品一区二区| 国产精品久久二区二区| 另类国产ts人妖高潮视频| 亚洲视频电影图片偷拍一区| 久久久精品国产免大香伊| 洋洋av久久久久久久一区| 国产一区二区中文| 久久久久久97三级| 亚洲无人区一区| 亚洲第一精品久久忘忧草社区| 亚洲中午字幕| 最近中文字幕日韩精品| 国产欧美精品一区| 欧美日韩网址| 欧美成人综合网站| 先锋影音久久久| 亚洲视频在线观看视频| 亚洲激情在线观看| 久久婷婷av| 亚欧成人在线| 一区二区三区视频观看| 在线欧美日韩精品| 国产日韩1区| 欧美性开放视频| 蜜臀av一级做a爰片久久| 欧美伊人久久久久久久久影院| 亚洲欧洲一区二区天堂久久 | 久久精品国产第一区二区三区| 国产视频一区欧美| 亚洲深夜福利在线| 亚洲欧洲视频| 欧美激情91| 免播放器亚洲一区| 久久免费国产| 久久精品理论片| 欧美一级淫片aaaaaaa视频| 亚洲视频网站在线观看| 亚洲精品日日夜夜| 在线不卡免费欧美| 在线观看国产欧美| 狠狠综合久久av一区二区小说 | 欧美日韩国产小视频| 久热精品视频在线| 久久久久88色偷偷免费| 亚洲欧美在线高清| 亚洲欧美日韩在线观看a三区 | 午夜亚洲精品| 亚洲一区免费看| 亚洲精品一区二区三区不| 亚洲精品黄色| 99在线观看免费视频精品观看| 亚洲日本va午夜在线电影| 欧美激情一区二区三区四区| 欧美丰满少妇xxxbbb| 欧美黄色免费| 美女免费视频一区| 久久精品视频99| 免费视频最近日韩| 亚洲破处大片| 中文精品视频| 久久都是精品| 欧美激情第二页| 国产精品久久激情|