强智杯专题

“强智杯“2020年湖南省大学生计算机程序设计竞赛 D.String Commutativity

链接 https://ac.nowcoder.com/acm/problem/214395 Bobo has n strings s1, … , sn, and he would like to find the number of pairs i < j where si + sj = sj + si. Note that a + b means the concatenation of th