{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\"text/css\"\u003e .sampledata { font-family: \"Courier New\", Courier, monospace; white-space: pre; }\u003c/style\u003e\u003cspan style\u003d\"line-height:1.5;\"\u003e众所周知,密码在信息领域起到了不可估量的作用。对于普通的口令,唯一的破解方法就是暴力破解---逐个尝试所有可能的字母组合。这是一个耗时又容易被发现的工作。所以为了获取对方的口令,在破解前须做大量的准备工作。经过情报搜集,得到了若干有用的信息,形如\u003c/span\u003e\n\u003cbr\u003e “我观察到,密码中含有字符串****”\n\u003cbr\u003e 例如,对于一个10位的密码及观察到的字符串hello与world,可能的密码组合为\n\u003cbr\u003e hellowworld与worldhello.对于6位密码及观察到的字符串good与day,可能的密码组合为gooday.\n\u003cbr\u003e 有了这些信息,就可大大减少尝试的次数了。请写一个程序,计算所有密码组合的可能。密码中仅可能含26个小写字母。\n\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cspan\u003e第一行整数L,N。代表密码长度及观察到的子串个数。\u003c/span\u003e\n\u003cbr\u003e \n\u003cspan\u003e接下来N行,每行若干个字符,表示观察到的字符串\u003c/span\u003e\n\u003cbr\u003e \n\u003cspan\u003e1\u0026lt;\u003dL\u0026lt;\u003d25 1\u0026lt;\u003dN\u0026lt;\u003d10.每个观察到的字符串长度不超过10.保证结果小于2^63\u003c/span\u003e\n\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cspan\u003e第一行一个整数,表示满足所有观察条件的字符串的总数。如果这个数字小于42则按字典顺序输出所有密码的可能,每行一个,否则只输出总数即可\u003c/span\u003e\n\u003cbr\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cspan class\u003dsampledata\u003e10 2\r\nhello\r\nworld\u003c/span\u003e\u003c/pre\u003e\u003ch2\u003eSample Output\u003c/h2\u003e\n\u003cpre class\u003dcontent\u003e\u003cspan class\u003dsampledata\u003e2\r\nhelloworld\r\nworldhello\u003c/span\u003e\u003c/pre\u003e\u003ch2\u003eHINT\u003c/h2\u003e\n\u003cdiv class\u003dcontent\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cspan class\u003dsampledata\u003e2\r\nhelloworld\r\nworldhello\u003c/span\u003e\u003c/pre\u003e\u003ch2\u003eHINT\u003c/h2\u003e\n\u003cdiv class\u003dcontent\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cp\u003e\u003c/p\u003e"}}]}