#include <cstdio>
#include <iostream>
#include <algorithm>
#include <queue>
#include <set>
#include <cmath>
#define LL long long
#define print(k) cout<<#k"="<<k<<endl;
using namespace std;
struct State
{
LL state,step;
};
struct Block
{
LL l,c;
bool t;
}block[20];
LL n,red;
inline LL getr(LL x,LL k)
{
return (x&(7LL<<k*3))>>k*3;
}
inline bool check(LL x,LL k1,LL k2)
{
if(getr(x,k1)>=getr(x,k2))......
阅读全文