From 038880cfb54e7c7e7d90b097641d8cf8f1f7871a Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Tue, 13 Sep 2016 04:37:39 +0800 Subject: [PATCH] Create 5872_kopyh.cpp From http://blog.csdn.net/kopyh/article/details/52496579 --- HDOJ/5872_kopyh.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 HDOJ/5872_kopyh.cpp diff --git a/HDOJ/5872_kopyh.cpp b/HDOJ/5872_kopyh.cpp new file mode 100644 index 0000000..2bfc47e --- /dev/null +++ b/HDOJ/5872_kopyh.cpp @@ -0,0 +1,22 @@ +//kopyh +#include +#define INF 0x3f3f3f3f +#define MOD 1000000007 +#define N 1123456 +using namespace std; +long long n,m,sum,res,flag; +int main() +{ + #ifndef ONLINE_JUDGE + freopen("test.txt","r",stdin); + #endif + long long i,j,cas,T,t,x,y,z,h,l,k; + while(scanf("%I64d%I64d%I64d",&h,&l,&k)!=EOF) + { + x=k/h;//最大人数时一排几个部门 + y=k/(x+1);//多放一个部门时每个部门最多的人数 + res=y+1;//加一个人保证不能多放一个部门 + printf("%I64d\n",l/(k-k%res)+bool(l%(k-k%res)));//ok + } + return 0; +}