{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eThere is a hive in the village. Like this. There are 8 columns(from \u003cem\u003eA\u003c/em\u003e to \u003cem\u003eH\u003c/em\u003e) in this hive. Different colums have the same number of grids. Every grid has its own coordinate, which is formed by two uppercases, representing the row index and the column index. The row index starts from \u003cem\u003eA\u003c/em\u003e. And the hive has less than ten rows in total. The following figure shows a hive with two rows.\u003c/p\u003e\n\u003cdiv style\u003d\"text-align: center;\"\u003e\n \u003cimg src\u003d\"CDN_BASE_URL/5afa2c677297bec81ef8db084a54a48a?v\u003d1679361173\" alt\u003d\"Photo\"\u003e\n\u003c/div\u003e\n\u003cp\u003eThere is honey in some grids. A naughty bee discovers this special hive and hopes to eat all honey in the hive. However, this strange bee sets some rules for itself while eating. They are descirbed as following:\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003eIt must eat the honey by choosing a circuit and then eat all honey that is in the chosen circuit.\u003c/li\u003e\n \u003cli\u003eHoney will disappear immediately after the bee eats it.\u003c/li\u003e\n \u003cli\u003eAll grids which are in the circuit should has honey in it.\u003c/li\u003e\n \u003cli\u003eThe length of the circuit should be no less than 3.\u003c/li\u003e\n \u003cli\u003eThe bee can choose more than one circuit to eat honey.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eGiven the hive and the honey in it, how many different ways can this naughty bee eat all honey in the hive?\u003c/p\u003e\n\u003ch4\u003eInput\u003c/h4\u003e\n\u003cp\u003eThere are multiple test cases.\u003c/p\u003e\n\u003cp\u003eFor each case, there are two integers \u003cem\u003eN\u003c/em\u003e(0 \u0026lt; \u003cem\u003eN\u003c/em\u003e ≤ 10) and \u003cem\u003eM\u003c/em\u003e(0 ≤ \u003cem\u003eM\u003c/em\u003e ≤ \u003cem\u003eN\u003c/em\u003e * 8) in the first line. \u003cem\u003eN\u003c/em\u003e represents the size of the hive, which means there are \u003cem\u003eN\u003c/em\u003e rows in the hive in total. All grids have honey in it except for those \u003cem\u003eM\u003c/em\u003e grids listed in the following line. Each empty grid is described by its coordinate(using two uppercases).\u003c/p\u003e\n\u003ch4\u003eOutput\u003c/h4\u003e\n\u003cp\u003eFor each case, output the number of different ways the bee can eat all honey in the hive. It\u0027s guaranteed that the answer does not exceed 2\u003csup\u003e63\u003c/sup\u003e - 1.\u003c/p\u003e\n\u003ch4\u003eSample Input\u003c/h4\u003e\n\u003cpre\u003e3 5\nBB CD BF AH CG\n\u003c/pre\u003e\n\u003ch4\u003eSample Output\u003c/h4\u003e\n\u003cpre\u003e3\n\u003c/pre\u003e\n\u003ch4\u003eHint\u003c/h4\u003e\n\u003cp\u003eThe following figure shows all different ways for the sample. The black grids represent those which are initially empty.\u003c/p\u003e\n\u003cdiv style\u003d\"text-align: center;\"\u003e\n \u003cimg src\u003d\"CDN_BASE_URL/3aad47c3fd6f89e806ecb977d35b04b2?v\u003d1679361173\" alt\u003d\"Photo\"\u003e\n\u003c/div\u003e"}}]}