2017 JUST Programming Contest 3.0 H. Eyad and Math
2.0 s
256 MB
standard input
standard output
Eyad was given a simple math problem, but since he is very bad at math he asked you to help him.
Given 4 numbers, a, b, c,
and d. Your task is to find whether ab is
less than cd or
not.
It is guaranteed that the two numbers above are never equal for the given input.
The first line contains an integer T (1 ≤ T ≤ 105),
where T is the number of test cases.
Then T lines follow, each line contains four integers a, b, c,
and d (1 ≤ a, b, c, d ≤ 109).
For each test case, print a single line containing "<" (without quotes), if ab is
less than cd.
Otherwise, print ">" (without quotes).
2
9 2 5 3
3 4 4 3
<
>
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
#define ll long long
const int maxn=100005;
int main()
{
// freopen("in.txt","r",stdin);
int T;
double a,b,c,d;
scanf("%d",&T);
double temp1,temp2;
while(T--)
{
scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
temp1=b*log10(a),temp2=d*log10(c);
if(temp1>=temp2)
printf(">\n");
else
printf("<\n");
}
}
2017 JUST Programming Contest 3.0 H. Eyad and Math的更多相关文章
- 2017 JUST Programming Contest 2.0 题解
[题目链接] A - On The Way to Lucky Plaza 首先,$n>m$或$k>m$或$k>n$就无解. 设$p = \frac{A}{B}$,$ans = C_{ ...
- gym101532 2017 JUST Programming Contest 4.0
台州学院ICPC赛前训练5 人生第一次ak,而且ak得还蛮快的,感谢队友带我飞 A 直接用claris的模板啊,他模板确实比较强大,其实就是因为更新的很快 #include<bits/stdc+ ...
- 2017 JUST Programming Contest 3.0 B. Linear Algebra Test
B. Linear Algebra Test time limit per test 3.0 s memory limit per test 256 MB input standard input o ...
- 2017 JUST Programming Contest 3.0 E. The Architect Omar
E. The Architect Omar time limit per test 1.0 s memory limit per test 256 MB input standard input ou ...
- gym101343 2017 JUST Programming Contest 2.0
A.On The Way to Lucky Plaza (数论)题意:m个店 每个店可以买一个小球的概率为p 求恰好在第m个店买到k个小球的概率 题解:求在前m-1个店买k-1个球再*p ...
- 2017 JUST Programming Contest 2.0
B. So You Think You Can Count? 设dp[i]表示以i为结尾的方案数,每个位置最多往前扫10位 #include<bits/stdc++.h> using na ...
- 2017 JUST Programming Contest 3.0 I. Move Between Numbers
I. Move Between Numbers time limit per test 2.0 s memory limit per test 256 MB input standard input ...
- 2017 JUST Programming Contest 3.0 D. Dice Game
D. Dice Game time limit per test 1.0 s memory limit per test 256 MB input standard input output stan ...
- 2017 JUST Programming Contest 3.0 K. Malek and Summer Semester
K. Malek and Summer Semester time limit per test 1.0 s memory limit per test 256 MB input standard i ...
随机推荐
- Codeforces554E:Love Triangles
There are many anime that are about "love triangles": Alice loves Bob, and Charlie loves B ...
- 【APUE】信号
一.信号概念 信号都被定义为正整数,不存在编号为0的信号. 信号是异步事件的经典实例.产生信号的事件对进程而言是随机出现的,进程不能简单地测试一个变量来判别是否出现了一个信号,而是必须告诉内核在此信号 ...
- Visual Studio Visual assistant注释也做拼写检查怎么办
1 打开Visual Assistant 2 在Advanced中找到Underlines,取消勾选"Underline spelling errors in comments and ...
- 从PRISM开始学WPF(一)WPF?
从PRISM开始学WPF(一)WPF? 我最近打算学习WPF ,在寻找MVVM框架的时候发现了PRISM,在此之前还从一些博客上了解了其他的MVVM框架,比如浅谈WPF中的MVVM框架--MVVM ...
- Sublime Text 3设置吊炸天PHP开发环境
@heiyeluren @created: 2016/5/31 @last modify: 2016/7/8 1. 下载安装Sublime Text 3 http://www.sublimetext. ...
- Python开发【1.1 基础语法】
1.Python语言特点 优点: ①.丰富的库 ②.简单.开源 ③.支持面向对象编程 ④.解释性语言,无需编译 ⑤.高层语言,不用考虑内存问题 ⑥.可移植性好,不依赖于操作系统 缺点: ①.运行效率较 ...
- web 开发之js---ajax 中的两种返回状态 xmlhttp.status和 xmlhttp.readyState
(1)xmlhttp.status xmlHttp.status的值(HTTP状态表)0**:未被始化 1**:请求收到,继续处理 2**:操作成功收到,分析.接受 3**:完成此请求必须进一步处理 ...
- STL_算法_元素计数(count、count_if)
C++ Primer 学习中.. . 简单记录下我的学习过程 (代码为主) count . count_if #include<iostream> #include<cstdio&g ...
- web框架和Django框架的初识
1,web框架的原理 1.1>c/s架构和b/s架构 1>c/s客户端模式 2>B/S浏览器模式-----web开发(web开发开的是B/S架构) 1.2>web开发的本质 1 ...
- Ubuntu grub2的启动配置文件grub.cfg,为了修改另人生厌的时间
文章转自http://hi.baidu.com/detax/blog/item/90f18b54a8ef5253d00906e4.html 升级到Ubuntu 9.10后,就要接触grub2了,它和以 ...