| NUS CS3233 Final Team Contest 2025 |
|---|
| Finished |
Alice and Bob are playing a game!
Alice and Bob both knows some string $$$S$$$ of length $$$N+1$$$ that consists of only the characters A and B. The game is played on a $$$(N+1) \times (N+1)$$$ matrix, with rows and columns numbered from $$$0$$$ to $$$N$$$. We denote the cell in row $$$i$$$ and column $$$j$$$ as $$$(i, j)$$$.
Initially, a token is placed on $$$(0, 0)$$$. Each turn,
The game ends when the token reaches the anti-diagonal of the matrix, which is the set of cells $$$\{(i, j) \mid i + j = N\}$$$. In other words, there will be a total of $$$N$$$ turns in the game. The winner of the game is determined by the string $$$S$$$:
Alice moves first. Among the $$$2^{N+1}$$$ possible strings $$$S$$$, how many strings are there such that Alice wins the game, assuming both players play optimally? Since the answer can be very large, output the answer modulo $$$10^9 + 3233$$$.
The input contains a single integer $$$N$$$ ($$$1 \leq N \leq 100\,000$$$).
Output a single integer denoting the number of strings $$$S$$$ such that Alice wins the game, modulo $$$10^9 + 3233$$$, assuming both players play optimally.
2
3
The three strings $$$S$$$ such that Alice wins the game are AAA, AAB, and BAA.
| Name |
|---|


