cf C. Cupboard and Balloons
2014-08-17 20:14
309 查看
http://codeforces.com/contest/342/problem/C
View Code
#include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; __int64 r,h; int main() { while(scanf("%I64d%I64d",&r,&h)!=EOF) { __int64 t2=(h/r)*2; if((h%r)*2<r) t2++; else if((h%r)*2>=sqrt(3.0)*r) t2+=3; else t2+=2; printf("%I64d\n",t2); } return 0; }
View Code
相关文章推荐
- cf 342C - Cupboard and Balloons(计算几何)
- 【模拟】Cupboard and Balloons
- Codeforces Round #199 (Div. 2) C. Cupboard and Balloons
- CodeFroces342 C. Cupboard and Balloons
- Codeforces Round #199 (Div. 2) C. Cupboard and Balloons
- Codeforces Round #199 (Div. 2) C. Cupboard and Balloons(数学)
- Codeforces Round #199 (Div. 2) -- C. Cupboard and Balloons (数学)
- codeforces #199 C. Cupboard and Balloons 题解
- Codeforces Round #199 (Div. 2) C. Cupboard and Balloons
- Codeforces Round #403 (Div. 2) C. Andryusha and Colored Balloons
- Codeforces Round #403 (Div. 2) C. Andryusha and Colored Balloons
- 【贪心】【DFS】Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) C. Andryusha and Colored Balloons
- CodeForces - 782 C Andryusha and Colored Balloons(搜索)
- Codeforces Round #403 (Div. 2) C. Andryusha and Colored Balloons(DFS 邻接表 数据结构)
- CodeForces 780C Andryusha and Colored Balloons【DFS】
- Codeforces Round #403 C. Andryusha and Colored Balloons(DFS)
- C. Andryusha and Colored Balloons
- Codeforces 780C-Andryusha and Colored Balloons
- Codeforces Round #403 (Div. 2)C Andryusha and Colored Balloons (dfs)
- Codeforces Round #403 div2 C. Andryusha and Colored Balloons