ref #include <iostream> #include <cstring> #include <cstdio> using namespace std; typedef long long ll; int a[15]; ll u, v, dp[11][11][11][2][2][2][2]; //[算当前剩几位][当前最大可用][上一位是啥][是否slj][上一位是否=上上一位][有无4][有无8] ll f(int now, int lim, int lst…
k-d tree 裸题------ #include <algorithm> #include <iostream> #include <cstdio> using namespace std; typedef long long ll; int n, k, rot, nowD, din; ll dui[205]; const ll oo=9e18; struct Point{ int d[2], mn[2], mx[2], l, r; int & operat…