CF 16C. Monitor
水题依旧无法1Y。
#include <cstdio>
#include <iostream>
#include <cmath>
using namespace std ;
#define LL __int64
LL gcd(LL a,LL b)
{
return b == ?a:gcd(b,a%b);
} int main()
{
LL a,b,x,y,t;
LL str,end,mid;
scanf("%I64d%I64d%I64d%I64d",&a,&b,&x,&y);
t = gcd(x,y);
x = x/t;
y = y/t;
if(x > a||y > b)
{
printf("0 0\n");
return ;
}
str = ;
end = a/x;
while(str < end)
{
mid = (str+end + )/;
if(mid*x > a||mid*y > b)
end = mid - ;
else
str = mid;
}
printf("%I64d %I64d\n",end*x,end*y);
return ;
}
CF 16C. Monitor的更多相关文章
- cf D. Broken Monitor
http://codeforces.com/contest/370/problem/D 题意:输入一张图,上面只有两个字符'w'和‘.’ ,如果可以用一个正方形把所有的‘w’围起来,所有的‘w’都在正 ...
- 11g新特性:Health Monitor Checks
一.什么是Health Monitor ChecksHealth Monitor Checks能够发现文件损坏,物理.逻辑块损坏,undo.redo损坏,数据字典损坏等等.Health Monitor ...
- Codeforces 846D Monitor(简单二分+二维BIT)
D. Monitor time limit per test 2 seconds memory limit per test 256 megabytes input standard input ou ...
- C#各种同步方法 lock, Monitor,Mutex, Semaphore, Interlocked, ReaderWriterLock,AutoResetEvent, ManualResetEvent
看下组织结构: System.Object System.MarshalByRefObject System.Threading.WaitHandle System.Threading.Mutex S ...
- API Monitor简介(API监控工具)
API Monitor是一个免费软件,可以让你监视和控制应用程序和服务,取得了API调用. 它是一个强大的工具,看到的应用程序和服务是如何工作的,或跟踪,你在自己的应用程序的问题. 64位支持 API ...
- 创建 Monitor 并测试 - 每天5分钟玩转 OpenStack(124)
前面我们创建了 Pool,VIP 并添加了 Member.今天将创建 Monitor,然后测试 LBaaS 是否能够正常工作. 创建 Monitor LBaaS 可以创建 monitor,用于监控 P ...
- ORA-00494: enqueue [CF] held for too long (more than 900 seconds) by 'inst 1, osid 5166'
凌晨收到同事电话,反馈应用程序访问Oracle数据库时报错,当时现场现象确认: 1. 应用程序访问不了数据库,使用SQL Developer测试发现访问不了数据库.报ORA-12570 TNS:pac ...
- Guava monitor
Guava的com.google.util.concurrent类库提供了相对于jdk java.util.concurrent包更加方便实用的并发类,Monitor类就是其中一个.Monitor类在 ...
- DAC Usage3:Monitor Data-tier Applications
If you deploy a DAC to a managed instance of the Database Engine, information about the deployed DAC ...
随机推荐
- DedeCMS Error: (PHP 5.3 and above) Please set request_order
部分使用PHP 5.3的主机可能会有下面的提示: (PHP 5.3 and above) Please set 'request_order' ini value to include C,G and ...
- jQuery Mobile学习之grid、等待显示的ajax效果、页面跳转、页面跳转传递参数等(二)
Index.cshtml <!-- Start of second page --> <section data-role="page" id="bar ...
- 【131031】struts 1 中 <html:form>
<DIV>来看看 使用 ActionForm 这个主题,当时使用了一个静态表单网页:<BR>* form.htm<BR><BR><BR>&l ...
- 手机web页面制作时的注意事项
一.手机页面的标准头规范 字符编码使用utf-:指定页面手机内存缓存中的存储时间段 device-width:通知浏览器使用设备的宽度作为可视区的宽度 initial-scale - 初始的缩放比例 ...
- [Oracle] PL/SQL学习笔记
-- 1. 使用一个变量 declare -- Local variables here v_name ); begin -- Test statements here select t.user_n ...
- EF Core 1.0中使用Include的小技巧
(此文章同时发表在本人微信公众号"dotNET每日精华文章",欢迎右边二维码来关注.) 题记:由于EF Core暂时不支持Lazy Loading,所以利用Include来加载额外 ...
- 自己动手写RTP服务器——关于RTP协议
转自:http://blog.csdn.net/baby313/article/details/7353605 本文会带领着你一步步动手实现一个简单的RTP传输服务器,旨在了解RTP流媒体传输协议以及 ...
- 安装wine的问题
- 关于Application Insights遥测功能使用【遇到问题】
简介:Application Insights是微软发布的一个在线服务,可以监测自己的网站应用,进行性能管理以及使用分析. Application Insights功能一开始是出现在Visualstu ...
- .NET中的六个重要概念:栈、堆、值类型、引用类型、装箱和拆箱
为何要翻译 一来是为了感受国外优秀技术社区知名博主的高质量文章,二来是为了复习对.NET技术的基础拾遗达到温故知新的效果,最后也是为了锻炼一下自己的英文读写能力.因为是首次翻译英文文章(哎,原谅我这个 ...