Diferente pentru problema/secretsanta intre reviziile #1 si #5

Nu exista diferente intre titluri.

Diferente intre continut:

== include(page="template/taskheader" task_id="secretsanta") ==
Poveste şi cerinţă...
Christmas is just around the corner and John's colleagues decided to organize a Secret Santa.
 
According to Google, Secret Santa is a Western Christmas tradition in which members of a group or community are randomly assigned a person to whom they give a gift.
 
There are $N$ students in John's class (him included) and he is very curious to know the number of possible ways Secret Santa can be organized. The number John asks being big, you should output it modulo $10^9^ + 7$
 
Because there are a lot of John's on the planet, you will need to answer $Q$ queries regarding the possible ways Secret Santa can be organized in John's class. A valid way of organizing Secret Santa is a way such that no child gets gifts from two different children and there is no child who has to give a gift to himself/herself.
h2. Date de intrare
Fişierul de intrare $secretsanta.in$ ...
The first line of the input file $secretsanta.in$ contains an integer $Q$, the number of queries.
 
Each of the following $Q$ lines contains an integer $N$.
h2. Date de ieşire
În fişierul de ieşire $secretsanta.out$ ...
The output file $secretsanta.out$ will contain on each line the answer for the corresponding test case.
h2. Restricţii
* $... ≤ ... ≤ ...$
* $1 ≤ Q ≤ 10^5^$
* $2 ≤ N ≤ 10^5^$
* For tests worth $10$ points, $2 ≤ N ≤ 20$.
* For tests worth another $50$ points, the sum of all $N$ in the input doesn't exceed $200.000$.
h2. Exemplu
table(example). |_. secretsanta.in |_. secretsanta.out |
| This is some
  text written on
  multiple lines.
| This is another
  text written on
  multiple lines.
| 4
5
6
9
12
| 44
265
133496
176214841
|
h3. Explicaţie
 
...
== include(page="template/taskfooter" task_id="secretsanta") ==

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.