Who is missing?

AtCoder
IDabc236_b
Time2000ms
Memory256MB
Difficulty
We have $4$ cards with an integer $1$ written on it, $4$ cards with $2$, $\ldots$, $4$ cards with $N$, for a total of $4N$ cards. Takahashi shuffled these cards, removed one of them, and gave you a pile of the remaining $4N-1$ cards. The $i$\-th card $(1 \leq i \leq 4N - 1)$ of the pile has an integer $A_i$ written on it. Find the integer written on the card removed by Takahashi. ## Constraints * $1 \leq N \leq 10^5$ * $1 \leq A_i \leq N \, (1 \leq i \leq 4N - 1)$ * For each $k \, (1 \leq k \leq N)$, there are at most $4$ indices $i$ such that $A_i = k$. * All values in input are integers. ## Input Input is given from Standard Input in the following format: $N$ $A_1$ $A_2$ $\ldots$ $A_{4N - 1}$ [samples]
Samples
Input #1
3
1 3 2 3 3 2 2 1 1 1 2
Output #1
3

Takahashi removed a card with $3$ written on it.
Input #2
1
1 1 1
Output #2
1
Input #3
4
3 2 1 1 2 4 4 4 4 3 1 3 2 1 3
Output #3
2
API Response (JSON)
{
  "problem": {
    "name": "Who is missing?",
    "description": {
      "content": "We have $4$ cards with an integer $1$ written on it, $4$ cards with $2$, $\\ldots$, $4$ cards with $N$, for a total of $4N$ cards. Takahashi shuffled these cards, removed one of them, and gave you a pi",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc236_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "We have $4$ cards with an integer $1$ written on it, $4$ cards with $2$, $\\ldots$, $4$ cards with $N$, for a total of $4N$ cards.\nTakahashi shuffled these cards, removed one of them, and gave you a pi...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments