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 ...
随机推荐
- CHAPITRE II
J'ai ainsi vécu seul, sans personne avec qui parler véritablement, jusqu'à une panne[pan][机]故障 dans ...
- error C2065: 'IDD_DIALOG1' : undeclared identifier
添加资源文件 #include "resource.h"
- python3 print函数的用法
1. 输出字符串 >>> strHello = 'Hello World' >>> print (strHello) Hello World 2. 格式化输出整数 ...
- mysql-libs版本冲突卸载不了
问题: 卸载mysql-libs时候出现如下依赖性无法卸载 [root@mail yum.repos.d]# rpm -e mysql-libserror: Failed dependencies: ...
- 新建maven遇到的错误
新建一个maven,遇到错误如下: Description Resource Path Location Type Dynamic Web Module 3.0 requires Java 这时候,只 ...
- VGA的行场时序
之前碰到接收VGA时有的电脑可以有的电脑会出现画面偏移. 先来了解下数字显示器时序(DMT) DMT视频时序有四种: (1)Positive H & Positive V Syncs 行同步为 ...
- day3用户交互,格式化输出,数据类型,流程控制
上节课复习: 1.运行python程序的三步骤:python test.py 1.先启动python解释器 2.将test.py的内容当作普通的字符读入内存 3.python解释器解释执行刚刚读入内存 ...
- 20180705 fragment
https://www.cnblogs.com/chaowang/p/6180825.html https://blog.csdn.net/xxkalychen/article/details/537 ...
- la3890(半平面交)
蓝书半平面交例题 #include<iostream> #include<cstring> #include<cmath> #include<cstdio&g ...
- C#期末大作业 消消乐 2017-06-01 18:11 275人阅读 评论(0) 收藏
邻近期末,忙于刷题之余意识到期末大作业来不及了,匆匆赶下了作业,虽说做的很是粗糙,但完全原创的 下载链接 https://pan.baidu.com/s/1cCNLr4 大体的做大约3天完成了: 第一 ...