{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003ctable width\u003d\"100%\"\u003e\n \u003ctbody\u003e\n \u003ctr valign\u003d\"top\"\u003e\n \u003ctd width\u003d\"100%\"\u003e\u003cp\u003eRocket Mania is one of my favourite games of Fantasy Games series. In the game, there are matches on the left hand side, and rockets on the right hand side. In between, there are different sorts of fuse blocks (See Figure A). These fuses can be rotated 0, 90, 180 or 270 degrees. To launch a rocket, you must form an unbroken path of fuses from the match to the rocket. When a fuse is complete, all rockets linked to a match will launch (See Figure B).\u003c/p\u003e\u003cp\u003eYour task is, given an initial situation, rotate some fuse blocks to make as many rockets launch as possible by firing one or more matches.\u003c/p\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cimg src\u003d\"CDN_BASE_URL/07207ed181fe195f0b2dc08ec83ba014?v\u003d1679361237\" width\u003d\"240\" height\u003d\"180\"\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003ctable width\u003d\"100%\"\u003e\n \u003ctbody\u003e\n \u003ctr align\u003d\"center\"\u003e\n \u003ctd\u003e\u003cimg src\u003d\"CDN_BASE_URL/7f62309d1281ca530a2cfc42db6219f9?v\u003d1679361237\" width\u003d\"180\" height\u003d\"227\"\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cimg src\u003d\"CDN_BASE_URL/594e1b880119563803f1c3d8bccea9a9?v\u003d1679361237\" width\u003d\"180\" height\u003d\"227\"\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cimg src\u003d\"CDN_BASE_URL/bc6d762cf7497d6cbc7d2cfd2c697944?v\u003d1679361237\" width\u003d\"168\" height\u003d\"125\"\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align\u003d\"center\"\u003eFigure A\u003c/td\u003e\n \u003ctd align\u003d\"center\"\u003eFigure B\u003c/td\u003e\n \u003ctd align\u003d\"center\"\u003eFuse Pipes\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003e\u003cstrong\u003eInput\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eInput contains multiple test cases. Each test case consists of 9 lines, each line consists of 6 characters. The characters may be \u0027.\u0027, \u0027-\u0027, \u0027L\u0027, \u0027T\u0027 or \u0027+\u0027, which specify an empty block or a corresponding type of fuse block. Every test case will be followed by a blank line.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eOutput\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThere is one line for each test case, which is the maximum number of rockets you can make launch. If no rockets can launch, just output 0.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eSample Input\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003eLLLLLL\nLLLLLL\nLLLLLL\nLLLLLL\nLLLLLL\nLLLLLL\nLLLLLL\nLLLLLL\nLLLLLL\n\n......\n.L----\n-+----\n.-....\n.T---L\n.L----\n......\n......\n......\n\n-L-L-L\n-TL--T\n-L-T-L\n--+---\n---T--\n-TL---\n---LT-\n---T-T\n-TL-T-\n\nTTTTTT\nTTTTTT\nTTTTTT\nTTTTTT\nTTTTTT\nTTTTTT\nTTTTTT\nTTTTTT\nTTTTTT\n\n\u003c/pre\u003e\n\u003cp\u003e\u003cstrong\u003eSample Output\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e4\n3\n6\n9\n\u003c/pre\u003e\n\u003cp\u003e\u003cstrong\u003eHint\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe time limit has been set to 2 times of the time the standard solution requires.\u003c/p\u003e\n\u003chr\u003e\u003cstrong\u003eHomepage:\u003c/strong\u003e \u003ca href\u003d\"http://fairyair.yeah.net/\" target\u003d\"_blank\"\u003ehttp://fairyair.yeah.net/\u003c/a\u003e \u003cbr\u003e\n\u003cp\u003eMaybe you are in a terrible sorrow, agony and despair, but for the sake of the persons who are blessing you dumbly all the while, please keep on your living happily. The blessings persons give you will become your little bits of felicity.\u003c/p\u003e"}}]}