output_description: Print the kyu M-kun has, as an integer. For example, if he has 8-kyu, print
  `8`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      X
attempt: #! /usr/bin/env python3
  
  import sys
  
  int1 = lambda x: int(x) - 1
  read = sys.stdin.buffer.read
  readline = sys.stdin.buffer.readline
  readlines = sys.stdin.buffer.readlines
  sys.setrecursionlimit(500000)
  
  N = int(readline())
  XYP = [list(map(int, readline().split())) for _ in range(N)]
  
  x_cost = [0] * ((1 << N) * N)
  y_cost = [0] * ((1 << N) * N)
  
  for bit in range(1 << N):
      for i, (xi, yi, _) in enumerate(XYP):
          x_cost[bit * N + i] = abs(xi)
          y_cost[bit * N + i] = abs(yi)
  
          for k, (xk, yk, _) in enumerate(XYP):
              if bit & (1 << k):
                  x_cost[bit * N + i] = min(x_cost[bit * N + i], abs(xi - xk))
                  y_cost[bit * N + i] = min(y_cost[bit * N + i], abs(yi - yk))
  
  ans = [sys.maxsize for _ in range(N + 1)]
  
  for bit in range(1 << N):
      cnt = bin(bit).count("1")
      bit_ = bit
      while bit_ >= 0:
          bit_ &= bit
          cost = 0
          for k in range(N):
              cost += (
                  1 * XYP[k][2] * min(x_cost[bit_ * N + k], y_cost[(bit - bit_) * N + k])
              )
          ans[cnt] = min(ans[cnt], cost)
  
          bit_ -= 1
  for i in range(N + 1):
      print(ans[i])
  
problem_description: Statement
  
  M-kun is a competitor in AtCoder, whose highest rating is X.  
  In this site, a competitor is given a _kyu_ (class) according to his/her
  highest rating. For ratings from 400 through 1999, the following kyus are
  given:
  
    * From 400 through 599: 8-kyu
    * From 600 through 799: 7-kyu
    * From 800 through 999: 6-kyu
    * From 1000 through 1199: 5-kyu
    * From 1200 through 1399: 4-kyu
    * From 1400 through 1599: 3-kyu
    * From 1600 through 1799: 2-kyu
    * From 1800 through 1999: 1-kyu
  
  What kyu does M-kun have?
samples: [{"input": "725", "output": "7\n    \n\nM-kun's highest rating is 725, which corresponds to 7-kyu.  \nThus, `7` is the correct output.\n\n* * *"}, {"input": "1600", "output": "2\n    \n\nM-kun's highest rating is 1600, which corresponds to 2-kyu.  \nThus, `2` is the correct output."}]