UVA 573 蜗牛
来源:互联网 发布:债券数据 编辑:程序博客网 时间:2024/05/01 23:00
还是简单题做着舒服。。
#include <iostream>#include <sstream>#include <cstdio>#include <cstring>#include <cmath>#include <string>#include <vector>#include <set>#include <cctype>#include <algorithm>#include <cmath>#include <deque>#include <map>using namespace std;///#define INF 0xffffff7#define MAXN 200 ///double H, U, D, F;//H是墙的高度, U是白天爬的高度, D是晚上下降的高度, F是疲劳因子int main(){///int i, j;while (1){cin >> H >> U >> D >> F;if (H == 0)break;int days(0);bool flag(0);double climbH(0);double reduce(U);while (1){days++;climbH += U;if (climbH > H){flag = true;break;}climbH -= D;if (climbH < 0)break;U -= F / 100 * reduce;if (U <= 0)U = 0;}if (flag)printf("success on day %d\n", days);elseprintf("failure on day %d\n", days);} /// return 0;}
- UVA 573 蜗牛
- UVa 573 蜗牛
- UVa 573 The Snail(蜗牛)
- HDOJ 1302(UVa 573) The Snail(蜗牛爬井)
- 蜗牛
- 蜗牛
- 蜗牛
- 蜗牛
- 蜗牛
- 蜗牛
- 蜗牛 (歌词)
- 蜗牛 (洪战辉)
- 蜗牛计划
- 蜗牛漫步
- 蜗牛 1
- UVA573-蜗牛
- 蜗牛精神
- 蜗牛快跑
- FullCalendar(日程管理控件)
- 50条狗中有多少条病狗?
- HDU 2105 The Center of Gravity
- 五大开源游戏引擎介绍
- JSP
- UVA 573 蜗牛
- 使用QUiLoader来动态加载.ui文件
- QUiLoader:彻底分离你的Ui设计工作(含例子)
- Android入门(5)最简单的Handler例子
- S5PV210 WinCE6.0 使用双通道512MmDDR(256mx2)
- Qt探秘——谈ui文件的用法
- vmware和windows共享文件
- Qt Ui 头文件研究
- 听Max Levchin教你三步拿下市场