Toyota Programming Contest 2023#7(AtCoder Beginner Contest 328)G. Cut and Reorder(状压dp)
题目长为n(nusingnamespacestd;#definerep(i,a,b)for(inti=(a);i=(b);--i)typedeflonglongll;typedefdoubledb;typedefpairP;#definefifirst#definesesecond#definepbpush_back#definedbg(x)cerr>j&1;}intmain(){sci(n),s