#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define mp make_pair
#define f first
#define s second
#define pii pair < int, int >
#define pll pair < ll, ll >
#define all(s) s.begin(), s.end()
#define sz(s) (int) s.size()
#define vi vector < int >
const int inf = (1ll << 31) - 1;
const int mod = (int) 1e9 + 7;
ll n,m,a,b,x;
int main () {
#ifdef LOCAL
freopen ("a.in", "r", stdin);
freopen ("a.out", "w", stdout);
#endif
cin>>n>>m;
for(ll i=1;i<=n;i++)
cin>>x, a=a*m+x;
cin>>n>>m;
for(ll i=1;i<=n;i++)
cin>>x, b=b*m+x;
if(a>b) cout<<">";
if(a<b) cout<<"<";
if(a==b) cout<<"=";
#ifdef LOCAL
cerr << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
return 0;
}
cf:数值进制计算
最新推荐文章于 2022-10-22 10:12:55 发布