Two Convex Sets

AtCoder
IDttpc2024_1_h
Time4000ms
Memory256MB
Difficulty
A set of points $U$ in the $xy$\-plane is called **good** if no point in $U$ lies in the **interior** of the convex hull of $U$. Note that the empty set is considered good. You are given $N$ distinct points $v_1, v_2, \dots, v_N$ in the $xy$\-plane. The coordinates of the point $v_i$ are $(x_i, y_i)$. No three distinct points are collinear. Count the number of subsets $S$ of $V = \lbrace v_1, v_2, \dots, v_N \rbrace$ such that both $S$ and $V \setminus S$ are good sets. ## Constraints * All input values are integers. * $1 \le N \le 40$ * $|x_i|,|y_i|\le 10^6$ * $(x_i,y_i)\neq (x_j,y_j)\ (i\neq j)$ * No three distinct points are collinear. ## Input The input is given in the following format: $N$ $x_1$ $y_1$ $x_2$ $y_2$ $\vdots$ $x_N$ $y_N$ [samples]
Samples
Input #1
4
0 0
3 0
0 3
1 1
Output #1
14

Except for $\emptyset$ and $V$, all other sets $S$ satisfy the condition.
Input #2
8
1 0
2 0
3 1
3 2
2 3
1 3
0 2
0 1
Output #2
256
Input #3
10
0 0
1 1
7 1
1 7
3 2
2 3
4 2
2 4
5 4
4 5
Output #3
0
API Response (JSON)
{
  "problem": {
    "name": "Two Convex Sets",
    "description": {
      "content": "A set of points $U$ in the $xy$\\-plane is called **good** if no point in $U$ lies in the **interior** of the convex hull of $U$. Note that the empty set is considered good. You are given $N$ distinct ",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 4000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "ttpc2024_1_h"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "A set of points $U$ in the $xy$\\-plane is called **good** if no point in $U$ lies in the **interior** of the convex hull of $U$. Note that the empty set is considered good.\nYou are given $N$ distinct ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments