{"id":174,"date":"2008-03-02T13:49:48","date_gmt":"2008-03-02T05:49:48","guid":{"rendered":"http:\/\/sinya.yo2.cn\/usaco-castle.html"},"modified":"2008-03-02T13:49:48","modified_gmt":"2008-03-02T05:49:48","slug":"usaco-castle","status":"publish","type":"post","link":"https:\/\/sinyalee.com\/blog\/?p=174","title":{"rendered":"[USACO\u89e3\u9898\u62a5\u544a]The Castle (castle)"},"content":{"rendered":"<p>\u7b2c\u4e00\u6b21\u5199\u89e3\u9898\u62a5\u544a\u3002\u597d\u591aUSACO\u7684\u7a0b\u5e8f\u5199\u5b8c\u540e\u90fd\u653e\u5728\u5b66\u6821\u4e86\uff0c\u6ca1\u62ff\u56de\u6765\uff0c\u6240\u4ee5\u6ca1\u80fd\u5199\u7ed3\u9898\u62a5\u544a\u3002\u521a\u624d\u505a\u4e86\u4e00\u9053\uff0c\u53ebThe Castle\uff0c\u73b0\u5728\u628a\u89e3\u9898\u62a5\u544a\u653e\u4e0a\u53bb\u3002<\/p>\n<h4><span style=\"color: #008040;\">\u539f\u9898\uff1a<\/span><\/h4>\n<p><span style=\"color: #008040;\"><strong>The Castle<\/strong><br \/>\n<strong>IOI&#8217;94 &#8211; Day 1<\/strong><\/span><\/p>\n<p><span style=\"color: #008040;\">In a stroke of luck almost beyond imagination, Farmer John was sent a ticket to the Irish Sweepstakes (really a lottery) for his birthday. This ticket turned out to have only the winning number for the lottery! Farmer John won a fabulous castle in the Irish countryside. <\/span><\/p>\n<p><span style=\"color: #008040;\">Bragging rights being what they are in Wisconsin, Farmer John wished to tell his cows all about the castle. He wanted to know how many rooms it has and how big the largest room was. In fact, he wants to take out a single wall to make an even bigger room. <\/span><\/p>\n<p><span style=\"color: #008040;\">Your task is to help Farmer John know the exact room count and sizes. <\/span><\/p>\n<p><span style=\"color: #008040;\">The castle floorplan is divided into M (wide) by N (1 &lt;=M,N&lt;=50) square modules. Each such module can have between zero and four walls. Castles always have walls on their &#8220;outer edges&#8221; to keep out the wind and rain. <\/span><\/p>\n<p><span style=\"color: #008040;\">Consider this annotated floorplan of a castle: <\/span><\/p>\n<pre><span style=\"color: #008040;\">     1   2   3   4   5   6   7\n   #############################\n 1 #   |   #   |   #   |   |   #\n   #####---#####---#---#####---#\n 2 #   #   |   #   #   #   #   #\n   #---#####---#####---#####---#\n 3 #   |   |   #   #   #   #   #\n   #---#########---#####---#---#\n 4 # -&gt;#   |   |   |   |   #   #\n   ############################# <\/span><span style=\"color: #008040;\">\n<\/span><span style=\"color: #008040;\">#  = Wall     -,|  = No wall\n-&gt; = Points to the wall to remove to\n     make the largest possible new room\n<\/span><\/pre>\n<p><span style=\"color: #008040;\">By way of example, this castle sits on a 7 x 4 base. A &#8220;room&#8221; includes any set of connected &#8220;squares&#8221; in the floor plan. This floorplan contains five rooms (whose sizes are 9, 7, 3, 1, and 8 in no particular order). <\/span><\/p>\n<p><span style=\"color: #008040;\">Removing the wall marked by the arrow merges a pair of rooms to make the largest possible room that can be made by removing a single wall. <\/span><\/p>\n<p><span style=\"color: #008040;\">The castle always has at least two rooms and always has a wall that can be removed. <\/span><\/p>\n<h5><span style=\"color: #008040;\">PROGRAM NAME: castle<\/span><\/h5>\n<h5><span style=\"color: #008040;\">INPUT FORMAT<\/span><\/h5>\n<p><span style=\"color: #008040;\">The map is stored in the form of numbers, one number for each module, M numbers on each of N lines to describe the floorplan. The input order corresponds to the numbering in the example diagram above. <\/span><\/p>\n<p><span style=\"color: #008040;\">Each module number tells how many of the four walls exist and is the sum of up to four integers: <\/span><\/p>\n<ul>\n<li><span style=\"color: #008040;\">1: wall to the west <\/span><\/li>\n<li><span style=\"color: #008040;\">2: wall to the north <\/span><\/li>\n<li><span style=\"color: #008040;\">4: wall to the east <\/span><\/li>\n<li><span style=\"color: #008040;\">8: wall to the south <\/span><\/li>\n<\/ul>\n<p><span style=\"color: #008040;\">Inner walls are defined twice; a wall to the south in module 1,1 is also indicated as a wall to the north in module 2,1. <\/span><\/p>\n<p><span style=\"color: #008040;\">Line 1:<\/span><\/p>\n<p><span style=\"color: #008040;\">Two space-separated integers: M and N<\/span><\/p>\n<p><span style=\"color: #008040;\">Line 2..:<\/span><\/p>\n<p><span style=\"color: #008040;\">M x N integers, several per line. <\/span><\/p>\n<h5><span style=\"color: #008040;\">SAMPLE INPUT (file castle.in) <\/span><\/h5>\n<pre><span style=\"color: #008040;\">7 4\n\n11 6 11 6 3 10 6\n7 9 6 13 5 15 5\n1 10 12 7 13 7 5\n13 11 10 8 10 12 13\n\n<\/span><\/pre>\n<h5><span style=\"color: #008040;\">OUTPUT FORMAT<\/span><\/h5>\n<p><span style=\"color: #008040;\">The output contains several lines: <\/span><\/p>\n<p><span style=\"color: #008040;\">Line 1:<\/span><\/p>\n<p><span style=\"color: #008040;\">The number of rooms the castle has. <\/span><\/p>\n<p><span style=\"color: #008040;\">Line 2:<\/span><\/p>\n<p><span style=\"color: #008040;\">The size of the largest room<\/span><\/p>\n<p><span style=\"color: #008040;\">Line 3:<\/span><\/p>\n<p><span style=\"color: #008040;\">The size of the largest room creatable by removing one wall <\/span><\/p>\n<p><span style=\"color: #008040;\">Line 4:<\/span><\/p>\n<p><span style=\"color: #008040;\">The single wall to remove to make the largest room possible<\/span><\/p>\n<p><span style=\"color: #008040;\">Choose the optimal wall to remove from the set of optimal walls by choosing the wall farthest to the west (and then, if still tied, farthest to the south). Name that wall by naming the module that borders it on either the west or south, along with a direction of N or E giving the location of the wall with respect to the module. <\/span><\/p>\n<h5><span style=\"color: #008040;\">SAMPLE OUTPUT (file castle.out)<\/span><\/h5>\n<pre><span style=\"color: #008040;\">5\n\n9\n\n16\n\n4 1 E<\/span><\/pre>\n<h4><span style=\"color: #0000ff;\">\u6211\u7684\u975e\u6b63\u5f0f\u7684USACO\u9898\u76ee\u7ffb\u8bd1\uff0c\u7ffb\u8bd1\u5f97\u4e0d\u597d\uff0c\u6b22\u8fce\u5927\u5bb6\u6307\u6b63\u3002<\/span><\/h4>\n<p><span style=\"color: #0000ff;\"><strong>\u57ce\u5821<\/strong><\/span><\/p>\n<p><span style=\"color: #0000ff;\"><strong>IOI&#8217;94 &#8211; Day 1<\/strong> <\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u4ee5\u6211\u4eec\u61a8\u539a\u7684USACO\u4e3b\u4eba\u516c\u519c\u592b\u7ea6\u7ff0(Farmer John) \u65e0\u6cd5\u60f3\u8c61\u7684\u8fd0\u6c14, \u6211\u4eec\u7684\u519c\u592b\u7ea6\u7ff0\u5728\u4ed6\u751f\u65e5\u90a3\u5929\u6536\u5230\u4e86\u4e00\u4efd\u7279\u522b\u7684\u793c\u7269\uff1a\u4e00\u5f20\u201c\u5e78\u8fd0\u7231\u5c14\u5170\u201d\uff08\u4e00\u79cd\u5f69\u7968\uff09\u3002\u7ed3\u679c\u8fd9\u5f20\u5f69\u7968\u8ba9\u6211\u4eec\u7684\u519c\u592b\u7ea6\u7ff0\u83b7\u5f97\u4e86\u8fd9\u6b21\u6bd4\u8d5b\u552f\u4e00\u7684\u5956\u54c1\u2014\u2014\u5750\u843d\u4e8e\u7231\u5c14\u5170\u90ca\u5916\u7684\u4e00\u5ea7\u68a6\u5e7b\u822c\u7684\u57ce\u5821\uff01 <\/span><span style=\"color: #8000ff;\">\uff08Sinya\uff1a\u771f\u662f\u50bb\u4eba\u6709\u50bb\u798f\u554a\u2026\u2026\u7136\u540e\u4ed6\u5e94\u8be5\u5c31\u5728\u7231\u5c14\u5170\u517b\u725b\u5427\u2026\u2026\u7136\u540e\u8fd8\u4ea7\u751f\u4e86\u90a3\u4e48\u591a\u5173\u4e8e\u5976\u725b\u548c\u725b\u5976\u7684\u6570\u5b66\u95ee\u9898\u2026\u2026\uff09<\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u559c\u6b22HP\u7684\u519c\u592b\u7ea6\u7ff0\u7acb\u523b\u56de\u5230\u6709\u7740HP\u4f20\u7edf\u7684\u5a01\u65af\u5eb7\u8f9b\u8001\u5bb6\u5f00\u59cbHP\u4e86<span style=\"color: #8000ff;\">\uff08Sinya\uff1a\u5173\u4e8eHP\u662f\u4ec0\u4e48\u89c1\u65e7\u6587<a title=\"\u65e7\u6587\uff1a\u65b0\u7535\u8111\uff08\u56fe\uff09\" href=\"http:\/\/sinya.yo2.cn\/hp-computer.html\">\u65b0\u7535\u8111\uff08\u56fe\uff09<\/a>\uff09<\/span>, \u519c\u592b\u7ea6\u7ff0\u60f3\u8981\u544a\u8bc9\u4ed6\u7684\u5976\u725b\u4eec\u5173\u4e8e\u4ed6\u7684\u57ce\u5821\u7684\u4e00\u5207<span style=\"color: #8000ff;\">\uff08Sinya\uff1a\u53c8\u5173\u5976\u725b\u4ec0\u4e48\u4e8b\u2026\u2026\uff09<\/span>\u3002\u4ed6\u9700\u8981\u505a\u4e00\u4e9bHP\u7684\u51c6\u5907\u5de5\u4f5c\uff1a\u6bd4\u5982\u8bf4\u77e5\u9053\u57ce\u5821\u6709\u591a\u5c11\u4e2a\u623f\u95f4\uff0c\u6bcf\u4e2a\u623f\u95f4\u6709\u591a\u5927\u3002\u800c\u4e14\u519c\u592b\u7ea6\u7ff0\u60f3\u8981\u628a\u4e00\u4e2a\u5355\u72ec\u7684\u5899<span style=\"color: #8000ff;\">\uff08Sinya\uff1a\u6307\u4e24\u4e2a\u5355\u4f4d\u95f4\u7684\u5899\uff09<\/span>\u7ed9\u62c6\u6389\u4ee5\u83b7\u5f97\u4e00\u4e2a\u66f4\u5927\u7684\u623f\u95f4<\/span><span style=\"color: #8000ff;\">\uff08Sinya\uff1a\u4e2a\u4eba\u89c9\u5f97\u8fd8\u662f\u5c0f\u623f\u95f4\u8212\u9002\u3002\u66f4\u80fd\u4fdd\u62a4\u9690\u79c1\u2026\u2026\u5f53\u7136\u6709\u4e2a\u5927\u623f\u95f4\u53ef\u4ee5HP\u2026\u2026\uff09<\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u4f60\u7684\u5de5\u4f5c\u5c31\u662f\u5e2e\u519c\u592b\u7ea6\u7ff0\u505aHP\u7684\u51c6\u5907\uff0c\u7b97\u51fa\u623f\u95f4\u6570\u4e0e\u623f\u95f4\u7684\u5927\u5c0f\u3002 <\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u57ce\u5821\u7684\u5e73\u9762\u56fe\u88ab\u5212\u5206\u6210M*N<strong>\uff08M\u662f\u5bbd\u5ea6\uff09<\/strong>\u4e2a\u6b63\u65b9\u5f62\u7684\u5355\u4f4d\uff0c\u4e00\u4e2a\u8fd9\u6837\u7684\u5355\u4f4d\u53ef\u4ee5\u67090\u52304\u9762\u5899\u73af\u7ed5\u3002\u57ce\u5821\u5468\u56f4\u4e00\u5b9a\u6709\u5916\u5899\u73af\u7ed5\u4ee5\u906e\u98ce\u6321\u96e8\u3002<span style=\"color: #8000ff;\">\uff08Sinya\uff1a\u5c31\u662f\u8bf4\u5e73\u9762\u56fe\u7684\u56db\u5468\u4e00\u5b9a\u662f\u5899\u3002\u54a6\uff0c\u96be\u9053\u662f\u8bf4\u6211\u4eec\u4e2d\u56fd\u4f1f\u5927\u7684\u9632\u706b\u5899\uff1f\uff01\u96be\u9053\u6211\u4eec\u7684\u5973\u53cbW\u662f\u4e00\u4e2a\u57ce\u5821\uff1f\uff01\uff09<\/span><\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u8bf7\u4ed4\u7ec6\u7814\u7a76\u4e0b\u9762\u8fd9\u4e2a\u6709\u6ce8\u89e3\u7684\u57ce\u5821\u5e73\u9762\u56fe\uff1a<\/span><\/p>\n<pre><span style=\"color: #0000ff;\">     1   2   3   4   5   6   7\n   #############################\n 1 #   |   #   |   #   |   |   #\n   #####---#####---#---#####---#\n 2 #   #   |   #   #   #   #   #\n   #---#####---#####---#####---#\n 3 #   |   |   #   #   #   #   #\n   #---#########---#####---#---#\n 4 # -&gt;#   |   |   |   |   #   #\n   ############################# <\/span><span style=\"color: #0000ff;\">\n<\/span><span style=\"color: #0000ff;\">#  = \u5899     -,|  = \u6ca1\u6709\u5899\n-&gt; = \u6307\u5411\u4e00\u9762\u5899\uff0c\u8fd9\u9762\u5899\u63a8\u6389\u7684\u8bdd\u6211\u4eec\u5c31\u6709\u4e00\u95f4\u6700\u5927\u7684\u65b0\u623f\u95f4\n<\/span><\/pre>\n<p><span style=\"color: #0000ff;\">\u53cb\u60c5\u63d0\u793a\uff0c\u8fd9\u4e2a\u57ce\u5821\u7684\u5e73\u9762\u56fe\u662f7\u00d74\u4e2a\u5355\u4f4d\u7684\u3002\u4e00\u4e2a\u201c\u623f\u95f4\u201d\u6307\u7684\u662f\u5e73\u9762\u56fe\u4e2d\u4e00\u4e2a\u8fde\u901a\u7684\u201c\u6b63\u65b9\u5f62\u5355\u4f4d\u201d\u7684\u96c6\u5408\u3002\u6bd4\u5982\u8bf4\u8fd9\u4e2a\u6837\u4f8b\u5c31\u67095\u4e2a\u623f\u95f4\u3002\uff08\u5927\u5c0f\u5206\u522b\u4e3a9\u30017\u30013\u30011\u30018\u4e2a\u5355\u4f4d\uff08\u6392\u540d\u4e0d\u5206\u5148\u540e\uff09\uff09 <\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u79fb\u53bb\u7bad\u5934\u6240\u6307\u7684\u90a3\u9762\u5899\uff0c\u53ef\u4ee5\u4f7f2\u4e2a\u623f\u95f4\u5408\u4e3a\u4e00\u4e2a\u201c\u79fb\u6389\u4e00\u9762\u5355\u72ec\u7684\u5899\u53ef\u4ee5\u5f62\u6210\u7684\u6700\u5927\u7684\u65b0\u623f\u95f4\u201d\u3002<\/span><span style=\"color: #8000ff;\">\uff08Sinya\uff1a\u7ffb\u8bd1\u8fd9\u53e5\u8bdd\u540e\u6211\u6709\u7406\u7531\u76f8\u4fe1\u82f1\u8bed\u6bd4\u666e\u901a\u8bdd\u79d1\u5b66\u3002\u539f\u6587\u8fdc\u6bd4\u8bd1\u6587\u5bb9\u6613\u7406\u89e3\u3002\u539f\u6587\u4e3a\uff1aRemoving the wall marked by the arrow merges a pair of rooms to make the largest possible room that can be made by removing a single wall. \uff09<\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u6211\u4eec\u5f88\u4eba\u9053\u7684USACO\u5411\u6211\u4eec\u4fdd\u8bc1\u57ce\u5821\u81f3\u5c11\u67092\u4e2a\u623f\u95f4\uff0c\u800c\u4e14\u4e00\u5b9a\u6709\u4e00\u9762\u5899\u53ef\u4ee5\u88ab\u79fb\u8d70\u3002 <\/span><\/p>\n<h5><span style=\"color: #0000ff;\">\u7a0b\u5e8f\u540d<span style=\"color: #8000ff;\">\uff08Sinya\uff1a\u5c31\u662f\u63d0\u4ea4\u7a0b\u5e8f\u5199\u5728\u62ac\u5934\u5904\u7684\uff09<\/span>: castle<\/span><\/h5>\n<h5><span style=\"color: #0000ff;\">\u8f93\u5165\u683c\u5f0f<\/span><\/h5>\n<p><span style=\"color: #0000ff;\">\u57ce\u5821\u7684\u5e73\u9762\u56fe\u7528\u4e00\u4e2a\u7531\u6570\u5b57\u7ec4\u6210\u7684\u77e9\u9635\u8868\u793a\uff0c\u4e00\u4e2a\u6570\u5b57\u8868\u793a\u4e00\u4e2a\u5355\u4f4d\uff0c\u77e9\u9635\u6709N\u884cM\u5217\u3002\u8f93\u5165\u4e0e\u6837\u4f8b\u7684\u56fe\u4e00\u81f4\u3002 <\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u6bcf\u4e00\u4e2a\u5355\u4f4d\u7684\u6570\u5b57\u544a\u8bc9\u6211\u4eec\u8fd9\u4e2a\u5355\u4f4d\u7684\u4e1c\u897f\u5357\u5317\u662f\u5426\u6709\u5899\u5b58\u5728\u3002\u6bcf\u4e2a\u6570\u5b57\u662f\u7531\u4ee5\u4e0b\u56db\u4e2a\u6574\u6570\u7684\u67d0\u4e2a\u6216\u67d0\u51e0\u4e2a\u6216\u4e00\u4e2a\u90fd\u6ca1\u6709\u52a0\u8d77\u6765\u7684\u3002<\/span><\/p>\n<ul>\n<li><span style=\"color: #0000ff;\">1: \u8fd9\u4e2a\u5355\u4f4d\u7684\u897f\u8fb9\u6709\u5899<\/span><\/li>\n<li><span style=\"color: #0000ff;\">2: \u8fd9\u4e2a\u5355\u4f4d\u7684\u5317\u8fb9\u6709\u5899<\/span><\/li>\n<li><span style=\"color: #0000ff;\">4: \u8fd9\u4e2a\u5355\u4f4d\u7684\u4e1c\u8fb9\u6709\u5899<\/span><\/li>\n<li><span style=\"color: #0000ff;\">8: \u8fd9\u4e2a\u5355\u4f4d\u7684\u5357\u8fb9\u6709\u5899<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #0000ff;\">\u57ce\u5821\u5185\u90e8\u7684\u5899\u4f1a\u88ab\u89c4\u5b9a\u4e24\u6b21\u3002\u6bd4\u5982\u8bf4\uff081\uff0c1\uff09\u5357\u9762\u7684\u5899\uff0c\u4ea6\u4f1a\u88ab\u6807\u8bb0\u4e3a\uff082\uff0c1\uff09\u5317\u9762\u7684\u5899\u3002 <\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u7b2c\u4e00\u884c:\u4e24\u4e2a\u7531\u7a7a\u683c\u5206\u9694\u7684\u6574\u6570\uff1a M \u8fd8\u6709 N <\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u7b2c\u4e8c\u884c:M*N\u4e2a\u6574\u6570\uff0c\u4e00\u884c\u6709M\u4e2a <\/span><\/p>\n<h5><span style=\"color: #0000ff;\">\u6837\u4f8b\u8f93\u5165 (\u8f93\u5165\u6587\u4ef6 castle.in) <\/span><\/h5>\n<pre><span style=\"color: #0000ff;\">7 4\n\n11 6 11 6 3 10 6\n7 9 6 13 5 15 5\n1 10 12 7 13 7 5\n13 11 10 8 10 12 13\n\n<\/span><\/pre>\n<h5><span style=\"color: #0000ff;\">\u8f93\u51fa\u683c\u5f0f<\/span><\/h5>\n<p><span style=\"color: #0000ff;\">\u8f93\u51fa\u6587\u4ef6\u6709\u4ee5\u4e0b\u6570\u884c: <\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u7b2c1\u884c:\u57ce\u5821\u62e5\u6709\u7684\u623f\u95f4\u6570 <\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u7b2c2\u884c:\u6700\u5927\u7684\u623f\u95f4\u7684\u5927\u5c0f<\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u7b2c3\u884c:<br \/>\n\u201c\u63a8\u5012 \u201d<span style=\"color: #8000ff;\">\uff08Sinya\uff1a\u4e0d\u8981\u60f3\u6b6a\u4e86\uff09<\/span>\u4e00\u9762\u5899\u53ef\u4ee5\u521b\u9020\u51fa\u6765\u7684\u6700\u5927\u7684\u623f\u95f4\u7684\u5927\u5c0f\u3002<\/span><\/p>\n<p><span style=\"color: #0000ff;\">\u7b2c4\u884c:\u8981\u9020\u51fa\u7b2c\u4e09\u884c\u90a3\u4e48\u5927\u7684\u5927\u623f\u95f4\u6240\u8981<strong>\u63a8\u5012<\/strong>\u7684\u4e00\u9762\u5899\u3002<\/span><\/p>\n<p><span style=\"color: #0000ff;\"><span style=\"color: #0000ff;\">\u9009\u62e9\u6700\u4f73\u7684\u5899\u6765<strong>\u63a8\u5012<\/strong>\u3002\u6709\u591a\u89e3\u65f6\u9009\u6700\u897f\u8fb9\u7684\uff08\u8fd8\u662f\u6709\u591a\u89e3\u65f6\u9009\u6700\u5357\u7684\uff09\u3002\u7528\u8fd9\u9762\u5899\u5357\u8fb9\u6216\u897f\u8fb9\u7684\u5355\u4f4d\uff0c\u8fd8\u6709\u8fd9\u9762\u5899\u5728\u90a3\u4e2a\u5355\u4f4d\u7684\u65b9\u4f4d\uff08&#8221;N&#8221;\uff08\u5317\uff09\u6216\u8005&#8221;E&#8221;\uff08\u4e1c\uff09\uff09\u6765\u8868\u793a\u8fd9\u9762\u5899\u3002<\/span><\/span><\/p>\n<h5><span style=\"color: #0000ff;\">\u6837\u4f8b\u8f93\u51fa (\u8f93\u51fa\u6587\u4ef6 castle.out)<\/span><\/h5>\n<pre><span style=\"color: #0000ff;\">5\n\n9\n\n16\n\n4 1 E<\/span><\/pre>\n<pre>\u7ffb\u8bd1\u7ffb\u8bd1\u4e86\u597d\u4e45\uff0c\u4e00\u5b9a\u8981\u628a\u8fd9\u7bc7\u6587\u7ae0\u6807\u8bb0\u4e3a\u539f\u521b\u7cbe\u54c1\uff0c\u4e0d\u7136\u5c31\u592a\u5bf9\u4e0d\u8d77\u81ea\u5df1\u4e86\u3002<\/pre>\n<h4>\u6211\u7684\u89e3\u9898\u601d\u8def<\/h4>\n<p>\u8fd9\u9053\u9898\u5f88\u7b80\u5355\uff0c\u5c31\u662f\u8c03\u7528\u4e24\u6b21USACO\u6240\u8c13\u7684flood fill\uff0c\u5e94\u8be5\u5c31\u662f\u6211\u4eec\u7684\u56fe\u7684\u904d\u5386\u3002\u95ee\u9898\u4e00\u5206\u4e3a\u4e8c\uff0c\u9996\u5148\u662f\u904d\u5386\u51fa\u623f\u95f4\u4e2a\u6570\u4e0e\u6bcf\u4e2a\u623f\u95f4\u7684\u5927\u5c0f\u4e0e\u6bcf\u4e2a\u5355\u5143\u683c\u5c5e\u4e8e\u54ea\u4e2a\u623f\u95f4\u3002\u4fbf\u89e3\u51b3\u4e86\u4e00\u3001\u4e8c\u884c\u7684\u8f93\u51fa\u3002<\/p>\n<p>\u8fd9\u90e8\u5206\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO(nm).<\/p>\n<p>\u7136\u540e\u4e24\u5c42for\u8bed\u53e5\u4fbf\u53ef\u4ee5\u627e\u51fa\u8981\u62c6\u9664\u7684\u5899\u3002<\/p>\n<p>\u8fd9\u90e8\u5206\u65f6\u95f4\u590d\u6742\u5ea6\u4e5f\u662fO(nm).<\/p>\n<p>\u8f93\u5165\u7684\u5904\u7406\u65b9\u6cd5: \u628a\u6bcf\u4e2a\u5355\u5143\u683c\u7684\u6570\u5b57\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236,\u82e5\u4e2a\u4f4d\u4e3a1\u5219\u897f\u9762\u6709\u5899,2\u4f4d\u4e3a1\u5219\u5317\u9762\u6709\u5899,\u4f9d\u6b64\u7c7b\u63a8<\/p>\n<p>\u8be6\u89c1\u4e0b\u9762\u7684\u7a0b\u5e8f\u8fd8\u6709\u6ce8\u89e3\u3002<\/p>\n<p>{<\/p>\n<p>ID: Sinya1<\/p>\n<p>PROG: castle<\/p>\n<p>LANG: PASCAL<\/p>\n<p>}<\/p>\n<p>{WELCOME TO MY WEBSITE: HTTP:\/\/SINYA.YO2.CN\/}<\/p>\n<p>{I love my hometown, Swatow, China!!!!!}<\/p>\n<p><span style=\"color: #ffffff;\">{Anyway,I Love You, Kekyang!!!!!}<\/span><\/p>\n<p><span style=\"color: #ffffff\"> <\/span>Program castle;<\/p>\n<p>Var<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>a:array[1..50,1..50]of byte;  <span style=\"color: #993366;\">{\u8f93\u5165}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>i,j,n,m,nn,mm,h:integer;     <span style=\"color: #993366;\">{h\u4e3a\u623f\u95f4\u6570}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>l:array[1..2500]of integer;<span style=\"color: #993366;\"> {\u6bcf\u4e2a\u623f\u95f4\u7684\u5927\u5c0f}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>s:array[1..50,1..50]of integer; <span style=\"color: #993366;\">{\u6bcf\u4e2a\u5355\u5143\u683c\u5c5e\u4e8e\u54ea\u4e00\u4e2a\u623f\u95f4}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>r1,r2,r:integer;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>c:char;<\/p>\n<p>procedure tswe;              <span style=\"color: #993366;\">{\u627e\u4e00\u4e2a\u6ca1\u6709\u88ab\u904d\u5386\u5230\u7684\u70b9,\u5750\u6807\u5b58\u5728nn\u4e0emm}<\/span><\/p>\n<p>begin<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>nn:=1;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>while nn&lt;=n do begin<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>mm:=1;<\/p>\n<p><span style=\"color: #ffffff\">{<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">}<\/span>while mm&lt;=m do begin<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">}<\/span>if s[nn,mm]=0 then<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>exit;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">}<\/span>inc(mm)<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>end;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>inc(nn);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>end;<\/p>\n<p>end;<\/p>\n<p>procedure tsingsyu(x,y:integer);<span style=\"color: #993366;\"> {\u6df1\u5ea6\u4f18\u5148\u904d\u5386}<\/span><\/p>\n<p>begin<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>inc(l[h]);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>s[x,y]:=h;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>if((a[x,y]and 1)=0)and        <span style=\"color: #993366;\">{\u82e5\u5317\u9762\u65e0\u5899}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>((s[x,y-1]=0))then            <span style=\"color: #993366;\">{\u4e14\u5317\u9762\u7684\u5355\u5143\u683c\u6ca1\u88ab\u904d\u5386\u8fc7}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>tsingsyu(x,y-1);              <span style=\"color: #993366;\">{\u5bf9\u5317\u9762\u7684\u5355\u5143\u683c\u8fdb\u884c\u6df1\u641c}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>if((a[x,y]and 2)=0)and<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>((s[x-1,y]=0))then<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>tsingsyu(x-1,y);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>if((a[x,y]and 4)=0)and<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>((s[x,y+1]=0))then<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>tsingsyu(x,y+1);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>if((a[x,y]and 8)=0)and<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>((s[x+1,y]=0))then<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>tsingsyu(x+1,y);<\/p>\n<p>end;<\/p>\n<p>Begin<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>Assign(input, &#8216;castle.in&#8217;); Reset(input);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>Assign(output, &#8216;castle.out&#8217;); Rewrite(output);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>readln(m,n);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>for i:=1 to n do<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>for j:=1 to m do<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>read(a[i,j]);<\/p>\n<p><span style=\"color: #993366;\">{\u8bfb\u5165}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>fillchar(l,sizeof(l),0);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>fillchar(s,sizeof(s),0);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>h:=0;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #993366;\">{\u6e05\u7a7a}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>tswe;                      <span style=\"color: #993366;\">{\u627e\u5230\u4e00\u4e2a\u6ca1\u6709\u88ab\u904d\u5386\u5230\u7684\u70b9}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>while nn&lt;=n do begin <span style=\"color: #993366;\">{\u76f4\u5230\u6240\u6709\u70b9\u90fd\u627e\u5230\u4e3a\u6b62}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>inc(h);                    <span style=\"color: #993366;\">{\u623f\u95f4\u6570\u52a01}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>tsingsyu(nn,mm);  <span style=\"color: #993366;\">{\u6df1\u5ea6\u641c\u7d22\u90a3\u4e2a\u70b9}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>tswe;                    <span style=\"color: #993366;\">{\u518d\u627e\u4e00\u4e2a\u70b9}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>end;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>writeln(h);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #993366;\">{\u8f93\u51fa\u623f\u95f4\u6570}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>j:=0;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>for i:=1 to h do<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>if l[i]&gt;j then<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>j:=l[i];<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>writeln(j);<\/p>\n<p><span style=\"color: #993366;\">{\u8f93\u51fa\u6700\u5927\u7684\u623f\u95f4\u7684\u5927\u5c0f}<\/span><\/p>\n<p><span style=\"color: #993366;\"> {\u4e0b\u9762\u662f\u7b2c\u4e8c\u90e8\u5206\u95ee\u9898} <\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>r:=0;                                      <span style=\"color: #993366;\">{\u6700\u4f18\u89e3\u6e05\u96f6}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>for j:=1 to m do<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>for i:=n downto 1 do begin<span style=\"color: #993366;\">{\u4ece\u897f\u5f80\u4e1c,\u4ece\u5357\u5f80\u5317\u641c\u7d22}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>if(i&gt;1)                                <span style=\"color: #993366;\">{\u82e5\u4e0d\u5728\u7b2c\u4e00\u884c}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>and((a[i,j]and 2)&gt;0)         <span style=\"color: #993366;\">{\u4e14\u5317\u9762\u6709\u5899}{\u8fd9\u4e00\u884c\u4f3c\u4e4e\u53ef\u4ee5\u7701\u7565\uff0c\u82e5\u4e0b\u9762\u90a3\u4e00\u53e5\u4e3aTRUE\uff0c\u90a3\u4e48\u8fd9\u4e00\u53e5\u4e5f\u5e94\u4e3aTRUE\uff0c\u5f53\u7136\u8981\u7b2c\u4e00\u90e8\u5206\u6b63\u786e}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>and(s[i,j]&lt;&gt;s[i-1,j])          <span style=\"color: #993366;\">{\u4e14\u80cc\u9762\u7684\u5899\u4e24\u8fb9\u662f\u4e0d\u4e00\u6837\u7684\u623f\u95f4}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>and(l[s[i,j]]+l[s[i-1,j]]&gt;r)then begin<span style=\"color: #993366;\"> {\u4e14\u63a8\u6389\u8fd9\u9762\u5899\u5f62\u6210\u7684\u65b0\u623f\u95f4\u6bd4\u6700\u4f18\u89e3\u5927}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>r:=l[s[i,j]]+l[s[i-1,j]];               <span style=\"color: #993366;\">{\u8bb0\u5f55\u6700\u4f18\u89e3}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>r1:=i;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>r2:=j;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>c:=&#8217;N&#8217;;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>end;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>if(j&lt;m)<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>and((a[i,j]and 4)&gt;0)<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>and(s[i,j]&lt;&gt;s[i,j+1])<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>and(l[s[i,j]]+l[s[i,j+1]]&gt;r)then begin<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>r:=l[s[i,j]]+l[s[i,j+1]];<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>r1:=i;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>r2:=j;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>c:=&#8217;E&#8217;;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>end<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #ffffff\">{}<\/span>end;<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>writeln(r);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>writeln(r1,&#8217; &#8216;,r2,&#8217; &#8216;,c);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span><span style=\"color: #993366;\">{\u8f93\u51fa\u6700\u4f18\u89e3}<\/span><\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>Close(input);<\/p>\n<p><span style=\"color: #ffffff\">{}<\/span>Close(output);<\/p>\n<p>End.<\/p>\n<p><span style=\"color: #993366;\"><strong>\u5929\u54ea,\u539f\u6765\u5199\u89e3\u9898\u62a5\u544a\u8fd9\u4e48\u9ebb\u70e6.<\/strong><\/span><\/p>\n<h4>\u7ed3\u679c&amp;\u6d4b\u8bd5\u6570\u636e<\/h4>\n<p style=\"padding: 5px; background-color: white\">\n<pre><span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">USER: Sinya Lee [sinya1]\n\nTASK: castle\n\nLANG: PASCAL<\/span><span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">\n<\/span><span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\"><span style=\"color: red;\"><strong>NEW GRADER -- report problems!<\/strong><\/span>\n\n<span style=\"color: red;\">Java users: CPU no longer includes JAVA startup time<\/span>\n\n<span style=\"color: red;\">Java users: Some syscalls incorrectly cause failures -- please email kolstad (Comment below) if you see this<\/span><\/span>\n\n<span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">\n<\/span><span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">Compiling...\n\nCompile: OK<\/span>\n\n<span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">\n<\/span><span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">Executing...\n\n   Test 1: TEST OK [0.011 secs, 216 KB]\n\n   Test 2: TEST OK [0.000 secs, 220 KB]\n\n   Test 3: TEST OK [0.000 secs, 220 KB]\n\n   Test 4: TEST OK [0.000 secs, 216 KB]\n\n   Test 5: TEST OK [0.000 secs, 220 KB]\n\n   Test 6: TEST OK [0.000 secs, 220 KB]\n\n   Test 7: TEST OK [0.065 secs, 216 KB]\n\n   Test 8: TEST OK [0.011 secs, 220 KB]<\/span>\n\n<span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">\n<\/span><span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">All tests OK.\n\n<\/span><span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\"><strong>YOUR PROGRAM ('castle') WORKED FIRST TIME!<\/strong>  That's fantastic\n\n-- and a rare thing.  Please accept these special automated\n\ncongratulations.\n\n<\/span><\/pre>\n<p><span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">Here are the test data inputs:<\/span><\/p>\n<pre><span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">------- test 1 -------\n\n7 4\n\n11 6 11 6 3 10 6\n\n7 9 6 13 5 15 5\n\n1 10 12 7 13 7 5\n\n13 11 10 8 10 12 13\n\n------- test 2 -------\n\n2 1\n\n15 15\n\n------- test 3 -------\n\n5 5\n\n3 2 6 3 6\n\n1 8 4 1 4\n\n13 7 13 9 4\n\n3 0 2 6 5\n\n9 8 8 12 13\n\n------- test 4 -------\n\n15 14\n\n11 14 3 6 3 6 3 6 3 6 3 6 11 2 6\n\n3 10 12 9 12 9 12 9 12 9 12 9 6 1 4\n\n13 7 11 10 10 10 10 10 10 14 11 6 5 1 4\n\n11 4 3 10 10 10 10 10 10 10 6 5 13 1 4\n\n7 13 5 7 11 10 2 10 14 7 5 13 7 9 12\n\n1 14 5 1 10 14 5 11 10 4 9 6 1 10 6\n\n13 7 5 5 3 10 8 10 6 5 3 12 9 10 12\n\n11 4 5 13 5 3 10 6 5 13 5 3 10 10 6\n\n7 13 1 10 4 1 10 4 1 10 4 5 3 10 12\n\n1 14 5 7 5 9 10 12 5 7 5 5 9 10 6\n\n13 7 13 5 9 10 2 10 12 13 13 5 3 10 12\n\n7 5 15 9 10 14 5 11 14 11 14 5 9 10 6\n\n5 13 7 7 11 10 8 10 14 7 3 12 3 10 12\n\n13 15 13 13 11 10 14 11 10 12 9 10 8 10 14\n\n------- test 5 -------\n\n10 10\n\n11 10 10 14 7 3 10 2 2 6\n\n3 2 2 6 5 1 2 0 0 4\n\n1 0 0 4 5 1 0 0 0 4\n\n1 0 0 4 13 9 8 8 8 4\n\n1 0 0 4 7 11 10 10 14 13\n\n1 0 0 4 5 7 3 2 2 6\n\n1 0 0 4 5 5 1 0 0 4\n\n1 0 0 4 13 5 1 0 0 4\n\n1 0 0 4 7 5 1 0 0 4\n\n9 8 8 12 13 13 9 8 8 12\n\n------- test 6 -------\n\n32 32\n\n3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 6 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 6\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4\n\n9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 12 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 12\n\n------- test 7 -------\n\n50 50\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15\n\n------- test 8 -------\n\n50 50\n\n7 15 7 3 14 11 10 10 14 3 2 2 6 15 7 7 7 7 11 2 6 3 10 2 6 15 3 14 3 10 10 10 6 11 10 2 14 7 7 11 14 3 14 7 7 15 11 14 15 7\n\n1 14 9 0 10 14 15 7 7 13 9 8 8 2 0 12 9 0 2 4 13 1 14 5 9 6 9 14 13 7 15 7 13 3 10 0 2 4 13 15 11 4 15 13 13 11 10 10 6 5\n\n13 15 11 8 14 11 6 5 13 3 6 15 11 12 1 14 15 1 12 9 6 1 6 1 10 4 11 6 3 8 2 4 7 13 3 12 13 13 3 6 15 9 2 6 3 14 7 7 1 12\n\n7 3 14 7 3 14 5 1 2 0 4 15 11 14 13 11 2 0 14 11 12 1 0 8 6 1 2 12 5 15 5 1 8 14 13 11 2 2 4 1 6 11 12 13 1 14 9 12 5 7\n\n9 0 14 1 8 2 8 0 4 1 4 3 2 14 7 7 5 13 11 14 3 12 9 10 4 9 0 14 1 2 0 0 10 6 11 10 4 1 4 9 0 14 15 15 9 10 10 10 0 12\n\n7 9 6 13 3 12 15 9 4 5 13 1 4 15 1 8 4 3 2 2 0 6 7 15 5 15 9 2 12 1 12 5 11 4 7 7 1 8 8 6 5 11 10 6 15 15 11 14 5 7\n\n13 7 5 15 13 7 11 6 5 13 15 13 1 2 12 15 5 9 8 12 5 1 0 2 8 10 10 4 15 5 15 13 11 4 5 1 12 15 3 12 9 2 6 9 14 7 3 6 5 13\n\n11 8 0 6 15 9 2 8 12 11 6 3 12 9 2 2 4 11 6 15 9 8 4 1 14 7 15 5 15 1 6 11 2 0 8 0 14 15 5 15 7 13 5 15 15 9 8 0 12 7\n\n7 7 13 13 3 6 13 11 2 2 12 9 14 11 8 0 4 11 8 14 3 14 1 4 3 12 3 4 3 4 9 10 0 12 7 5 7 11 12 15 1 10 8 10 14 7 11 8 2 4\n\n9 8 2 2 8 8 2 14 9 4 15 7 3 6 11 8 8 6 15 15 5 7 9 4 13 7 5 5 9 0 10 10 8 10 0 8 12 7 11 10 12 15 3 10 2 0 10 6 5 13\n\n15 7 5 13 15 11 12 7 15 9 6 5 9 12 7 7 11 8 6 11 0 0 6 13 11 12 9 12 11 8 10 14 11 10 8 6 3 12 7 11 2 14 5 11 4 13 3 8 12 15\n\n15 5 1 6 3 6 15 5 3 2 0 4 11 14 9 0 14 11 0 6 5 13 5 11 6 11 10 14 11 10 14 15 15 3 6 13 13 11 4 7 1 6 1 2 0 2 12 15 11 14\n\n15 1 12 5 5 13 7 1 0 4 5 5 7 11 6 5 11 10 8 12 5 3 12 7 5 15 15 15 15 11 14 15 15 13 5 7 11 6 5 13 13 1 0 0 8 8 2 2 14 7\n\n11 12 7 1 8 6 1 12 9 4 1 12 5 11 8 4 3 2 10 14 9 0 6 13 5 15 15 15 3 2 6 3 2 2 8 4 7 9 0 6 15 5 1 4 11 6 9 0 2 12\n\n7 11 8 0 10 8 4 7 3 0 4 15 9 10 10 0 0 4 3 10 6 13 13 11 8 10 14 11 12 5 9 4 1 8 6 13 9 6 13 1 2 12 9 12 3 4 3 0 0 6\n\n1 10 14 9 10 6 1 12 9 12 5 15 7 3 10 12 5 13 5 15 5 11 2 14 7 3 10 14 7 5 7 1 12 15 13 3 14 9 10 4 1 14 7 3 12 9 12 1 12 5\n\n5 11 6 11 14 1 4 7 7 15 1 6 5 9 2 14 9 14 9 10 0 2 8 14 9 8 2 14 13 9 4 5 11 2 10 8 6 3 14 9 4 3 12 9 6 3 6 13 15 13\n\n13 15 5 11 2 12 1 12 5 15 9 8 8 10 8 14 11 14 7 11 0 12 11 10 6 11 12 7 7 7 13 9 10 4 15 7 5 13 3 14 13 1 14 11 8 0 8 6 15 7\n\n3 2 8 14 5 3 0 6 13 15 11 2 2 6 7 3 14 7 13 3 4 11 14 11 0 10 6 13 1 4 7 15 11 4 11 8 8 6 1 6 15 9 10 6 3 12 15 1 6 5\n\n1 8 10 14 9 4 1 4 3 2 6 1 8 8 4 5 15 5 15 9 0 2 6 11 12 3 4 7 1 4 9 10 2 0 6 11 14 1 12 9 6 3 2 8 8 2 2 0 4 5\n\n9 6 7 3 6 1 8 8 12 9 8 4 3 10 8 0 14 13 3 2 12 5 9 6 15 5 9 0 0 0 10 2 12 5 9 6 3 0 6 3 8 8 0 6 15 5 13 1 4 13\n\n7 9 8 4 13 9 2 2 14 3 6 1 8 2 14 13 15 15 1 8 10 0 10 12 3 12 3 0 0 12 15 9 6 1 10 0 12 13 1 4 3 2 8 0 10 0 10 0 8 14\n\n13 11 10 4 11 6 13 1 6 5 5 1 6 1 6 7 11 14 5 15 7 5 7 11 0 14 9 4 13 11 2 14 9 12 3 0 14 3 4 9 4 1 2 4 11 8 14 5 15 15\n\n11 2 6 1 2 12 3 8 4 5 1 0 8 4 13 1 2 2 0 6 1 8 12 3 4 11 6 9 6 3 8 10 2 14 1 4 15 9 4 3 4 5 5 1 10 6 7 13 15 15\n\n3 12 9 4 9 2 4 7 5 5 13 5 3 4 11 8 8 8 12 1 4 11 10 0 4 3 8 2 8 12 7 11 0 10 8 4 11 10 8 12 13 13 1 12 15 1 4 11 2 14\n\n5 3 2 4 15 5 13 13 1 8 6 13 1 0 2 14 3 2 14 5 9 6 7 5 5 5 11 0 6 7 13 3 12 11 10 4 7 11 6 11 10 10 4 15 11 0 4 15 1 14\n\n1 4 9 12 3 4 7 3 0 10 8 10 12 1 0 6 13 5 15 9 6 13 9 12 1 0 10 4 9 0 14 13 7 15 11 12 1 14 1 6 3 6 9 14 11 4 13 7 13 7\n\n13 5 15 11 0 8 12 1 0 2 2 6 11 4 9 0 6 9 10 14 13 3 6 7 5 1 6 5 11 4 11 2 8 14 3 6 13 15 1 12 1 4 11 14 7 13 7 9 10 4\n\n11 12 7 11 12 15 3 12 5 13 1 12 7 9 14 1 0 10 10 2 2 0 8 8 12 5 5 13 7 5 15 9 6 11 4 1 14 3 4 3 8 8 6 7 1 14 13 11 2 12\n\n3 10 12 3 2 2 0 10 0 2 12 3 0 10 6 9 8 10 10 0 8 12 7 11 14 1 12 3 12 5 3 2 8 14 1 8 2 8 12 1 14 11 8 12 9 6 15 11 8 6\n\n9 14 15 13 5 13 13 15 5 13 3 4 5 15 5 11 10 14 7 1 6 15 9 2 2 8 6 13 11 4 13 9 10 14 9 6 9 10 10 4 3 10 10 10 10 8 2 14 3 12\n\n15 3 14 11 0 6 15 15 13 15 9 8 0 10 4 7 11 2 8 4 13 3 10 0 12 11 0 10 2 0 2 6 3 14 11 4 3 2 14 13 13 11 14 3 6 3 8 10 4 7\n\n7 9 6 11 12 13 3 2 10 6 15 7 13 11 8 4 7 13 3 4 15 5 15 5 7 3 8 6 1 4 5 9 0 10 10 4 9 8 10 14 3 6 7 13 1 8 10 6 1 4\n\n9 14 13 3 6 7 1 4 11 8 14 1 6 11 6 9 4 3 4 5 15 9 14 1 8 4 15 9 0 0 12 7 13 7 3 12 7 15 3 6 5 13 9 14 13 11 14 9 4 5\n\n15 15 15 13 13 9 4 13 15 11 14 9 0 14 9 6 5 5 9 12 11 2 6 9 6 5 15 11 0 8 2 4 11 12 1 10 12 15 13 1 8 6 3 2 2 2 10 10 12 5\n\n3 6 15 3 10 10 12 7 3 10 2 6 1 14 15 13 5 13 15 11 2 8 8 6 13 5 15 3 8 6 13 13 11 14 9 14 7 15 11 4 7 9 4 13 9 12 3 14 15 5\n\n5 9 6 9 14 3 14 1 0 6 9 4 9 6 15 15 13 7 15 11 12 11 14 5 3 12 3 8 2 8 10 10 10 10 14 3 8 6 15 9 0 10 12 11 6 7 9 2 10 4\n\n9 2 12 15 11 8 14 1 0 4 7 13 3 0 6 11 6 9 2 10 14 15 11 4 9 2 8 14 9 6 11 6 11 2 2 0 6 13 15 15 1 2 6 3 4 9 14 13 11 4\n\n3 4 11 14 3 10 2 4 9 4 5 15 9 12 1 6 13 7 9 2 14 7 15 9 10 12 11 14 15 9 14 9 14 9 12 1 4 15 3 10 4 5 5 1 4 3 2 10 14 5\n\n9 4 11 10 4 11 12 13 15 5 1 2 10 2 12 1 10 4 11 4 15 13 11 2 10 10 2 6 7 3 14 11 2 2 6 13 5 11 12 7 9 12 9 12 13 13 9 10 10 12\n\n15 9 14 15 9 2 6 7 15 13 5 9 14 13 3 12 7 13 3 4 15 7 3 12 11 6 9 4 13 1 10 14 5 1 12 3 0 14 15 9 10 6 11 2 6 15 15 7 11 6\n\n7 7 7 15 3 0 8 4 3 14 9 2 10 14 1 14 9 2 8 0 6 5 1 2 6 9 10 4 3 8 2 2 4 13 11 0 4 11 6 15 3 0 2 4 9 6 11 8 2 4\n\n13 1 0 6 5 13 11 8 4 3 10 4 7 15 1 14 3 8 6 9 0 8 8 12 1 6 15 9 0 10 0 0 0 14 11 12 5 15 9 2 12 9 8 4 11 12 15 7 5 13\n\n7 1 4 1 12 11 10 14 9 12 3 8 12 11 4 15 1 14 5 7 9 6 15 15 9 8 14 3 0 10 4 5 1 6 15 15 13 11 2 4 7 7 15 13 15 15 3 0 4 15\n\n1 4 1 4 15 7 3 14 7 7 9 6 15 11 8 2 8 2 4 9 2 8 6 15 15 7 15 13 5 3 12 13 1 4 3 6 7 11 12 5 13 5 11 2 6 15 1 0 8 14\n\n13 9 8 12 7 1 0 14 13 9 14 1 10 2 6 1 14 13 1 6 1 2 8 10 6 1 10 10 0 12 11 14 1 0 12 1 12 11 2 12 15 1 10 4 1 10 12 5 15 15\n\n3 2 6 7 13 5 13 11 6 11 14 9 6 1 8 0 6 11 12 1 4 5 11 14 9 8 10 14 13 3 14 7 13 5 3 4 7 3 12 15 7 9 2 0 12 7 7 13 11 6\n\n5 9 12 1 6 1 6 3 12 15 11 10 0 12 7 13 13 3 2 8 12 5 3 14 15 7 3 14 7 13 11 4 7 5 5 13 9 4 11 6 5 3 12 1 2 0 12 7 15 13\n\n1 14 15 13 5 13 1 12 3 10 14 11 8 2 8 2 6 1 12 11 6 5 9 2 10 4 5 7 9 14 3 0 0 8 12 7 7 13 15 13 5 9 10 4 9 0 10 8 6 15\n\n13 11 14 15 9 10 8 14 13 15 11 10 14 9 14 9 8 12 15 11 8 8 10 12 15 13 13 13 15 11 12 9 12 11 14 13 9 14 11 10 8 14 15 9 10 12 15 15 9 14\n\n<\/span><\/pre>\n<p><span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">Keep up the good work!<br \/>\n<\/span><\/p>\n<p><span style=\"font-family: Verdana,Tahoma,sans-serif,Arial,Lucida Sans,Gill Sans;\">Thanks for your submission!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c\u4e00\u6b21\u5199\u89e3\u9898\u62a5\u544a\u3002\u597d\u591aUSACO\u7684\u7a0b\u5e8f\u5199\u5b8c\u540e\u90fd\u653e\u5728\u5b66\u6821\u4e86\uff0c\u6ca1\u62ff\u56de\u6765\uff0c\u6240\u4ee5\u6ca1\u80fd\u5199\u7ed3\u9898\u62a5\u544a\u3002\u521a\u624d\u505a\u4e86\u4e00\u9053\uff0c\u53ebThe [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,14,13],"tags":[86,131,244,335,344],"class_list":["post-174","post","type-post","status-publish","format-standard","hentry","category-4","category-14","category-13","tag-usaco","tag-131","tag-244","tag-335","tag-344"],"_links":{"self":[{"href":"https:\/\/sinyalee.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sinyalee.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sinyalee.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sinyalee.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sinyalee.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=174"}],"version-history":[{"count":0,"href":"https:\/\/sinyalee.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/174\/revisions"}],"wp:attachment":[{"href":"https:\/\/sinyalee.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sinyalee.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sinyalee.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}