Year 2118. Androids are in mass production for decades now, and they do all the work for humans. But androids have to go to school to be able to solve creative tasks. Just like humans before.

It turns out that high school struggles are not gone. If someone is not like others, he is bullied. Vasya-8800 is an economy-class android which is produced by a little-known company. His design is not perfect, his characteristics also could be better. So he is bullied by other androids.

One of the popular pranks on Vasya is to force him to compare xy with yx. Other androids can do it in milliseconds while Vasya's memory is too small to store such big numbers.

Please help Vasya! Write a fast program to compare xyxy with yx for Vasya, maybe then other androids will respect him.

Input

On the only line of input there are two integers x and y (1≤x,y≤109).

Output

If xy<yx, then print '<' (without quotes). If xy>yx, then print '>' (without quotes). If xy=yx, then print '=' (without quotes).

Examples

Input
5 8
Output
>
Input
10 3
Output
<
Input
6 6
Output
=

Note

In the first example 5 8=5⋅5⋅5⋅5⋅5⋅5⋅5⋅5=390625, and 85=8⋅8⋅8⋅8⋅8=32768. So you should print '>'.

In the second example 10 3=1000<3 10=59049.

In the third example 6 6=46656=6 6.

这道题,看题意首先想到快速幂,再看数据范围,显然会炸,那么最简单粗暴的方法就是,比较 x ^ y 与 y ^ x 的大小关系。(如此简洁明了的题面 >_<)

我们要先在两式旁取对数,就是比较 ln x ^ y 与 ln y ^ x 的大小关系,先假设左式小于右式:(前方高能,请注意)

ln x ^ y < ln y & x; 即 y * ln x < x * lny;

所以 ln x / x < ln y / y;

那么通过归纳我们可以设 f (n) = ln n / n;

取这个函数的导数,即 f'(n) = ( ln n - 1 )/ n ^ 2;

那么当 f'(n)> 0 时, ln n > 1, 所以当 x, y > e (因为是整数,相当于大于等于3)时, 若 x > y, 则 x ^ y < y ^ x;

证明完成之后,我们就可以知道,当给出的 x , y 大于 3 的时候,只需要判断 x 和 y 的大小关系即可,其他的只要特判就可以了

#include<bits/stdc++.h>
using namespace std;
int main()
{
int x,y,i;
cin>>x>>y;
if(x == y){
cout<<"="<<endl;
return 0;
}
else{
if(x == 1){
cout<<"<";
return 0;
}
if(y == 1){
cout<<">";
return 0;
}
int h = max(x,y);
if(h <= 4){
long long sum1 = 1,sum2 = 1;
for(i = 1; i <= y; i++){
sum1 *= x;
}
for(i = 1; i <= x; i++){
sum2 *= y;
}
if(sum1 < sum2){
cout<<"<";
}
else if(sum1 > sum2){
cout<<">";
}
else{
cout<<"=";
}
}
else{
if(x > y){
cout<<"<";
}
else{
cout<<">";
}
}
}
return 0;
}

  

