//area=(n*m)/ ((x+1)*(k-x+1))
//1: x==0;
//2: x=n-1
//3: x=m-1
# include <stdio.h>
long long max(long long x,long long y)
{
return x>y? x:y;
}
int main()
{
long long n,m,k,sum,t,ans;
scanf("%lld%lld%lld",&n,&m,&k);
sum=n+m-2;
if(k>sum)
printf("-1\n");
else if(sum==k)
printf("1\n");
else
{
ans=0;
if(n>=k+1)//x=0
{
ans=max(ans,m*(n/(k+1)));
}
else//x=n-1
{
t=k-n+2;
ans=max(ans,m/t);
}
if(m>=k+1)//x=0
{
ans=max(ans,n*(m/(k+1)));
}
else//x=m-1
{
t=k-m+2;
ans=max(ans,n/t);
}
printf("%lld\n",ans);
}
return 0;
}

版权声明:本文博主原创文章,博客,未经同意不得转载。

Codeforces 450 C. Jzzhu and Chocolate的更多相关文章

  1. Codeforces 450C:Jzzhu and Chocolate(贪心)

    C. Jzzhu and Chocolate time limit per test: 1 seconds memory limit per test: 256 megabytes input: st ...

  2. codeforces 450 B Jzzhu and Sequences

    题意:给出f1=x,f2=y,f(i)=f(i-1)+f(i+1),求f(n)模上10e9+7 因为 可以求出通项公式:f(i)=f(i-1)-f(i-2) 然后 f1=x; f2=y; f3=y-x ...

  3. 【Codeforces 449A】Jzzhu and Chocolate

    [链接] 我是链接,点我呀:) [题意] 题意 [题解] 设最后行分成了x行,列分成了y列. 那么答案就是floor(n/x)floor(n/y) 然后x+y-2=k //即平均分配x行.y列 我们可 ...

  4. Codeforces Round #257 (Div. 1)449A - Jzzhu and Chocolate(贪婪、数学)

    主题链接:http://codeforces.com/problemset/problem/449/A ------------------------------------------------ ...

  5. Codeforces Round #257 (Div. 2) C. Jzzhu and Chocolate

    C. Jzzhu and Chocolate time limit per test 1 second memory limit per test 256 megabytes input standa ...

  6. CodeForces 450

    A - Jzzhu and Children Time Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & % ...

  7. cf 450c Jzzhu and Chocolate

    Jzzhu and Chocolate time limit per test 1 second memory limit per test 256 megabytes input standard ...

  8. codeforces 450C. Jzzhu and Chocolate 解题报告(449A)

    题目链接:http://codeforces.com/contest/450/problem/C 题目意思:给出一个 n * m 大小的chocolate bar,你需要在这个bar上切 k 刀,使得 ...

  9. codeforces C. Jzzhu and Chocolate

    http://codeforces.com/contest/450/problem/C 题意:一个n×m的矩形,然后可以通过横着切竖着切,求切完k次之后最小矩形面积的最大值. 思路:设k1为横着切的次 ...

随机推荐

  1. javascript推断的浏览器类型

    <script> window["MzBrowser"]={};(function() { if(MzBrowser.platform) return; var ua ...

  2. NET MVC异常处理模块

    一个简单的ASP.NET MVC异常处理模块   一.前言 异常处理是每个系统必不可少的一个重要部分,它可以让我们的程序在发生错误时友好地提示.记录错误信息,更重要的是不破坏正常的数据和影响系统运行. ...

  3. mvc图片地址

    System.Web.HttpContext.Current.Server.MapPath(@"~\Images\radio1.png");

  4. 批处理bat脚本编写(附详细例子)

                                                        批处理bat脚本编写(附详细例子) 由于在项目开发的过程中经常需要编写bat脚本,而看大牛们编写 ...

  5. lunix shell 基础经常使用整理

     1   ps  -ef    显示正在执行的进程,pid 等信息  UID PID PPID C STIME TTY TIME CMD root 1 0 0 03:45 ? 00:00:02 ini ...

  6. android 中国通信乱码问题

    1.要解决中文乱码问题.首先得了解什么是字符编码 计算机要处理各种字符,就须要将字符和二进制内码相应起来,这样的相应关系就是字符编码. 要制定字符编码首先要确定字符集,并将 字符集内的字符排序.然后和 ...

  7. win7/win8通过媒体流(DLNA技术)共享音乐照片和视频

    http://www.jb51.net/os/windows/79421.html 工具/原料 Windows 7/8/10家庭高级版以上版本 家庭WiFi局域网(无须连接互联网) 支持DLNA的手机 ...

  8. 经excel要将数据库(ORACLE)要插入数据

    大家都知道PL/SQL可以excel数据复制.我们也可以通过相同excel将数据插入到数据库. 下面我们就来简单的样品,并与主题演示 首先,我们创建了一个表test CREATE TABLE test ...

  9. Oracle trunc()函数

    Oracle trunc()函数的用法   --Oracle trunc()函数的用法/**************日期********************/1.select trunc(sysd ...

  10. 乐在其中设计模式(C#) - 策略模式(Strategy Pattern)

    原文:乐在其中设计模式(C#) - 策略模式(Strategy Pattern) [索引页][源码下载] 乐在其中设计模式(C#) - 策略模式(Strategy Pattern) 作者:webabc ...