結果

問題 No.138 化石のバージョン
ユーザー Yug_min_null
提出日時 2021-09-05 05:24:47
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 652 bytes
コンパイル時間 1,726 ms
コンパイル使用メモリ 190,104 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-21 17:46:49
合計ジャッジ時間 3,509 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 WA * 5 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;

int main() {
  string S, T; cin >> S >> T;
  if(S == T) cout << "YES" << endl;
  else{
    int s = stoi(S.substr(0,1));
    int t = stoi(T.substr(0,1));
    if(s != t){
      if(s < t) cout << "NO" << endl;
      else cout << "YES" << endl;
    }else{
      s = stoi(S.substr(2,3));
      t = stoi(T.substr(2,3));
      if(s != t){
        if(s < t) cout << "NO" << endl;
        else cout << "YES" << endl;
      }else{
        s = stoi(S.substr(4,5));
        t = stoi(T.substr(4,5));
        if(s < t) cout << "NO" << endl;
        else cout << "YES" << endl;
      }
    }
  }
}
0