CF987B - High School: Become Human的更多相关文章

  1. CF987B High School: Become Human 数学

    题意翻译 题目大意 输入一个 xxx ,一个 yyy ,求是 xyx^yxy 大还是 yxy^xyx 大. (1≤x,y≤109)(1≤x,y≤10^9)(1≤x,y≤109) 输入输出格式 输入格式 ...

  2. Human and AI's future (reverie)

    However, I do notice that to make the dark situation happen, it doesn't require the topleft matrix t ...

  3. Human Gene Functions

    Human Gene Functions Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 18053 Accepted: 1004 ...

  4. PacBio & BioNano (Assembly and diploid architecture of an individual human genome via single-molecule technologies)

    Assembly and diploid architecture of an individual human genome via single-molecule technologies 文章链 ...

  5. POJ 1080 Human Gene Functions -- 动态规划(最长公共子序列)

    题目地址:http://poj.org/problem?id=1080 Description It is well known that a human gene can be considered ...

  6. APP-PER-50022: Oracle Human Resources could not retrieve a value for the User Type profile option.

    Symptoms ----------------------- AP > Setup > Organizations Show Error tips: APP-PER-50022: Or ...

  7. Unity3d 屏幕空间人体皮肤知觉渲染&次表面散射Screen-Space Perceptual Rendering & Subsurface Scattering of Human Skin

    之前的人皮渲染相关 前篇1:unity3d Human skin real time rendering 真实模拟人皮实时渲染 前篇2:unity3d Human skin real time ren ...

  8. 【译】iOS人性化界面指南(iOS Human Interface Guidelines)(一)

    1. 引言1.1 译者自述 我是一个表达能力一般的开发员,不管是书面表达,还是语言表达.在很早以前其实就有通过写博客锻炼这方面能力的想法,但水平有限实在没有什么拿得出手的东西分享.自2015年7月以来 ...

  9. [文学阅读] METEOR: An Automatic Metric for MT Evaluation with Improved Correlation with Human Judgments

    METEOR: An Automatic Metric for MT Evaluation with Improved Correlation with Human Judgments Satanje ...

随机推荐

  1. Kubernetes基本功能

    说明 目前kubernetes的资料介绍很多也很深刻,本文只是做一个针对自己学习k8s过程的介绍,仅仅是学习笔记的记录. 一.基本使用 1. 命令行 集群信息 Namespace 信息 Control ...

  2. Arrays和String单元测试 20175301

    要求 在IDEA中以TDD的方式对String类和Arrays类进行学习 一.String类相关方法的单元测试 1.ChatAt的测试 代码: import org.junit.Test; impor ...

  3. JGUI源码:响应式布局简单实现(13)

    首先自我检讨下,一直没有认真研究过响应式布局,有个大致概念响应式就是屏幕缩小了就自动换行或者隐藏显示,就先按自己的理解来闭门造车思考实现过程吧. 1.首先把显示区域分成12等分,bootstrap是这 ...

  4. python selenium 最简单示例

    使用 pip 安装  selenium 下载 chromedriver,添加在PATH中 # -*- coding: utf-8 -*- from selenium import webdriver ...

  5. P3203 [HNOI2010]弹飞绵羊

    LCT裸题,之后填坑打一下 分块做法:每个点存几次出块以及出块的位置,问的时候直接暴力跳就vans了 首先思考最普通的模拟,发现可以O(n)路径压缩,O(1)的查询,但是需要修改就变成了O(n^2)的 ...

  6. 华南理工大学“三七互娱杯”程序设计竞赛(重现赛)( HRY and array 高精度除法模板)

    题目链接:https://ac.nowcoder.com/acm/contest/874/D 题目大意:给你两个数列a和b然后对a可以进行排列,对b可以任意排列,问你sigma(a(i)*b(i))的 ...

  7. kafka单机安装和启动

    1.下载并解压到/usr/local/src目录下 2.运行kafka需要使用Zookeeper,先启动Zookeeper,如果没有Zookeeper,可以使用kafka自带打包和配置好的Zookee ...

  8. 吴恩达《机器学习》课程笔记——第七章:Logistic回归

    上一篇  ※※※※※※※※  [回到目录]  ※※※※※※※※  下一篇 7.1 分类问题 本节内容:什么是分类 之前的章节介绍的都是回归问题,接下来是分类问题.所谓的分类问题是指输出变量为有限个离散 ...

  9. 帆软报表(finereport)使用row_number ()进行组内排序

    ROW_NUMBER()函数将针对SELECT语句返回的每一行,从1开始编号,赋予其连续的编号.在查询时应用了一个排序标准后,只有通过编号才能够保证其顺序是一致的,当使用ROW_NUMBER函数时,也 ...

  10. webpack打包文件

    npm init -y//生成package.json npm install webpack webpack-cli --save-dev//安装webpack和webpack-cli根据入口文件. ...