{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"MD","content":"给若干个只包含小写字母的字符串,询问有多少对 $(i,j)$ 满足如下条件:将这两个字符串合并在一起后,可以任意交换字符位置,使合并后的字符串是一个回文字符串"}},{"title":"Input","value":{"format":"MD","content":"\u003cp\u003eThe first line contains a positive integer $$$N$$$ ($$$1 \\le N \\le 100\\,000$$$), representing the length of the input array.\u003c/p\u003e\n\u003cp\u003eEacg of the next $$$N$$$ lines contains a string (consisting of lowercase English letters from \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ea\u003c/span\u003e\u0027 to \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003ez\u003c/span\u003e\u0027)\u0026nbsp;— an element of the input array.\u003c/p\u003e\n\u003cp\u003eThe total number of characters in the input array will be less than $$$1\\,000\\,000$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"MD","content":"\u003cp\u003eOutput one number, representing \u003cspan class\u003d\"tex-font-style-bf\"\u003ehow many palindrome pairs\u003c/span\u003e there are in the array.\u003c/p\u003e"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\naa\nbb\ncd\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e6\naab\nabcac\ndffe\ned\naa\naade\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"MD","content":"\u003cp\u003eThe first example:\u003c/p\u003e\n\u003col\u003e\n \u003cli\u003e\u003cspan class\u003d\"tex-font-style-tt\"\u003eaa\u003c/span\u003e $$$+$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003ebb\u003c/span\u003e $$$\\to$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eabba\u003c/span\u003e.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eThe second example:\u003c/p\u003e\n\u003col\u003e\n \u003cli\u003e\u003cspan class\u003d\"tex-font-style-tt\"\u003eaab\u003c/span\u003e $$$+$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eabcac\u003c/span\u003e $$$\u003d$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eaababcac\u003c/span\u003e $$$\\to$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eaabccbaa\u003c/span\u003e\u003c/li\u003e\n \u003cli\u003e\u003cspan class\u003d\"tex-font-style-tt\"\u003eaab\u003c/span\u003e $$$+$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eaa\u003c/span\u003e $$$\u003d$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eaabaa\u003c/span\u003e\u003c/li\u003e\n \u003cli\u003e\u003cspan class\u003d\"tex-font-style-tt\"\u003eabcac\u003c/span\u003e $$$+$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eaa\u003c/span\u003e $$$\u003d$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eabcacaa\u003c/span\u003e $$$\\to$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eaacbcaa\u003c/span\u003e\u003c/li\u003e\n \u003cli\u003e\u003cspan class\u003d\"tex-font-style-tt\"\u003edffe\u003c/span\u003e $$$+$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eed\u003c/span\u003e $$$\u003d$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003edffeed\u003c/span\u003e $$$\\to$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003efdeedf\u003c/span\u003e\u003c/li\u003e\n \u003cli\u003e\u003cspan class\u003d\"tex-font-style-tt\"\u003edffe\u003c/span\u003e $$$+$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eaade\u003c/span\u003e $$$\u003d$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003edffeaade\u003c/span\u003e $$$\\to$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eadfaafde\u003c/span\u003e\u003c/li\u003e\n \u003cli\u003e\u003cspan class\u003d\"tex-font-style-tt\"\u003eed\u003c/span\u003e $$$+$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eaade\u003c/span\u003e $$$\u003d$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eedaade\u003c/span\u003e $$$\\to$$$ \u003cspan class\u003d\"tex-font-style-tt\"\u003eaeddea\u003c/span\u003e\u003c/li\u003e\n\u003c/ol\u003e"}}]}