Given n string Si. Count the number of pairs i≠j that SiSj is a palindrome. (i,j) is different from (j,i).
Input:
3
a
b
ab
Output:
2
Prefix | |
Compare string | |
Maximum score | |
Report | |
Maximum XOR subarray | |
Query on string | |
Language | |
Poem | |
Palindrome pairs | |
Mass XOR queries | |
XOR-path on tree | |
The ancient book |