SRM564 Div1 Easy'(250) KnightCircuit2
要は、あるマスから到達可能な最大のマス数を返せば良い。
class KnightCircuit2{public: int maxSize( int w, int h ) { if ( w==1 ) return 1; if ( w==2 ) return (h+1)/2; if ( h==1 ) return 1; if ( h==2 ) return (w+1)/2; if ( w==3 && h==3 ) return 8; return w*h; }};