{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\"text/css\"\u003e\nh1,h2,h3,h4,h5,h6{margin-bottom:0;}div.textBG p{margin: 0 0 0.0001pt;}\u003c/style\u003e\n\u003ccenter\u003e\n\t\u003cp\u003e\n\t\t\u003cbr /\u003e\n\t\t\u0026nbsp;\u003c/p\u003e\n\t\u003ctable bgcolor\u003d\"#0060F0\"\u003e\n\t\t\u003ctbody\u003e\n\t\t\t\u003ctr\u003e\n\t\t\t\t\u003ctd\u003e\n\t\t\t\t\t\u003ch1\u003e\n\t\t\t\t\t\t\u003cspan style\u003d\"background-color: rgb(255, 255, 255);\"\u003eThe Mine\u003c/span\u003e\u003cb\u003e\u003cfont color\u003d\"#C0FFFF\" size\u003d\"5\"\u003e\u0026nbsp;\u0026nbsp;\u003c/font\u003e\u003c/b\u003e\u003c/h1\u003e\n\t\t\t\t\u003c/td\u003e\n\t\t\t\u003c/tr\u003e\n\t\t\u003c/tbody\u003e\n\t\u003c/table\u003e\n\u003c/center\u003e\n\u003cp\u003e\n\tGeoSurvComp地质调查公司负责探测地下油藏。GeoSurvComp每次只处理一个大的矩形区域,并创建一个网格,将土地划分成无数的方形地块。然后,它使用传感设备分别分析每个地块,以确定地块是否含有石油。\n\n含有石油的地块称为口袋。如果两个储层相邻,那么它们就是同一个油藏的一部分。石油蕴藏量很大,可能包含无数的油穴。你的工作是确定在一个网格中有多少不同的石油储藏。.\u003c/p\u003e\n\u003cp\u003e\n\t\u0026nbsp;\u003c/p\u003e\n\u003ch2\u003e\n\t\u003cfont color\u003d\"#0070E8\"\u003e\u003ca href\u003d\"\" name\u003d\"SECTION0001001000000000000000\"\u003e Input\u003c/a\u003e\u0026nbsp;\u003c/font\u003e\u003c/h2\u003e\n\u003cp\u003e\n\t输入文件包含一个或多个网格。每个网格以包含m和n的行开始,这是网格中的行数和列数,用一个空格分隔。如果m \u003d 0,则表示输入结束。接下来是m行,每行n个字符(不包括行尾字符)。每个字符对应一个情节,“*”代表没有石油,“@”代表有石油的口袋。\u003c/p\u003e\n\u003cp\u003e\n\t\u0026nbsp;\u003c/p\u003e\n\u003ch2\u003e\n\t\u003cfont color\u003d\"#0070E8\"\u003e\u003ca href\u003d\"\" name\u003d\"SECTION0001002000000000000000\"\u003e Output\u003c/a\u003e\u0026nbsp;\u003c/font\u003e\u003c/h2\u003e\n\u003cp\u003e\n\t对于每个网格,输出不同的石油储量的数量。如果两个不同的袋体在水平、垂直或对角线上相邻,则它们是同一油藏的一部分。一个石油矿床将不超过100个油袋。\u003c/p\u003e\n\u003cp\u003e\n\t\u0026nbsp;\u003c/p\u003e\n\u003ch2\u003e\n\t\u003cfont color\u003d\"#0070E8\"\u003e\u003ca href\u003d\"\" name\u003d\"SECTION0001003000000000000000\"\u003e Sample Input\u003c/a\u003e\u0026nbsp;\u003c/font\u003e\u003c/h2\u003e\n\u003cpre\u003e\n1 1\n*\n3 5\n*@*@*\n**@**\n*@*@*\n1 8\n@@****@*\n5 5\n****@\n*@@*@\n*@**@\n@@@*@\n@@**@\n0 0\n\u003c/pre\u003e\n\u003cp\u003e\n\t\u0026nbsp;\u003c/p\u003e\n\u003ch2\u003e\n\t\u003cfont color\u003d\"#0070E8\"\u003e\u003ca href\u003d\"\" name\u003d\"SECTION0001004000000000000000\"\u003e Sample Output\u003c/a\u003e\u0026nbsp;\u003c/font\u003e\u003c/h2\u003e\n\u003cpre\u003e\n0\n1\n2\n2\n\u003c/pre\u003e\n\u003cp\u003e\n\t\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\n\t\u0026nbsp;\u003c/p\u003e\n\u003chr /\u003e\n\u003caddress\u003e\n\t\u003ci\u003eMiguel A. Revilla\u003c/i\u003e\u003cbr /\u003e\n\t\u003ci\u003e1998-03-10\u003c/i\u003e\u003c/address\u003e\n\u003clink href\u003d\"http://uva.onlinejudge.org/external/5/htmlatex.css\" rel\u003d\"STYLESHEET\" /\u003e"}}]}