[b]p1.[/b] Determine the number of ways to place $4$ rooks on a $4 \times 4$ chessboard such that:
(a) no two rooks attack one another, and
(b) the main diagonal (the set of squares marked $X$ below) does not contain any rooks.
[img]https://cdn.artofproblemsolving.com/attachments/e/e/e3aa96de6c8ed468c6ef3837e66a0bce360d36.png[/img]
The rooks are indistinguishable and the board cannot be rotated. (Two rooks attack each other if they are in the same row or column.)


[b]p2.[/b] Seven students, numbered $1$ to $7$ in counter-clockwise order, are seated in a circle. Fresh Mann has 100 erasers, and he wants to distribute them to the students, albeit unfairly. Starting with person $ 1$ and proceeding counter-clockwise, Fresh Mann gives $i$ erasers to student $i$; for example, he gives $ 1$ eraser to student $ 1$, then $2$ erasers to student $2$, et cetera. He continues around the circle until he does not have enough erasers to give to the next person. At this point, determine the number of erasers that Fresh Mann has.


[b]p3.[/b] Let $ABC$ be a triangle with $AB = AC = 17$ and $BC = 24$. Approximate $\angle ABC$ to the nearest multiple of $10$ degrees.


[b]p4.[/b] Define a sequence of rational numbers $\{x_n\}$ by $x_1 =\frac35$ and for $n \ge 1$, $x_{n+1} = 2 - \frac{1}{x_n}$ . Compute the product $x_1x_2x_3... x_{2013}$.


[b]p5.[/b] In equilateral triangle $ABC$, points $P$ and $R$ lie on segment $AB$, points $I$ and $M$ lie on segment $BC$, and points $E$ and $S$ lie on segment $CA$ such that $PRIMES$ is a equiangular hexagon. Given that $AB = 11$, $PR = 2$, $IM = 3$, and $ES = 5$, compute the area of hexagon $PRIMES$.


[b]p6.[/b] Let $f(a, b) = \frac{a^2}{a+b}$ . Let $A$ denote the sum of $f(i, j)$ over all pairs of integers $(i, j)$ with $1 \le i < j \le 10$; that is,
$$A = (f(1, 2) + f(1, 3) + ...+ f(1, 10)) + (f(2, 3) + f(2, 4) +... + f(2, 10)) +... + f(9, 10).$$
Similarly, let $B$ denote the sum of $f(i, j)$ over all pairs of integers $(i, j)$ with $1  \le j < i  \le 10$, that is, $$B = (f(2, 1) + f(3, 1) + ... + f(10, 1)) + (f(3, 2) + f(4, 2) +... + f(10, 2)) +... + f(10, 9).$$ Compute $B - A$.


[b]p7.[/b] Fresh Mann has a pile of seven rocks with weights $1, 1, 2, 4, 8, 16$, and $32$ pounds and some integer X between $1$ and $64$, inclusive. He would like to choose a set of the rocks whose total weight is exactly $X$ pounds. Given that he can do so in more than one way, determine the sum of all possible values of $X$. (The two $1$-pound rocks are indistinguishable.)


[b]p8.[/b] Let $ABCD$ be a convex quadrilateral with $AB = BC = CA$. Suppose that point $P$ lies inside the quadrilateral with $AP = PD = DA$ and $\angle PCD = 30^o$. Given that $CP = 2$ and $CD = 3$, compute $CA$.


[b]p9.[/b] Define a sequence of rational numbers $\{x_n\}$ by $x_1 = 2$, $x_2 = \frac{13}{2}$ , and for $n \ge 1$, $x_{n+2} = 3 -\frac{3}{x_{n+1}}+\frac{1}{x_nx_{n+1}}$. Compute $x_{100}$.


[b]p10.[/b] Ten prisoners are standing in a line. A prison guard wants to place a hat on each prisoner. He has two colors of hats, red and blue, and he has $10$ hats of each color. Determine the number of ways in which the prison guard can place hats such that among any set of consecutive prisoners, the number of prisoners with red hats and the number of prisoners with blue hats differ by at most $2$.


PS. You had better use hide for answers. Collected [url=https://artofproblemsolving.com/community/c5h2760506p24143309]here[/url].
1. First, we need to determine the total number of ways to place 4 rooks on a \(4 \times 4\) chessboard such that no two rooks attack each other. This is equivalent to finding the number of permutations of 4 elements, which is given by \(4!\):
   \[
   4! = 24
   \]

2. Next, we need to use the Principle of Inclusion/Exclusion (PIE) to count the number of ways to place the rooks such that at least one rook is on the main diagonal. The main diagonal consists of the squares \((1,1)\), \((2,2)\), \((3,3)\), and \((4,4)\).

3. Let \(A_i\) be the set of arrangements where the \(i\)-th rook is on the \(i\)-th diagonal square. We need to find \(|A_1 \cup A_2 \cup A_3 \cup A_4|\).

4. By PIE, we have:
   \[
   |A_1 \cup A_2 \cup A_3 \cup A_4| = \sum_{i=1}^4 |A_i| - \sum_{1 \leq i < j \leq 4} |A_i \cap A_j| + \sum_{1 \leq i < j < k \leq 4} |A_i \cap A_j \cap A_k| - |A_1 \cap A_2 \cap A_3 \cap A_4|
   \]

5. Calculate each term:
   - \(|A_i| = 3!\) because if one rook is fixed on the diagonal, the remaining 3 rooks can be placed in \(3!\) ways:
     \[
     |A_i| = 6
     \]
   - \(|A_i \cap A_j| = 2!\) because if two rooks are fixed on the diagonal, the remaining 2 rooks can be placed in \(2!\) ways:
     \[
     |A_i \cap A_j| = 2
     \]
   - \(|A_i \cap A_j \cap A_k| = 1!\) because if three rooks are fixed on the diagonal, the remaining rook can be placed in \(1!\) way:
     \[
     |A_i \cap A_j \cap A_k| = 1
     \]
   - \(|A_1 \cap A_2 \cap A_3 \cap A_4| = 0!\) because if all four rooks are fixed on the diagonal, there is only one way to place them:
     \[
     |A_1 \cap A_2 \cap A_3 \cap A_4| = 1
     \]

6. Substitute these values into the PIE formula:
   \[
   |A_1 \cup A_2 \cup A_3 \cup A_4| = 4 \cdot 6 - \binom{4}{2} \cdot 2 + \binom{4}{3} \cdot 1 - 1 = 24 - 6 \cdot 2 + 4 \cdot 1 - 1 = 24 - 12 + 4 - 1 = 15
   \]

7. Finally, subtract the number of invalid arrangements from the total number of arrangements:
   \[
   24 - 15 = 9
   \]

Conclusion:
\[
\boxed{9}
\]