B - Big Integers

f:id:peroon:20210208213028j:plain

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    // input
    ll N,M,K;
    cin>>N>>M>>K;

    ll ma = max(N,M);

    VI A;
    rep(i,ma-N)A.push_back(0);

    VI B;
    rep(i,ma-M)B.push_back(0);

    rep(i,N){
      ll a;cin>>a;
      A.push_back(a);
    }

    rep(i,M){
      ll b;cin>>b;
      B.push_back(b);
    }

    // 終了関数
    auto x = [](){
      p("X");exit(0);
    };
    auto y = [](){
      p("Y");exit(0);
    };

    rep(i,ma){
      if(A[i]>B[i])y();
      if(A[i]<B[i])x();
    }
    p("Same");
   
    return 0;
}