mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 5872_kopyh.cpp
From http://blog.csdn.net/kopyh/article/details/52496579
This commit is contained in:
parent
a39f9ac3db
commit
038880cfb5
22
HDOJ/5872_kopyh.cpp
Normal file
22
HDOJ/5872_kopyh.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
//kopyh
|
||||
#include <bits/stdc++.h>
|
||||
#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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user