CF330A Cakeminator

题目描述

给你一个矩形蛋糕,表示为r×c网格。每个网格都可能有一个邪恶的草莓或者没有。例如,3×4蛋糕可能如下所示:【见图】 cakeminator将要吃蛋糕啦!每次他吃东西,他都会选择一个不含任何邪恶草莓的行或列,并且至少包含一个以前没有吃过的蛋糕,并吃掉那一行或列的所有蛋糕。他可能会吃多次。 请输出cakeminator可以吃的最大蛋糕数。

输入格式

第一行包含两个整数r和c(2

输出格式

输出蛋糕机可以吃的最大蛋糕数。

说明/提示

For the first example, one possible way to eat the maximum number of cake cells is as follows (perform 3 eats). ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF330A/0035a5baa4607fda858367e26d648e7cd9060209.png) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF330A/80ef8e9dfce64ea540dd8ed8ccc87f198767a450.png) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF330A/5e46cc0b99dbddca73974f8f01c7991db48fc22e.png)