#hokudaihitachi2018c. [hokudai_hitachi2018_c]Problem Setting C

[hokudai_hitachi2018_c]Problem Setting C

Notification

In case equations are not displayed properly, we recommend taking a look at the new AtCoder system.

Problem Setting

The task in problem setting C is almost equivalent to problem setting A. Hence, for details on the task the contestant is refered to problem setting A. The only difference in Problem C is the shape of the higher order pseudo-Boolean function which serves as an input. This input will now have degree at most 6 (d=6d=6), while coefficients are provided for all possible terms of the function. For details of the input problem contestants are referred to the section below.


Input Format

The following requirements shall be imposed on the input problem.

  • 3leqNleq103 \\leq N \\leq 10
  • 1leqKleq2N1 \\leq K \\leq 2^N
  • 0leqdileq60 \\leq d_i \\leq 6
  • 1leqleftcirightleq1001 \\leq \\left|c_i \\right| \\leq 100
  • 1leqvi,jleqN1 \\leq v_{i, j} \\leq N
  • For all jj (1leqjltdi)(1 \\leq j \\lt d_i) we require vi,j<vi,j+1v_{i, j} < v_{i, j+1}
  • For two lines i,ji,j with ineqji \\neq j we require $\\left\[ v_{i, 1}, \\dots , v_{i, d_i} \\right\] \\neq \\left\[ v_{j, 1}, \\dots, v_{j, d_j} \\right\]$, i.e., two separate lines shall not encode the same type of monomial.
  • The line di=0d_i = 0 should not exceed beyond the coefficient.
  • All of the variables kk (1leqkleqN)(1 \\leq k \\leq N) should appear in at least one of the term, i.e., there exists at least one vi,jv_{i,j} such that k=vi,jk = v_{i, j}.