POJ 2707
#include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std; int main()
{
//freopen("acm.acm","r",stdin);
int min_ele(int a,int b);
//copy(istream_iterator<int>(cin),istream_iterator<int>(),back_inserter(coll));
int a,b,c,d;
while(cin>>a>>b>>c>>d)
{
if(!a&&!b&&!c&&!d)
break; if(a > b)
swap(a,b);
if(c > d)
swap(c,d);
if(a <= c && b <= d)
{
cout<<<<"%"<<endl;
}
else
{
cout<<min_ele(int(double(c)/double(a)*),int(double(d)/double(b)*));
cout<<"%"<<endl;
}
}
}
int min_ele(int a,int b)
{
if(a > b)
return b;
else
return a;
}
POJ 2707的更多相关文章
- Poj 2707 Copier Reduction
1.Link: http://poj.org/problem?id=2707 2.Content: Copier Reduction Time Limit: 1000MS Memory Limit ...
- poj和hdu部分基础算法分类及难度排序
最近想从头开始刷点基础些的题,正好有个网站有关于各大oj的题目分类(http://www.pythontip.com/acm/problemCategory),所以写了点脚本把hdu和poj的一些题目 ...
- POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理
Halloween treats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7644 Accepted: 2798 ...
- POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7192 Accepted: 3138 ...
- POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22286 ...
- POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37427 Accepted: 16288 Descr ...
- POJ 3254. Corn Fields 状态压缩DP (入门级)
Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 9806 Accepted: 5185 Descr ...
- POJ 2739. Sum of Consecutive Prime Numbers
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20050 ...
- POJ 2255. Tree Recovery
Tree Recovery Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11939 Accepted: 7493 De ...
随机推荐
- top k问题
1.top k问题 在海量数据处理中,经常会遇到的一类问题:在海量数据中找出出现频率最高的前k个数,或者从海量数据中找出最大的前k个数,这类问题通常被称为top K问题.例如,在搜索引擎中,统计搜索最 ...
- HTMLDocument的变化
H5扩展了一些新的功能 1.readyState 属性的两个属性值 loading 正在加载文档 complete 已经加载完文档 可以根据对象的状态触动触发函数 2.兼容模式 IE6开始区分渲染页面 ...
- AIX nfs简单说明
AIX 系统 NFS设置 一.NFS守护进程:NFS是通过使用许多用户级的守护进程及远程过程调用等网络应用程序来实现的.而NFS服务器及客户端的守护进程并不完全一致. 1. 作为NFS服务器所需的守护 ...
- 原生JS一些操作
很久没写原生的JS了,上周做了一个小东西让我又重新了解了一下原生JS,以下记录一些常见的原生JS var canvArrow = document.getElementById('js-canv_ar ...
- 绑定弹窗事件最好的方法,原生JS和JQuery方法
使用jQuery ui = { $close: $('.close') , $pop: $('.pop') , $topopBtn: $('.topop-btn') , $popbtnArea: $( ...
- C++中的public、protected 及 private 用法
首先需要明白几点: 1,类的一个特性就是封装,public 和 private 作用就是实现这一目的的. 用户代码(类外)可以访问public成员而不能访问private成员:private成员只能由 ...
- POJ 1191棋盘分割问题
棋盘分割问题 题目大意,将一个棋盘分割成k-1个矩形,每个矩形都对应一个权值,让所有的权值最小求分法 很像区间DP,但是也不能说就是 我们只要想好了一个怎么变成两个,剩下的就好了,但是怎么变,就是变化 ...
- poj1573模拟
Robot Motion Time Limit: 1000 MS Memory Limit: 10000 KB 64-bit integer IO format: %I64d , %I64u Java ...
- EBS 多sheet页Excel动态报表开发过程
http://zhangzhongjie.iteye.com/blog/1779891 .前言本文讲述的多Sheet页EXCEL报表开发方式和开发HTML,PDF这类报表的方法大致是一致的,唯一不同的 ...
- how can I make the login form transparent?
This is how you can make the Login Form transparent: 1. Add this css to Server Module-> Custom cs ...