【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; }
相关文章推荐
- 【BestCoder】 HDOJ 5171 GTY's birthday gift
- BestCoder Round #75 T3 King's Order HDOJ 5642
- 【BestCoder】#29 C GTY's gay friends(区间和 随机数判重)
- 【Best Coder】#29 B GTY's birthday gift(快速幂|mod的时候记得负!)
- BestCoder Round #29——A--GTY&#39;s math problem(快速幂(对数法))、B--GTY&#39;s birthday gift(矩阵快速幂)
- BestCoder Round#29 1001 GTY's math problem
- HDOJ——5170(GTY's math problem)
- 【BestCoder】 HDOJ 5162 Jump and Jump...
- 【BestCoder】 HDOJ 5163 Taking Bus
- 【BestCoder】 HDOJ 5103 RootedTree
- 【BestCoder】 HDOJ 5102 The K-th Distance
- HDOJ 题目4096 BestCoder Sequence(数学,水)
- HDU5105 Math Problem && BestCoder Round #18 1002
- 【BestCoder】 HDOJ 5020 Revenge of Collinearity
- 【BestCoder】 HDOJ 5057 Argestes and Sequence
- 【BestCoder】 HDOJ 5054 Alice and Bob
- HDU5104 Primes Problem && BestCoder Round #18 1001
- 【BestCoder】 HDOJ 5019 Revenge of GCD
- 【BestCoder】 HDOJ 5018 Revenge of Fibonacci
- 【BestCoder】 HDOJ 5056 Boring count