#includeusing namespace std; int main() { int n, m, c; while(cin >> n >> m >> c) { if (n == 0 && m == 0 && c == 0) { break; } if(n < 8 || m < 8) { cout << 0 << endl; continue; } if(n % 2 != 0 || m % 2 != 0) { if (c >= 1) { cout << (m - 7) * (n - 7) / 2 << endl; continue; } else { cout << (m - 7) * (n - 7) / 2 << endl; continue; } } else { if(c >= 1) { cout << (m - 8) * (n - 8) / 2 + 1 + (n - 8) / 2 + (m - 8) / 2 << endl; continue; } else { cout << (n - 8) * (m - 8) / 2 + (n - 8) / 2 + (m - 8) / 2 << endl; } } } }
부어어어어
귀차니즘.
'Solutions > Dlbo's Solution' 카테고리의 다른 글
PKU 3074. Sudoku. AC get -_- (1) | 2011.08.11 |
---|---|
UVa 628. Passwords. AC g~e~t~ (0) | 2011.04.06 |
PKU 3132. Sum of Different primes. AC get -_- (0) | 2011.03.19 |
PKU 2291. Rotten Ropes. AC get -_-! (0) | 2011.03.14 |
PKU 2181. Jumping Cows -_- AC get (2) | 2011.03.06 |