poj 3364(水题,找规律)


#include
using namespace std;
int n,m,c;
int main(){
    while(scanf("%d%d%d",&n,&m,&c)==3&&n){
        int result = 0;
        int i = n;
        while(i>=8){
            int j = m;
            if(c!=1)j--;
            if(j>=8)result += (j-8)/2+1;
            c = 1-c;
            i--;
        }
        printf("%d\n",result);
    }
    return 0;
}