#include using namespace std; struct Rect{ int64_t x,y,w,h; bool operator<(Rect const &a)const{ return make_tuple(x,y,w,h) &res,mt19937_64 &twist){ priority_queue> todo; todo.emplace(INT64_MAX,bound); assert(n); assert(n<=bound.w*bound.h); while (res.size()+todo.size()>res); return res; } int main(int argc,char **argv){ if (argc!=3 and argc!=5){ cerr<<"Usage: "< res; generate(n,Rect{0,0,width,height},res,twist); shuffle(res.begin(),res.end(),twist); bool mutate=(twist()%2); if (mutate){ for (int z=4; z--;){ int id=twist()%n; switch (twist()%4){ case 0: res[id].x+=(twist()%2)*2-1; break; case 1: if (res[id].w!=1) res[id].w+=(twist()%2)*2-1; break; case 2: res[id].y+=(twist()%2)*2-1; break; case 3: if (res[id].h!=1) res[id].h+=(twist()%2)*2-1; break; } } } cout<