您的位置:首页 > 其它

【BestCoder】 HDOJ 5170 GTY's math problem

2015-02-08 09:25 309 查看
两边取对数。。。这么什么好说的。。。

#include <iostream>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <bitset>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <climits>
#include <cstdlib>
#include <cmath>
#include <time.h>
#define maxn 405
#define maxm 400005
#define eps 1e-7
#define mod 1000000007
#define INF 999999999
#define PI (acos(-1.0))
#define lowbit(x) (x&(-x))
#define mp make_pair
#define ls o<<1
#define rs o<<1 | 1
#define lson o<<1, L, mid
#define rson o<<1 | 1, mid+1, R
#define pii pair<int, int>
#pragma comment(linker, "/STACK:16777216")
typedef long long LL;
typedef unsigned long long ULL;
//typedef int LL;
using namespace std;
LL qpow(LL a, LL b){LL res=1,base=a;while(b){if(b%2)res=res*base;base=base*base;b/=2;}return res;}
LL powmod(LL a, LL b){LL res=1,base=a;while(b){if(b%2)res=res*base%mod;base=base*base%mod;b/=2;}return res;}
// head

double a, b, c, d;

void work()
{
double t1 = b * log(a);
double t2 = d * log(c);
if(fabs(t1 - t2) < eps) printf("=\n");
else if(t1 > t2) printf(">\n");
else printf("<\n");
}

int main()
{
while(scanf("%lf%lf%lf%lf", &a, &b, &c, &d)!=EOF) {
work();
}

return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: