//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. 小猪的Android入门之路 Day 4 - part 1

    小猪的Android入门之路 Day 4 - part 1 Android事件处理机制之--基于监听的事件处理机制 本节引言: 在開始本个章节前,我们先回想下,如今我们已经知道了android的一些相 ...

  2. hadoop-1.1.2 在Windows环境下的部署

    1:先安装Cygwin 参考http://blog.csdn.net/wind520/article/details/9223003 2:下载 3:解压在C:\cygwin\hadoop1 4:配置 ...

  3. List Set Map用法和区别

    List,Set,Map是否继承自Collection接口? 答:List,Set是,Map不是.如图: Collection ├List │├LinkedList │├ArrayList │└Vec ...

  4. ImportError with IronPython in C#

    I was using IronPython to execute python code inside my C# implementation lately, and I encountered ...

  5. HTML5_表单元素

    <!DOCTYPE html> <hmtl> <html  lang="zh-cn"> <head> <meta charse ...

  6. 删CentOS / RHEL库和配置文件(Repositories and configuraiton files)

    1 删除库简介 随着root权限执行以下的命令: # cd /etc/yum.repos.d/ 列出全部库(repo) #ls CentOS-Base.repo epel.repo mirrors-r ...

  7. jquery 判断当前上传文件大小限制上传格式 搭配thinkphp实现上传即预览(模拟异步上传)

    在web开发中,最纠结的一项就是文件上传,最近由于项目需要前后摸索了四天在这里分享给大家.如有不足,望指出!! 前台:jquery.easyui.html 后台:thinkphp 主要涉及语言:jqu ...

  8. 【转】HLSL基础

    原文地址http://blog.csdn.net/chpdirect1984/article/details/1911622 目录 前言 1.HLSL入门 1.1什么是着色器 1.2什么是HLSL 1 ...

  9. unity3d中让物体显示和隐藏

    unity3d中让物体显示和隐藏的方法 gameObject.renderer.enabled //是控制一个物体是否在屏幕上渲染或显示  而物体实际还是存在的 仅仅是想当于隐身 而物体本身的碰撞体还 ...

  10. HDU 3829 Cat VS Dog

    题意: p个人  每一个人有喜欢和讨厌的动物  假设选出的动物中包括这个人喜欢的动物同一时候不包括他讨厌的动物那么这个人会开心  问  最多几个人开心 思路: 二分图最大独立集  利用人与人之间的冲突 ...