#include #define REP(i,x) for(int i=0,i##_len=(x);i>x>>y>>h; assert(1<=x&&x<=MAX); assert(1<=y&&y<=MAX); assert(1<=h&&h<=1000); }