Hey there, I was solving 789B and I had this very simple and short code but it just fails on test 3 although it works perfectly on my machine. I have read that undefined behavior can induce this but I can't recognize what's wrong with what I typed. Here's the code:
include <bits/stdc++.h>
using namespace std; int main(){ long long x,y; double r1,r2; cin >> x >> y; r1 = x*log(y); r2 = y*log(x); if(r1 == r2) cout << "="; else if(r1 > r2) cout << "<"; else if(r2 > r1) cout << ">"; return 0; }
Thank you!!