template<class T> static inline T** alloc( size_t h, size_t w )
{
typedef T* ptr_type;
ptr_type* m;
m = new ptr_type[h];
m[0] = new T[h*w];
for(size_t i=1;i<h;i++) m[i]=m[i-1]+w;
return m;
}
template<class T> static inline void release( T** ptr )
{
if(ptr) delete[] ptr[0];
if(ptr) delete[] ptr;
}
int main()
{
}