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 ...
随机推荐
- wikioi 2147 bitset+map解决
题目描写叙述 Description 小明是一名天文爱好者,他喜欢晚上看星星.这天,他从淘宝上买下来了一个高级望远镜.他十分开心.于是他晚上去操场上看星星. 不同的星星发出不同的光,他的望远镜能够计算 ...
- SQLite Expert表分离和解决SQLite Expert删除表后大小不变的问题
最后要使用到号码归属地的查询,在网上找到一个数据库文件.大小有12M多,压缩成zip也有1.9M,这样对于一个apk的大小非常不利,后来看了一下数据库的内容,发现有非常多冗余.特别是中文字符占用非常大 ...
- jquery获取input值的各种情况
jQuery获取多种input值的方法 获取input的checked值是否为true: 第一种: if($("input[name=item][value='val']").at ...
- leetcode_Repeated DNA Sequences
描写叙述: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: &qu ...
- Webx框架:依赖注入
Webx的依赖注入和Spring的依赖注入很像,仅仅是有一点点的差别. 注入的时候仅仅能让生命周期长的注入到生命周期短的对象中,比方requestScope对象注入到singleton时就会错误发生. ...
- extjs grid 列顺序紊乱问题
这个问题描述类似 关于extjs表格列展示顺序问题 明明在columns定义好了,理应按照里面的顺序输出嘛,但偏不,原本应该列在第一位的,结果忽而在最后,忽而在中间,忽忽何所似,天地一狗屎. 在谷歌里 ...
- Tomcat9无法启动
闲来无事,重新学习一下Java, 去Tomcat官网下载Tomcat,各种版本,7-8-9,果断下载最新的9,解压后,无需安装,到bin文件夹下启动, 结果总是一闪而过,百度: 1.查看8080是否占 ...
- ios app抓包分析
1 使用rvictl工具 这是mac下的一条命令.ios usb连mac,然后创建虚拟网络接口. 2 使用wireshark抓包 wireshark可以抓这个虚拟网络接口上的数据包.
- Struts 1 Struts 2
Key Technologies Primer https://struts.apache.org/primer.html Threads With Struts 1 you were require ...
- 包管理 import debug 模块管理 module
import sys, os this_file_abspath = os.path.dirname(os.path.abspath(__file__)) ProjectUtil_path = '{} ...