I would be grateful, if anyone could - point out why the below solution TLEd? - give hints to improve the code running time?
Logic explanation in plain english: - Create a dictionary of string, int. - the key stores the patterns of len 19 for each number w.r.t to parity of each digit e.g ( 00000000101010111011 ) - the count of pattern is incremented, decremented accordingly. - Ans is just a dictionary lookup for given pattern
20594344 Contest 371 DIV2 Problem C : http://codeforces.net/contest/714/problem/C