{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003co:smarttagtype namespaceuri\u003d\"urn:schemas-microsoft-com:office:smarttags\" name\u003d\"country-region\" /\u003e \u003co:smarttagtype namespaceuri\u003d\"urn:schemas-microsoft-com:office:smarttags\" name\u003d\"City\" /\u003e \u003co:smarttagtype namespaceuri\u003d\"urn:schemas-microsoft-com:office:smarttags\" name\u003d\"place\" /\u003e \u003c!--[if gte mso 9]\u003e\u003cxml\u003e\n \u003co:DocumentProperties\u003e\n \u003co:Author\u003eImage\u003c/o:Author\u003e\n \u003co:Template\u003eNormal\u003c/o:Template\u003e\n \u003co:LastAuthor\u003eImage\u003c/o:LastAuthor\u003e\n \u003co:Revision\u003e1\u003c/o:Revision\u003e\n \u003co:TotalTime\u003e0\u003c/o:TotalTime\u003e\n \u003co:Created\u003e2004-08-29T13:09:00Z\u003c/o:Created\u003e\n \u003co:LastSaved\u003e2004-08-29T13:09:00Z\u003c/o:LastSaved\u003e\n \u003co:Pages\u003e1\u003c/o:Pages\u003e\n \u003co:Words\u003e269\u003c/o:Words\u003e\n \u003co:Characters\u003e1535\u003c/o:Characters\u003e\n \u003co:Company\u003e2ndSpAcE\u003c/o:Company\u003e\n \u003co:Lines\u003e12\u003c/o:Lines\u003e\n \u003co:Paragraphs\u003e3\u003c/o:Paragraphs\u003e\n \u003co:CharactersWithSpaces\u003e1801\u003c/o:CharactersWithSpaces\u003e\n \u003co:Version\u003e10.2625\u003c/o:Version\u003e\n \u003c/o:DocumentProperties\u003e\n\u003c/xml\u003e\u003c![endif]--\u003e\u003c!--[if gte mso 9]\u003e\u003cxml\u003e\n \u003cw:WordDocument\u003e\n \u003cw:GrammarState\u003eClean\u003c/w:GrammarState\u003e\n \u003cw:PunctuationKerning/\u003e\n \u003cw:DrawingGridVerticalSpacing\u003e7.8 磅\u003c/w:DrawingGridVerticalSpacing\u003e\n \u003cw:DisplayHorizontalDrawingGridEvery\u003e0\u003c/w:DisplayHorizontalDrawingGridEvery\u003e\n \u003cw:DisplayVerticalDrawingGridEvery\u003e2\u003c/w:DisplayVerticalDrawingGridEvery\u003e\n \u003cw:Compatibility\u003e\n \u003cw:SpaceForUL/\u003e\n \u003cw:BalanceSingleByteDoubleByteWidth/\u003e\n \u003cw:DoNotLeaveBackslashAlone/\u003e\n \u003cw:ULTrailSpace/\u003e\n \u003cw:DoNotExpandShiftReturn/\u003e\n \u003cw:AdjustLineHeightInTable/\u003e\n \u003cw:BreakWrappedTables/\u003e\n \u003cw:SnapToGridInCell/\u003e\n \u003cw:WrapTextWithPunct/\u003e\n \u003cw:UseAsianBreakRules/\u003e\n \u003cw:UseFELayout/\u003e\n \u003c/w:Compatibility\u003e\n \u003cw:BrowserLevel\u003eMicrosoftInternetExplorer4\u003c/w:BrowserLevel\u003e\n \u003c/w:WordDocument\u003e\n\u003c/xml\u003e\u003c![endif]--\u003e\u003c!--[if !mso]\u003e\u003cobject\n classid\u003d\"clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D\" id\u003dieooui\u003e\u003c/object\u003e\n\u003cstyle\u003e\nst1\\:*{behavior:url(#ieooui) }\n\u003c/style\u003e\n\u003c![endif]--\u003e\n\u003cstyle\u003e\n\u003c!--\n /* Font Definitions */\n @font-face\n\t{font-family:宋体;\n\tpanose-1:2 1 6 0 3 1 1 1 1 1;\n\tmso-font-alt:SimSun;\n\tmso-font-charset:134;\n\tmso-generic-font-family:auto;\n\tmso-font-pitch:variable;\n\tmso-font-signature:3 135135232 16 0 262145 0;}\n@font-face\n\t{font-family:\"\\@宋体\";\n\tpanose-1:2 1 6 0 3 1 1 1 1 1;\n\tmso-font-charset:134;\n\tmso-generic-font-family:auto;\n\tmso-font-pitch:variable;\n\tmso-font-signature:3 135135232 16 0 262145 0;}\n /* Style Definitions */\n p.MsoNormal, li.MsoNormal, div.MsoNormal\n\t{mso-style-parent:\"\";\n\tmargin:0cm;\n\tmargin-bottom:.0001pt;\n\ttext-align:justify;\n\ttext-justify:inter-ideograph;\n\tmso-pagination:none;\n\tfont-size:10.5pt;\n\tmso-bidi-font-size:12.0pt;\n\tfont-family:\"Times New Roman\";\n\tmso-fareast-font-family:宋体;\n\tmso-font-kerning:1.0pt;}\np\n\t{mso-margin-top-alt:auto;\n\tmargin-right:0cm;\n\tmso-margin-bottom-alt:auto;\n\tmargin-left:0cm;\n\tmso-pagination:widow-orphan;\n\tfont-size:12.0pt;\n\tfont-family:宋体;\n\tmso-bidi-font-family:宋体;}\npre\n\t{margin:0cm;\n\tmargin-bottom:.0001pt;\n\tmso-pagination:widow-orphan;\n\ttab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;\n\tfont-size:12.0pt;\n\tfont-family:宋体;\n\tmso-bidi-font-family:宋体;}\nspan.GramE\n\t{mso-style-name:\"\";\n\tmso-gram-e:yes;}\n /* Page Definitions */\n @page\n\t{mso-page-border-surround-header:no;\n\tmso-page-border-surround-footer:no;}\n@page Section1\n\t{size:595.3pt 841.9pt;\n\tmargin:72.0pt 90.0pt 72.0pt 90.0pt;\n\tmso-header-margin:42.55pt;\n\tmso-footer-margin:49.6pt;\n\tmso-paper-source:0;\n\tlayout-grid:15.6pt;}\ndiv.Section1\n\t{page:Section1;}\n--\u003e\n\u003c/style\u003e \u003c!--[if gte mso 10]\u003e\n\u003cstyle\u003e\n /* Style Definitions */\n table.MsoNormalTable\n\t{mso-style-name:普通表格;\n\tmso-tstyle-rowband-size:0;\n\tmso-tstyle-colband-size:0;\n\tmso-style-noshow:yes;\n\tmso-style-parent:\"\";\n\tmso-padding-alt:0cm 5.4pt 0cm 5.4pt;\n\tmso-para-margin:0cm;\n\tmso-para-margin-bottom:.0001pt;\n\tmso-pagination:widow-orphan;\n\tfont-size:10.0pt;\n\tfont-family:\"Times New Roman\";}\n\u003c/style\u003e\n\u003c![endif]--\u003e\n\u003cdiv class\u003d\"Section1\" style\u003d\"layout-grid:15.6pt\"\u003e\n \u003cp\u003e\u003cb\u003e\u003cspan lang\u003d\"EN-US\"\u003eDescription \u003c/span\u003e\u003c/b\u003e\u003cspan lang\u003d\"EN-US\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n \u003cp\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"mso-hansi-font-family:\u0026quot;Times New Roman\u0026quot;;mso-bidi-font-family:\n\u0026quot;Times New Roman\u0026quot;\"\u003eBackground \u003cbr\u003e Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his customer has build his giant steel crane to the place where it is needed on which all streets can carry the weight. \u003cbr\u003e Fortunately he already has a plan of the city with all streets and bridges and all the allowed weights.Unfortunately he has no idea how to find the the maximum weight capacity in order to tell his customer how heavy the crane may become. But you surely know. \u003cbr\u003e \u003cbr\u003e Problem \u003cbr\u003e \u003cspan class\u003d\"GramE\"\u003eYou\u003c/span\u003e are given the plan of the city, described by the streets (with weight limits) between the crossings, which are numbered from 1 to n. Your task is to find the maximum weight that can be transported from crossing 1 (Hugo\u0027s place) to crossing n (the customer\u0027s place). You may assume that there is at least one path. All streets can be travelled in both directions.\u003c/span\u003e\u003cspan lang\u003d\"EN-US\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n \u003cp\u003e\u003cb\u003e\u003cspan lang\u003d\"EN-US\"\u003eInput \u003c/span\u003e\u003c/b\u003e\u003cspan lang\u003d\"EN-US\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n \u003cp\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"mso-hansi-font-family:\u0026quot;Times New Roman\u0026quot;;mso-bidi-font-family:\n\u0026quot;Times New Roman\u0026quot;\"\u003eThe first line contains the number of scenarios (city plans). For each city the number n of street crossings (1 \u0026lt;\u003d n \u0026lt;\u003d 1000) and number m of streets are given on the first line. The following m lines contain triples of integers specifying start and end crossing of the street and the maximum allowed weight, which is positive and not larger than 1000000. There will be at most one street between each pair of crossings.\u003c/span\u003e\u003cspan lang\u003d\"EN-US\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n \u003cp\u003e\u003cb\u003e\u003cspan lang\u003d\"EN-US\"\u003eOutput \u003c/span\u003e\u003c/b\u003e\u003cspan lang\u003d\"EN-US\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n \u003cp\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"mso-hansi-font-family:\u0026quot;Times New Roman\u0026quot;;mso-bidi-font-family:\n\u0026quot;Times New Roman\u0026quot;\"\u003eThe output for every scenario begins with a line containing \"Scenario #i:\u003cspan class\u003d\"GramE\"\u003e\",\u003c/span\u003e where i is the number of the scenario starting at 1. Then print a single line containing the maximum allowed weight that Hugo can transport to the customer. Terminate the output for the scenario with a blank line.\u003c/span\u003e\u003cspan lang\u003d\"EN-US\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n \u003cp\u003e\u003cb\u003e\u003cspan lang\u003d\"EN-US\"\u003eSample Input \u003c/span\u003e\u003c/b\u003e\u003cspan lang\u003d\"EN-US\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n \u003cpre\u003e\u003cspan lang\u003d\"EN-US\"\u003e1\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/pre\u003e\n \u003cpre\u003e\u003cspan lang\u003d\"EN-US\"\u003e3 3\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/pre\u003e\n \u003cpre\u003e\u003cspan lang\u003d\"EN-US\"\u003e1 2 3\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/pre\u003e\n \u003cpre\u003e\u003cspan lang\u003d\"EN-US\"\u003e1 3 4\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/pre\u003e\n \u003cpre\u003e\u003cspan lang\u003d\"EN-US\"\u003e2 3 5\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/pre\u003e\n \u003cp\u003e\u003cb\u003e\u003cspan lang\u003d\"EN-US\"\u003eSample Output \u003c/span\u003e\u003c/b\u003e\u003cspan lang\u003d\"EN-US\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n \u003cpre\u003e\u003cspan lang\u003d\"EN-US\"\u003eScenario #1:\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/pre\u003e\n \u003cpre\u003e\u003cspan lang\u003d\"EN-US\"\u003e4\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/pre\u003e\n \u003cp\u003e\u003cb\u003e\u003cspan lang\u003d\"EN-US\"\u003eSource \u003c/span\u003e\u003c/b\u003e\u003cspan lang\u003d\"EN-US\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n \u003cp\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"mso-hansi-font-family:\u0026quot;Times New Roman\u0026quot;;mso-bidi-font-family:\n\u0026quot;Times New Roman\u0026quot;\"\u003eTUD Contest 2004, \u003c/span\u003e\u003cst1:place\u003e\n \u003cst1:city\u003e\n \u003cspan lang\u003d\"EN-US\" style\u003d\"mso-hansi-font-family:\u0026quot;Times New Roman\u0026quot;;mso-bidi-font-family:\n \u0026quot;Times New Roman\u0026quot;\"\u003eDarmstadt\u003c/span\u003e\n \u003c/st1:city\u003e\n \u003cspan lang\u003d\"EN-US\" style\u003d\"mso-hansi-font-family:\u0026quot;Times New Roman\u0026quot;;mso-bidi-font-family:\u0026quot;Times New Roman\u0026quot;\"\u003e, \u003c/span\u003e\n \u003cst1:country-region\u003e\n \u003cspan lang\u003d\"EN-US\" style\u003d\"mso-hansi-font-family:\u0026quot;Times New Roman\u0026quot;;\n mso-bidi-font-family:\u0026quot;Times New Roman\u0026quot;\"\u003eGermany\u003c/span\u003e\n \u003c/st1:country-region\u003e\n \u003c/st1:place\u003e\u003cspan lang\u003d\"EN-US\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n \u003cp class\u003d\"MsoNormal\"\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"font-size:12.0pt;font-family:宋体;\nmso-hansi-font-family:\u0026quot;Times New Roman\u0026quot;\"\u003e\n \u003co:p\u003e\n \u0026nbsp;\n \u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n\u003c/div\u003e"}}]}