[SOLUTION] Torn Lucky Ticket Solution Codeforces

A ticket is a non-empty string of digits from 11 to 99. A lucky ticket is such a ticket that: it has an even length; the sum of digits in the first half is equal to the sum of digits in the second half. You are given n� ticket pieces s1,s2,…,sn�1,�2,…,��. How many pairs (i,j)(�,�) (for 1≤i,j≤n1≤�,�≤�) are there such that si+sj��+�� is a lucky ticket? Note that it’s possible … Read more