摘要:
题目链接: http://www.codeforces.com/problemset/problem/285/DPermutation p is an ordered set of integers p1, p2, ..., pn, consisting of n distinct positive integers, each of them doesn't exceed n. We'll denote the i-th element of permutation p as pi. We'll call number n the size or the length 阅读全文
摘要:
题目链接: www.codeforces.com/problemset/problem/300/CVitaly is a very weird man. He's got two favorite digits a and b. Vitaly calls a positive integer good, if the decimal representation of this integer only contains digits a and b. Vitaly calls a good number excellent, if the sum of its digits is a 阅读全文