二分!!!
AC代码例如以下:
#include#include #include #define ll long longusing namespace std;ll n,m,k;ll work(ll a){ ll i,j; ll ans=0; for(i=1;i<=n;i++) { j=a/i; if(j>m) j=m; ans+=j; } return ans;}int main(){ scanf("%I64d%I64d%I64d",&n,&m,&k); ll l,r,mid; l=1; r=n*m+1; while(l