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 ...
随机推荐
- jQuery Growl插件(消息提醒)
ps:菜鸟教程 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <s ...
- boost-使用property_tree来解析xml、json
property_tree是一个保存了多个属性值的树形数据结构,可以用来解析xml.json.ini.info文件.要使用property_tree和xml解析组件的话需要包含"boost/ ...
- extern声明全局变量用法
在类之外声明一个成员变量,如: a.h CString name; class a{ }; a.cpp extern CString name; 然后就可以用name这个成员变量了. b.cpp ex ...
- C++之输出100-200内的素数
素数(质数) 除了1和它本身以外不再被其他的除数整除. // 输出100--200内的素数 #include<iostream> using namespace std; int m ...
- JDK 1.5、1.6 & 中文版API,J2EE5API大全(借鉴)
个人分类: Java文档 Sun 公司提供的Java API Docs是学习和使用Java语言中最经常使用的参考资料之一.但是长期以来此文档只有英文版,对于中国地区的Java开发者 ...
- 关于WEB前端,你必须了解的发展方向
一.职业方向定位 首先,只有确定好自己的职业方向,才能做好职业规划.在我看来,做WEB前端技术能够找到的职业方向有以下几种: (1)资深WEB前端工程师 这个方向算是一个WEB前端最基本的选择了,在国 ...
- javase jdk 环境变量 涵义
jdk环境变量配置:path:jdk安装所在目录下的bin路径-->因为环境变量path下放置的是操作系统执行的.exe文件,jdk中bin中放的是可执行的.exe文件,所以要把这个路径放置到p ...
- BT1120时序,可以用于自测用
module bt1120_gen #( , , , , , )( input clk, input rst_p, // input [5:0] h_sync_pixcels, // input [5 ...
- MIT molecular Biology 笔记11 位点特异性重组 和 DNA转座
位点特异性重组 和 DNA转座 视频 https://www.bilibili.com/video/av7973580/ 教材 Molecular biology of the gene 7th ed ...
- maven依赖管理
maven依赖管理 1.依赖范围 (依赖相当于java中的import 是否需要导入别的jar包) 使用控制依赖与三种classpath(编译期,测试时期,运行时期)的关系 complie ...