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 ...
随机推荐
- C# 获得图片的分辨率和大小
double DPI = pictureBox1.Image.HorizontalResolution;//获得分辨率 gisoracle double w = 1.0 * pictureBox1.I ...
- Meteor计时器
Meteor有提供它自己的setTimeout和setInterval方法.这些方法被用于确保所有全局变量都具有正确的值.它们就像普通 JavaScript 中的setTimeout 和 setInt ...
- SpringBoot初始教程之日志处理(二)
SpringBoot初始教程之日志处理(二) 1.介绍 SpringBoot默认是采用logback进行日志处理.Logback是由log4j创始人设计的又一个开源日志组件.Logback是由log4 ...
- 成员函数指针 C++ FAQ LITE — Frequently Asked Questions
http://www.sunistudio.com/cppfaq/pointers-to-members.html C++ FAQ LITE — Frequently Asked Questions ...
- 一起talk C栗子吧(第一百二十一回:C语言实例--线程知识体系图)
各位看官们.大家好,上一回中咱们说的线程属性的样例.这一回咱们说的样例是:线程知识体系图.闲话休提.言归正转. 让我们一起talk C栗子吧! 我们在前面的章回中介绍了与线程相关的知识,在今天的章回中 ...
- 深度学习笔记之关于总结、展望、参考文献和Deep Learning学习资源(五)
不多说,直接上干货! 十.总结与展望 1)Deep learning总结 深度学习是关于自动学习要建模的数据的潜在(隐含)分布的多层(复杂)表达的算法.换句话来说,深度学习算法自动的提取分类需要的低层 ...
- 大学生程序设计邀请赛(华东师范大学)B. 分词 DP
B. 分词 有一句句子因为粘贴的时候出现了一点问题空格全部丢失了.现在给一本字典,每个词都对应这个词出现的频率(每十亿).根据这个频率,我们可以根据下面的公式算出这个词带来的收益 P(word): ...
- flask 文件下载 文件服务器 请求参数 函数修饰符
180M电子书 通过已经下载到pc,在上传到私有公网服务器,之后,再异地下载 以下代码,文件内容错乱 [root@bigdata-server- mydataweb]# tree . ├── mydl ...
- Deep Learning 28:读论文“Multi Column Deep Neural Network for Traffic Sign Classification”-------MCDNN 简单理解
读这篇论文“ Multi Column Deep Neural Network for Traffic Sign Classification”是为了更加理解,论文“Multi-column Deep ...
- ABAP FORM打印转PDF/pdf 预览
function ZSTXBC_SSFCOMP_PDF_PREVIEW. *"-------------------------------------------------------- ...