题目链接

水题依旧无法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的更多相关文章

  1. cf D. Broken Monitor

    http://codeforces.com/contest/370/problem/D 题意:输入一张图,上面只有两个字符'w'和‘.’ ,如果可以用一个正方形把所有的‘w’围起来,所有的‘w’都在正 ...

  2. 11g新特性:Health Monitor Checks

    一.什么是Health Monitor ChecksHealth Monitor Checks能够发现文件损坏,物理.逻辑块损坏,undo.redo损坏,数据字典损坏等等.Health Monitor ...

  3. Codeforces 846D Monitor(简单二分+二维BIT)

    D. Monitor time limit per test 2 seconds memory limit per test 256 megabytes input standard input ou ...

  4. C#各种同步方法 lock, Monitor,Mutex, Semaphore, Interlocked, ReaderWriterLock,AutoResetEvent, ManualResetEvent

    看下组织结构: System.Object System.MarshalByRefObject System.Threading.WaitHandle System.Threading.Mutex S ...

  5. API Monitor简介(API监控工具)

    API Monitor是一个免费软件,可以让你监视和控制应用程序和服务,取得了API调用. 它是一个强大的工具,看到的应用程序和服务是如何工作的,或跟踪,你在自己的应用程序的问题. 64位支持 API ...

  6. 创建 Monitor 并测试 - 每天5分钟玩转 OpenStack(124)

    前面我们创建了 Pool,VIP 并添加了 Member.今天将创建 Monitor,然后测试 LBaaS 是否能够正常工作. 创建 Monitor LBaaS 可以创建 monitor,用于监控 P ...

  7. 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 ...

  8. Guava monitor

    Guava的com.google.util.concurrent类库提供了相对于jdk java.util.concurrent包更加方便实用的并发类,Monitor类就是其中一个.Monitor类在 ...

  9. DAC Usage3:Monitor Data-tier Applications

    If you deploy a DAC to a managed instance of the Database Engine, information about the deployed DAC ...

随机推荐

  1. Shell编程基础教程4--控制流结构

    4.控制流结构    4.1.控制结构            4.2.if then else语句        格式: if 条件1 //如果条件1为真 then 命令1 //那么,执行命令1 el ...

  2. 学习SQLAlchemy Core

    有时间了就要慢慢看,死守DJANGO ORM,明显没有SQLAlchemy有优势. 因为SQLAlchemy针对整个PYTHON都是有用的. 找了本书,慢慢撸. <Essential.SQLAl ...

  3. android 入门-android Studio git 克隆

    最后是完成 以上是如何从android studio Git 克隆Github的项目

  4. RAC的QA

    RAC: Frequently Asked Questions [ID 220970.1]   修改时间 13-JAN-2011     类型 FAQ     状态 PUBLISHED   Appli ...

  5. C语言函数的读写

    文件打开关闭函数:fopen()和fclose() <FILE *fopen(char *filename, char *mode)| int fclose(FILE *fp)> 字符读写 ...

  6. MySQL5.5出面ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)问题的解决办法

    问题描述 安装完MySQL5.5数据库,使用Navicat Premium以及命令窗口连接数据库都报以下错误: ERROR 1045 (28000): Access denied for user ' ...

  7. linux常用命令和选项

    (1)比较两个文件. diff filename1 filename2 -y -W number; -y 并列格式输出 -W 并列格式输出时指定的列宽 (2)linux下抓包 tcpdump有三类关键 ...

  8. Liferay 6.2 改造系列之五:修改默认站点的页面内容

    相关页面可以通过/portal-master/portal-impl/src/portal.properties文件配置进行修改: 登录页: ## ## Default Landing Page ## ...

  9. hdu4968

    题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=4968 说是考dp,但是我没出来dp在哪,可能贪心思想更多一些吧. AC代码: #inclu ...

  10. Python入门之树莓派

    Linux命令行$+命令 pwd显示当前目录 ls列表 cd改变当前目录,/ sudo超级用户输入,特权来操作系统相关设置或删除文件 sudo apt-get  install  安装程序 sudo ...