Working in a boutique folding and putting in order T-shirts according to their sizes seems very easy. But is it really so simple?
Given n objects of different sizes, how many different arrangements can be done using relationships "<" and "="?
For instance, with 2 objects, A and B, we have 3 possible arrangements:
A=B A<B B<A
A=B=C A=B<C A<B=C A<B<C A<C<B A=C<B B<A=C B<A<C B<C<A B=C<A C<A=B C<A<B C<B<A
The first line of the input contains an integer, t, indicating the number of test cases. For each test case, one line appears, that contains a number n, representing the number of objects.
t<= 1000
1<=n<=1000
For each test case, the output should contain a single line with the number representing the different arrangements you can do with n objects. The result can be very large, print the result modulo 10056.
3 1 2 3
1 3 13
Migrated from old NTUJ.
uva 12034
No. | Testdata Range | Score |
---|