Choosing Up Sides

AtCoder
IDkeyence2021_d
Time2000ms
Memory256MB
Difficulty
Let $N$ be a positive integer. Consider a competition where two teams, each with $2^{N-1}$ players, play against each other. We have $2^N$ players numbered $1$ through $2^N$. Coach Snuke can do the following operation any number of times: separate the players into two teams A and B, each with $2^{N-1}$ players, and make them play against each other. He wants to do this operation one or more times so that both of the following conditions are satisfied: 1. there exists an integer $n$ such that, for every $(i, j)$ such that $1 \leq i < j \leq 2^N$, Player $i$ and Player $j$ have belonged to the **same** team exactly $n$ times. 2. there exists an integer $m$ such that, for every $(i, j)$ such that $1 \leq i < j \leq 2^N$, Player $i$ and Player $j$ have belonged to **different** teams exactly $m$ times. We can prove that there exist sequences of operations that achieve Snuke's objective. Among those sequences, present one sequence with the **minimum possible number of operations**. ## Constraints * All values in input are integers. * $1 \leq N \leq 8$ ## Input Input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
1
Output #1
1
AB

*   We can satisfy the objective with one operation.
*   Note that we must do at least one operation.
API Response (JSON)
{
  "problem": {
    "name": "Choosing Up Sides",
    "description": {
      "content": "Let $N$ be a positive integer. Consider a competition where two teams, each with $2^{N-1}$ players, play against each other. We have $2^N$ players numbered $1$ through $2^N$. Coach Snuke can do the fo",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "keyence2021_d"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Let $N$ be a positive integer. Consider a competition where two teams, each with $2^{N-1}$ players, play against each other.\nWe have $2^N$ players numbered $1$ through $2^N$. Coach Snuke can do the fo...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments