poj 2673 Kicc Wants to Move a Mountain! 模拟水题
来源:互联网 发布:编程需要英语吗 编辑:程序博客网 时间:2024/06/05 21:23
//poj 2673//sep9#include <iostream>using namespace std;int main(){int t,x,m,d=INT_MAX;scanf("%d%d%d",&t,&x,&m);if(m==0){printf("%d",t*x);return 0;}while(m--){int a,b;scanf("%d%d",&a,&b);d=min(d,(a-1)/b);}if(d<1){printf("0");return 0;}int ans=0;if(t<=d){ans=t*x;}else{t-=d;ans+=d*x;t=t/2;ans+=t*x;}printf("%d",ans);return 0;}
0 0
- poj 2673 Kicc Wants to Move a Mountain! 模拟水题
- Average Developer who wants to become a world class developer ?
- The plan for junior who wants to be a postgraduate
- Who.Wants.To.Be.A.Millionaire.v1.6.1.
- List wants to travel
- hdu5893List wants to travel
- Move vim cursor to a specific column
- What would be your advice to a software engineer who wants to learn machine learning?
- poj 3103 Cutting a Block 模拟水题
- TOJ 4081 God Le wants to know the directory(模拟)
- Paul Glen: Nobody wants you to be a technology vending machine
- Lord don't move that mountain
- hdu5893 List wants to travel
- How to move ASM spfile to a different disk group
- How to move ASM spfile to a different disk group
- POJ - 3846 Mountain Road
- A. Mountain Scenery
- How To Move Or Rebuild A Lob Partition
- 解决下拉菜单被下方焦点图覆盖问题
- Boost源码学习三[实用工具](1)
- 给论文加超过10的圆形脚注
- Android中的Selector的使用方法
- Servlet中文参数乱码问题
- poj 2673 Kicc Wants to Move a Mountain! 模拟水题
- mssql有趣的注入
- 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”
- zookeeper能干什么
- tolua总结(一)
- 鸟哥的Linux私房菜(基础篇)-第二章、 Linux 如何学习(二.2. 鸟哥的Linux苦难经验全都录)
- 工作中遇到的问题一
- 使用ios调用web Service成功案例
- hadoop开发环境搭建