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

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)  編輯 收藏 引用

只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   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>
            亚洲美女网站| 亚洲欧美国产一区二区三区| 亚洲视频第一页| 亚洲精品一区二区网址| 欧美激情一二三区| 在线视频欧美一区| 国产精品入口麻豆原神| 国产精品乱码一区二区三区 | 欧美亚洲一区| 在线日本成人| 亚洲国产一区在线| 国内精品视频666| 亚洲电影一级黄| 亚洲视频你懂的| 久久精品国产清高在天天线| 亚洲免费观看高清在线观看| 夜夜嗨av一区二区三区中文字幕 | 国产精品视频一二三| 老司机午夜精品视频| 欧美 日韩 国产精品免费观看| 亚洲一区在线看| 久久黄金**| 欧美日韩国产91| 国外成人在线| 国产亚洲综合在线| 欧美视频在线播放| 国产亚洲一区二区三区在线观看 | 欧美一区二区在线| 美女主播一区| 亚洲网在线观看| 欧美成人国产va精品日本一级| 久久蜜桃香蕉精品一区二区三区| 在线一区亚洲| 久久精品视频在线免费观看| 欧美午夜宅男影院| 日韩亚洲精品视频| 亚洲精品乱码久久久久久| 国内精品免费在线观看| aa成人免费视频| 欧美大胆成人| 久久精品水蜜桃av综合天堂| 国产精品视频观看| 亚洲一区二区成人| 亚洲精选视频免费看| 久久狠狠亚洲综合| 一区二区三区四区五区精品视频| 日韩午夜剧场| 欧美激情按摩在线| 亚洲国产第一页| 欧美福利视频| 欧美成人精品在线| 亚洲黄色高清| 亚洲第一二三四五区| 欧美一区二区在线免费观看| 午夜在线精品偷拍| 国产精品theporn| 中文av一区特黄| 日韩视频专区| 国产精品www994| 亚洲直播在线一区| 亚洲视频一二| 国产日本欧洲亚洲| 久久久久久成人| 久久国产一区二区三区| 黄色成人免费观看| 免费成人黄色av| 欧美大秀在线观看| 一本色道久久综合精品竹菊| 久久九九精品99国产精品| 亚洲一区二区在线免费观看| 国产精品外国| 久久深夜福利| 欧美成人国产一区二区| 一本大道久久a久久综合婷婷| 香蕉乱码成人久久天堂爱免费| 久久久精品一区| 欧美在线综合视频| 亚洲国产一区二区精品专区| 亚洲国产精品一区二区久| 欧美美女bb生活片| 午夜精彩视频在线观看不卡| 午夜精品久久久久久久99樱桃| 欧美激情影音先锋| 亚洲视频一区在线| 欧美一级片久久久久久久| 精品福利电影| 亚洲三级影院| 国产亚洲欧美另类中文| 亚洲一区二区在线| 午夜精品av| 亚洲精选视频在线| 欧美一级艳片视频免费观看| 亚洲国产一区在线| 亚洲一区美女视频在线观看免费| 欧美久久久久久| 国产一区二区三区无遮挡| 亚洲激情在线观看| 在线亚洲一区观看| 亚洲高清久久| 亚洲色在线视频| 欲香欲色天天天综合和网| 99视频在线精品国自产拍免费观看| 久久免费视频在线观看| 99视频精品| 久久视频国产精品免费视频在线| 国产午夜精品麻豆| 亚洲精品国精品久久99热一| 国产欧美精品va在线观看| 亚洲欧美日韩人成在线播放| 久久久久网址| 久久精品中文| 国产精品免费一区二区三区观看| 亚洲一区日韩| 美女精品视频一区| 久久成人精品视频| 国产精品毛片a∨一区二区三区|国| 亚洲在线观看视频| 免费成人av在线看| 美女日韩欧美| 欧美成人a视频| 老牛国产精品一区的观看方式| 久久激情网站| 午夜影院日韩| 欧美在线观看日本一区| 国产综合香蕉五月婷在线| 欧美一区二区三区在线播放| 欧美激情精品久久久久久| 女同一区二区| 尤物精品国产第一福利三区| 欧美一区二区视频在线观看| 午夜亚洲一区| 国产乱理伦片在线观看夜一区| 久久精品五月| 国产精品三上| 午夜精品一区二区三区电影天堂| 国产亚洲在线观看| 午夜亚洲激情| 久久久久久久网| 精品999在线播放| 另类成人小视频在线| 免费亚洲婷婷| 亚洲免费大片| 国产精品久久久久一区二区三区共 | 国产精品三级视频| 亚洲天堂成人在线视频| 亚洲欧美视频在线观看视频| 国产精品嫩草影院一区二区| 亚洲在线观看视频| 久久久久在线观看| 亚洲国产美女久久久久| 欧美国产一区在线| 久久精品中文| 在线日韩中文字幕| 在线一区日本视频| 欧美制服丝袜第一页| 国模一区二区三区| 欧美国产精品va在线观看| 日韩网站在线| 亚洲人www| 国产精品性做久久久久久| 亚洲欧美久久久| 亚洲精品乱码久久久久久蜜桃麻豆 | 欧美三级视频在线播放| 一区二区日韩| 久久精品国产欧美亚洲人人爽| 欧美激情一区二区三区蜜桃视频| 欧美一区二区三区成人| 国产欧美一区视频| 噜噜噜91成人网| 夜夜嗨av色一区二区不卡| 亚洲国产日韩欧美| 国产精品扒开腿做爽爽爽软件| 亚洲高清一二三区| 亚洲欧美中文另类| 91久久久久久久久| 国产精品日韩在线| 免费黄网站欧美| 亚洲综合激情| 91久久夜色精品国产网站| 久久国产精品色婷婷| 一本久道综合久久精品| 狠狠久久亚洲欧美| 国产精品久久毛片a| 免费在线看成人av| 午夜精品久久久久久久| 亚洲精品一区二区三区蜜桃久| 亚洲靠逼com| 国产一区二区三区在线观看免费视频| 一区二区91| 欧美电影资源| 久久精品人人| 性欧美xxxx大乳国产app| 99在线热播精品免费| 亚洲成人自拍视频| 国产一区视频观看| 国产精品捆绑调教| 欧美日韩亚洲视频| 国产精品99久久久久久久久久久久| 一区二区欧美激情| 亚洲电影在线免费观看|