⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 black.cpp

📁 Ulm大学2007年竞赛题和解题报告
💻 CPP
字号:
// Author: Adrian Kuegel// Date: 4. 6. 2007#include <stdio.h>#include <assert.h>#define MAXN 40000int main() {	int n, m, c;	freopen("black.in","r",stdin);	while(scanf("%d %d %d",&n,&m,&c) == 3 && (n || m || c)) {		assert(n >= 8 && n <= MAXN && m >= 8 && m <= MAXN && c >= 0 && c <= 1);		// lets first ignore the colour constraint		n -= 7; // number of possible rows for bottom right corner		m -= 7; // number of possible columns for bottom right corner		// one half of those n * m fields are white		// round up if bottom right corner of painting is white		printf("%d\n",(n*m+c)/2);	}	assert(n == 0 && m == 0 && c == 0);	return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -