Tuesday, August 24, 2010

UVa 628 Passwords

Problem: generate a list of passwords by a set of words and rules.

Solution: in a rule, a digit is presented by a '0' and a word is '#', and then all digits can be iterated like incresing a bigint if '#' is neglected. Then loop through all rules and words and replace '#' with the given word.

No comments: