Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

 
 
 
 
General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
7183828 Practice:
ejq
449A - 40 GNU C++ Accepted 46 ms 8 KB 2014-07-20 09:47:42 2014-07-20 09:47:42
→ Source
#include <bits/stdc++.h>
using namespace std;
long long n,m,k;
long long cut(long long x,long long y)
{
//	if (y==0)
//		return x;
	return x/(y+1);
}
long long tri()
{
	long long l,r,tl,tr;
	l=max(0ll,k-(m-1));r=min(n-1,k);
	return max(cut(n,l)*cut(m,k-l),cut(n,r)*cut(m,k-r));
}
int main()
{
	cin>>n>>m>>k;
	if ((n-1)+(m-1) < k)
	{
		printf("-1\n");
		return 0;
	}
	cout<<tri()<<endl;
	return 0;
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details