Problem
A set is the mathematical term for a loose collection of objects, called elements. Examples of sets include and , the set containing all real numbers. We even have the empty set, represented by or , which contains no elements at all. Two sets are equal when they contain the same elements. In other words, in contrast to permutations, the ordering of the elements of a set is unimportant (e.g., is equivalent to ). Sets are not allowed to contain duplicate elements, so that is not a set. We have already used sets of 2 elements to represent edges from a graph.
A set is a subset of if every element of is also an element of , and we write . For example, , and is a subset of every set (including itself!).
As illustrated in the biological introduction, we can use subsets to represent the collection of taxa possessing a character. However, the number of applications is endless; for example, an event in probability can now be defined as a subset of the set containing all possible outcomes.
Our first question is to count the total number of possible subsets of a given set.
Given: A positive integer ().
Return: The total number of subsets of modulo 1,000,000.
一组是对象的松散集合,称为数学术语元素。集的示例包括和,包含所有实数的集。我们甚至有一个空集,用或表示,它根本不包含任何元素。当两组包含相同元素时,它们是相等的。换句话说,与排列相反,集合中元素的顺序并不重要(例如等效于 )。集合不允许包含重复元素,因此不是集合。我们已经使用组2个元件的代表边缘从一个曲线图。
一组是一个子集的,如果的每个元素也是一个元素,我们写。例如,和是每个集合(包括它本身!)的子集。
如生物学介绍中所示,我们可以使用子集来表示具有特征的分类单元的集合。但是,申请的数量是无限的。例如,一个事件在概率现在可以定义为包含所有可能的集合的子集的结果。
我们的第一个问题是计算给定集合的可能子集的总数。
给定:正整数()。
返回值:模数为1,000,000的子集总数。
Sample Dataset
3
Sample Output
8